The syntax definition formalism SDF—reference manual—
ACM SIGPLAN Notices
Deterministic parsing of ambiguous grammars
Communications of the ACM
Semi-automatic grammar recovery
Software—Practice & Experience
FASE '01 Proceedings of the 4th International Conference on Fundamental Approaches to Software Engineering
Disambiguation Filters for Scannerless Generalized LR Parsers
CC '02 Proceedings of the 11th International Conference on Compiler Construction
Development, Assessment, and Reengineering of Language Descriptions
CSMR '00 Proceedings of the Conference on Software Maintenance and Reengineering
Cost-Effective Maintenance Tools for Proprietary Languages
ICSM '01 Proceedings of the IEEE International Conference on Software Maintenance (ICSM'01)
Toward an engineering discipline for grammarware
ACM Transactions on Software Engineering and Methodology (TOSEM)
Haskell, do you read me?: constructing and composing efficient top-down parsers at runtime
Proceedings of the first ACM SIGPLAN symposium on Haskell
An Introduction to Grammar Convergence
IFM '09 Proceedings of the 7th International Conference on Integrated Formal Methods
Preventing injection attacks with syntax embeddings
Science of Computer Programming
Pure and declarative syntax definition: paradise lost and regained
Proceedings of the ACM international conference on Object oriented programming systems languages and applications
Recovering grammar relationships for the Java Language Specification
Software Quality Control
Parse forest diagnostics with dr. ambiguity
SLE'11 Proceedings of the 4th international conference on Software Language Engineering
Hi-index | 0.00 |
A wide range of parser generators are used to generate parsers for programming languages. The grammar formalisms that come with parser generators provide different approaches for defining operator precedence. Some generators (e.g. YACC) support precedence declarations, others require the grammar to be unambiguous, thus encoding the precedence rules. Even if the grammar formalism provides precedence rules, a particular grammar might not use it. The result is grammar variants implementing the same language. For the C language, the GNU Compiler uses YACC with precedence rules, the C-Transformers uses SDF without priorities, while the SDF library does use priorities. For PHP, Zend uses YACC with precedence rules, whereas PHP-front uses SDF with priority and associativity declarations. The variance between grammars raises the question if the precedence rules of one grammar are compatible with those of another. This is usually not obvious, since some languages have complex precedence rules. Also, for some parser generators the semantics of precedence rules is defined operationally, which makes it hard to reason about their effect on the defined language. We present a method and tool for comparing the precedence rules of different grammars and parser generators. Although it is undecidable whether two grammars define the same language, this tool provides support for comparing and recovering precedence rules, which is especially useful for reliable migration of a grammar from one grammar formalism to another. We evaluate our method by the application to non-trivial mainstream programming languages, such as PHP and C.