首页 | 本学科首页   官方微博 | 高级检索  
     


Grammar engineering for multiple front-ends for Python
Authors:Brian A Malloy  James F Power
Affiliation:1. Computer Science Division, School of Computing, Clemson University, Clemson, South Carolina;2. Department of Computer Science, Maynooth University, Co. Kildare, Ireland
Abstract: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 use pygrat to build a system that automates much of the process needed to translate the Python grammars from EBNF to a formalism acceptable to the bison 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 the menhir parser generator to facilitate the parser and front-end construction, eliminating some of the transformations and providing practical support for grammar modularisation.
Keywords:front end  grammarware  grammar engineering  parser  programming language evolution  Python  software engineering
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号