Grammar engineering for multiple front‐ends for Python. (4th December 2018) - Malloy, Brian A.; Power, James F.
Summary: In this paper, we describe our experience in grammar engineering to construct multiple parsers and front ends for the Python language. We present a metrics‐based study of the evolution of the Python grammars through the multiple versions of the language in an effort to distinguish and measure grammar evolution and to provide a basis of comparison with related research in grammar engineering. To conduct this research, we have built a toolkit, pygrat, which builds on tools developed in other research. We usepygrat to build a system that automates much of the process needed to translate the Python grammars from EBNF to a formalism acceptable to thebison parser generator. We exploit the suite of Python test cases, used by the Python developers, to validate our parser generation. Finally, we describe our use of themenhir parser generator to facilitate the parser and front‐end construction, eliminating some of the transformations and providing practical support for grammar modularisation.