Verifiable parse table composition for deterministic parsing

August Schwerdfeger, Eric Van Wyk

Research output: Chapter in Book/Report/Conference proceedingConference contribution

10 Scopus citations

Abstract

One obstacle to the implementation of modular extensions to programming languages lies in the problem of parsing extended languages. Specifically, the parse tables at the heart of traditional LALR(1) parsers are so monolithic and tightly constructed that, in the general case, it is impossible to extend them without regenerating them from the source grammar. Current extensible frameworks employ a variety of solutions, ranging from a full regeneration to using pluggable binary modules for each different extension. But recompilation is time-consuming, while the pluggable modules in many cases cannot support the addition of more than one extension, or use backtracking or non-deterministic parsing techniques. We present here a middle-ground approach that allows an extension, if it meets certain restrictions, to be compiled into a parse table fragment. The host language parse table and fragments from multiple extensions can then always be efficiently composed to produce a conflict-free parse table for the extended language. This allows for the distribution of deterministic parsers for extensible languages in a pre-compiled format, eliminating the need for the "source code" grammar to be distributed. In practice, we have found these restrictions to be reasonable and admit many useful language extensions.

Original languageEnglish (US)
Title of host publicationSoftware Language Engineering - Second International Conference, SLE 2009, Revised Selected Papers
Pages184-203
Number of pages20
DOIs
StatePublished - 2010
Event2nd International Conference on Software Language Engineering, SLE 2009 - Denver, CO, United States
Duration: Oct 5 2009Oct 6 2009

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume5969 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference2nd International Conference on Software Language Engineering, SLE 2009
Country/TerritoryUnited States
CityDenver, CO
Period10/5/0910/6/09

Bibliographical note

Funding Information:
This work was partially funded by the National Science Foundation grants #0347860 and #0429640.

Fingerprint

Dive into the research topics of 'Verifiable parse table composition for deterministic parsing'. Together they form a unique fingerprint.

Cite this