• Jacob Korsgaard
  • Jørgen Ulrik B. Krag
2. term, Computer Science, Master (Master Programme)
This thesis documents the development of OOPEG, a Parsing Expression Grammar (PEG) based parser generator written in C#.
We find that other compiler-compilers have dense input syntax, because of the inclusion of semantic actions, labeling and disambiguation markup.
We have found that PEGs are very suitable for building parser generators as our grammars not only define the syntax of the language concisely, but also explicitly define the parsing procedure and by using very little markup we can generate concise, safe and easily usable object-oriented abstract syntax trees.
OOPEG features an object-oriented modular parsing engine that uses packrat parsing to achieve sufficient performance to be used in a production environment. To make OOPEG more accessible we provide a tutorial for creating a simple language, as well as integration with the Visual Studio 2010 IDE.
Publication date30 Jul 2010
Number of pages96
ID: 35008978