logo of the SSW institute
Institut für Systemsoftware
Johannes Kepler Universität Linz
Fachbereich Informatik
logo of the Cristian Doppler Research Association
Christian Doppler Labor
Automated Software Engineering

Home

General
Staff
Contact
Partners
Alumni

Research
Areas
Projects
Papers
Books
Reports
Awards

Teaching
Lectures
Exams
B.Projects
M.Theses
PhD Theses
Go Abroad

Misc
Library
Seminars
Gallery
Links
Search

Webmaster


logo of the Johannes Kepler University (JKU)

LL(1) Conflict Resolution in a Recursive Descent Compiler Generator

Albrecht Wöß
Institut für Praktische Informatik
woess@ssw.uni-linz.ac.at

Markus Löberbauer
Institut für Praktische Informatik
loeberbauer@ssw.uni-linz.ac.at

Hanspeter Mössenböck
Institut für Praktische Informatik
moessenboeck@ssw.uni-linz.ac.at


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.


Proceedings of the Joint Modular Languages Conference (JMLC'03), Klagenfurt, August 2003, Lecture Notes in Computer Science

download as PDF.