English

Parsing Reflective Grammars

Programming Languages 2011-02-14 v2

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.

Keywords

Cite

@article{arxiv.1102.2003,
  title  = {Parsing Reflective Grammars},
  author = {Paul Stansifer and Mitchell Wand},
  journal= {arXiv preprint arXiv:1102.2003},
  year   = {2011}
}

Comments

A shorter version appears in LDTA 2011

R2 v1 2026-06-21T17:24:11.265Z