Abstract
Recursive descent parsing is restricted to languages whose grammars are LL(1), i.e., which can be parsed top-down with a single lookahead symbol. Unfortunately, many languages such as Java, C++, or C# are not LL(1). There-fore recursive descent parsing cannot be used or the parser has to make its deci-sions based on semantic information or a multi-symbol lookahead.
In this paper we suggest a systematic technique for resolving LL(1) conflicts in recursive descent parsing and show how to integrate it into a compiler gen-erator (Coco/R). The idea is to evaluate user-defined boolean expressions, in order to allow the parser to make its parsing decisions where a one symbol loo-kahead does not suffice.
Using our extended compiler generator we implemented a compiler front end for C# that can be used as a framework for implementing a variety of tools.
Original language | English |
---|---|
Title of host publication | Modular Programming Languages |
Publisher | Springer-Verlag Heidelberg |
Pages | 192-201 |
Number of pages | 9 |
Volume | 2789 / 2003 |
ISBN (Print) | 3-540-40796-0 |
Publication status | Published - Aug 2003 |
Fields of science
- 102 Computer Sciences
- 102009 Computer simulation
- 102011 Formal languages
- 102013 Human-computer interaction
- 102029 Practical computer science
- 102022 Software development
- 102024 Usability research