A flexible table driven LR(1) parser
暂无分享,去创建一个
The implementation of a flexible table driven LR(1) parser is presented in this paper. The LR(1) parsing algorithm is based on modified bottom up strategy described in [1] and it stays the same for all grammars. A parser with control tables that are initialized within the source text has no flexibility because each new LR(1) parser implementation needs to recompile the source text in order to adjust its data control structures like terminal symbols, non terminal symbols, grammar rules and control table. To avoid this drawback a configuration text edited file is to be created and read as input to adapt the parser before the syntax analysis process starts execution.
[1] Paul G. Sorenson,et al. The Theory And Practice of Compiler Writing , 1985 .
[2] Alfred V. Aho,et al. Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.
[3] Alfred V. Aho,et al. The Theory of Parsing, Translation, and Compiling , 1972 .