Author(s)
Term
2. term
Education
Publication year
2010
Submitted on
2010-07-30
Pages
96 pages
Abstract
Dette speciale dokumenterer udviklingen af OOPEG, en parser generator baseret på Parsing Expression Grammars (PEGs) og skrevet i C#. Vi synes at syntaksen i andre compiler-compiler værktøjer er tung på grund af anvendelsen af semantiske kommandoer, labels og markup til at fjerne tvetydigheder. Vi har fundet at PEG'er et godt værktøj til at bygge parser generatorer udfra, da vores grammatikker ikke kun definerer syntaksen for et sprog kort og præcist, men også eksplicit definerer parsing proceduren og med meget lidt markup gør det muligt at generere kompakte og let brugbare objekt-orienterede abstrakte syntaks træer. OOPEG bruger en objekt-orienteret modulær parsing engine, som gør brug af packrat parsing for at opnå tilstrækkelig performance til bruge i et produktionsmiljø. For at gøre OOPEG nem at komme i gang med tilbyder vi en tutorial, der viser hvordan man kan lave et simpelt sprog, samt integration med Visual Studio 2010.
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.
Keywords
Documents
Colophon: This page is part of the AAU Student Projects portal, which is run by Aalborg University. Here, you can find and download publicly available bachelor's theses and master's projects from across the university dating from 2008 onwards. Student projects from before 2008 are available in printed form at Aalborg University Library.
If you have any questions about AAU Student Projects or the research registration, dissemination and analysis at Aalborg University, please feel free to contact the VBN team. You can also find more information in the AAU Student Projects FAQs.