Parsing strong LL(k) languages with a modified LL(1) parsing table and a lookahead table
學年 80
學期 1
發表日期 1991-12-18
作品名稱 Parsing strong LL(k) languages with a modified LL(1) parsing table and a lookahead table
作品名稱(其他語言)
著者 劉虎城; 林尤
作品所屬單位 淡江大學資訊工程學系
出版者
會議名稱 中華民國八十年全國計算機會議=National Computer Symposium 1991, Republic of China
會議地點 桃園縣, 臺灣
摘要 Traditionally, we shall not construct a parsing table for a strong LL(k) grammar for k>1, because a canonical parsing table for such a grammar is too space-consuming to construct a real one. But we observe that parsing a string in the strong LL(k) language is not always necessary to construct a huge parsing table. In many cases, a string in the strong LL(k) language can be parsed successfully with a modified parsing table whose size is the same as that of an LL(1) and a small lookahead table. In this paper, we present a parsing technique to parse the strong LL(k) languages with a modified LL(1) parsing table and a lookahead table. Two algorithms are given to show the canonical parsing method for a strong LL(k) grammar. We present another two algorithms to illustrate how to construct a modified LL(1) parsing table and a lookahead table and how to parse strong LL(k) languages with these two tables. Our method can reduce the parsing table size considerably, of course, will reduce the ability of handling error recovery, too. An error recovery scheme is proposed to remedy this weakness. Several practical methods that can be used to parse strong LL(k) languages are also compared. Finally, we discuss how to apply this method to parse LR(k) languages with a similar modified LR(1) parsing table and a lookahead table.
關鍵字 剖析表;正則剖析法;文法;語法分析;編譯器;Parsing Table;Canonical Parsing;Grammar;Syntax Analysis;Compiler
語言 en
收錄於
會議性質 國內
校內研討會地點
研討會時間 19911218~19911219
通訊作者
國別 TWN
公開徵稿 Y
出版型式 紙本
出處 中華民國八十年全國計算機會議論文集(二)=Proceedings of National Computer Symposium 1991, Republic of China, Vol 2,頁714-719
相關連結

機構典藏連結 ( http://tkuir.lib.tku.edu.tw:8080/dspace/handle/987654321/37723 )

機構典藏連結