An object-oriented parser generator for LL(1) grammars
Hassan Manasfi · Spectrum Research Repository (Concordia University) · 1999
In this thesis we investigate the use of Object-Oriented techniques to build both a parser and a parser generator for an LL(1) attributed grammars. When top-down parsing is being used, a node of the parse tree is expanded into several other nodes. Thinking in terms of objects, an object in the tree constructs other objects. An object, which is an instance of a class, on the tree corresponds to an instance of the corresponding symbol in a program. This means that each symbol in the language corresponds to a class or an instance of a class. So in order to parse a document and construct a parse tree for it, we begin by constructing the root of that tree by creating an object representing the nonterminal start symbol. The constructor of the root would in turn construct the subtrees of the root. The parsing approach is explained. The design and implementation of key parts of the parser are shown. Also the definition of the language's grammar which contains regular expressions and offer an easy notation to specify semantic actions is documented