Parsing reflective grammars

  • Authors:
  • Paul Stansifer;Mitchell Wand

  • Affiliations:
  • Northeastern University, Huntington Avenue Boston, Massachusetts;Northeastern University, Huntington Avenue Boston, Massachusetts

  • Venue:
  • Proceedings of the Eleventh Workshop on Language Descriptions, Tools and Applications
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Existing technology can parse arbitrary context-free grammars, but only a single, static grammar per input. In order to support more powerful syntax-extension systems, we propose reflective grammars, which can modify their own syntax during parsing. We demonstrate and prove the correctness of an algorithm for parsing reflective grammars. The algorithm is based on Earley's algorithm, and we prove that it performs asymptotically no worse than Earley's algorithm on ordinary context-free grammars.