Regular right part grammars and their parsers
Communications of the ACM
An efficient context-free parsing algorithm
Communications of the ACM
Communications of the ACM
Compiler Construction for Digital Computers
Compiler Construction for Digital Computers
Hi-index | 0.00 |
Extended context-free grammars allow regular expressions to appear in productions right hand sides, and are a clear and natural way to describe the syntax of programming languages. In this paper an LR parsing technique for extended context-free grammars is presented, which is based on an underlying transformation of the grammar into an equivalent context-free one. The technique is suitable for inclusion in one-pass compilers: the implementation requires little extensions to the algorithms working for normal LR grammars. Besides describing the parsing method, the paper shows also the algorithms for deriving the parsing tables; tables optimization is also discussed. Finally, this technique is compared with other proposals appeared in the literature.