Disambiguating Grammars with Tree Automata
Dealing with precedence and associativity rules in context free grammars (CFGs) has long posed a challenge. While they can be encoded in the structure of the CFG, the result can be difficult to work with and often obfuscates the language designer’s intent. Many parsing systems offer alternatives in the form of specialized precedence and associativity declarations, but these are limited and do not handle many similar situations such as the special rules surrounding a dangling else, the precedence of if in ML, or the interactions between new and function arguments in JavaScript. In this presentation, we show that tree automata can specify all of these while still allowing the CFG to be written in a natural manner. This unified theory subsumes and generalizes these other techniques and provides an elegant means of specifying grammatical restrictions. When applied to an existing CFG, this technique generates a new CFG that encodes the constraints from a given tree automata. This process is closed for LR(k) and LL(k) grammars and thus can be used as a preprocessing step that is compatible with existing parsing frameworks.
Sun 25 OctDisplayed time zone: Eastern Time (US & Canada) change
13:30 - 15:00 | |||
13:30 30mTalk | Operator Precedence for Parser Combinators Parsing@SLE Anastasia Izmaylova Centrum Wiskunde & Informatica | ||
14:00 30mTalk | Disambiguating Grammars with Tree Automata Parsing@SLE Michael D. Adams University of Utah | ||
14:30 30mTalk | Name Resolution Strategies in Variability Realization Languages for Software Product Lines Parsing@SLE Sven Schuster Technische Universität Braunschweig, Christoph Seidl Technische Universität Braunschweig, Ina Schaefer |