A Symbol-Based Extension of Parsing Expression Grammars and Context-Sensitive Packrat Parsing
Parsing Expression Grammars are a powerful and popular foundation for describing syntax. Despite PEGs’ expressiveness, there are many syntax patterns of popular programming languages that cannot be recognized with PEGs. Typical examples include typedef-defined names in C/C++ and here documents appearing in many scripting languages. We use a single unified state representation, called a symbol table, to capture various context-sensitive patterns. Over the symbol table, we design a small set of restricted semantic predicates and actions. The extended PEGs are called SPEGs, and are designed to be safe in contexts of backtracking and the packrat parsing’s linear time guarantee. This paper will show that SPEGs surprisingly improve the expressive power in such ways that they recognize practical context-sensitive grammars, including back referencing, indentation-based code layout and contextual keywords.
Mon 23 OctDisplayed time zone: Tijuana, Baja California change
10:30 - 12:00 | |||
10:30 25mTalk | Type-Safe Modular Parsing SLE DOI | ||
10:55 25mTalk | Incremental Packrat Parsing SLE DOI | ||
11:20 25mTalk | A Symbol-Based Extension of Parsing Expression Grammars and Context-Sensitive Packrat Parsing SLE Kimio Kuramitsu Yokohama National University, Japan DOI | ||
11:45 15mTalk | Red Shift: Procedural Shift-Reduce ParsingVision Paper SLE Nicolas Laurent Université Catholique de Louvain, Belgium DOI |