2015/11/26 by Tetsuro Matsumura, Matsumura, Tetsuro, Kimio Kuramitsu +1
Computer Science · #FOS: Computer and information sciences #Logic, programming, and type systems #Programming Languages (cs.PL) #Software Engineering Research #Software Testing and Debugging Techniques #cs.PL
paper · pdf · doi:10.48550/arxiv.1511.08414
To appear in Journal of Information Processing, 24(2), 2016
arxiv created 2015/11/26 · openalex publication_date 2015/11/26 · arxiv updated 2015/11/30 · openalex created_date 2019/06/27 · openalex updated_date 2026/07/28
Parsing Expression Grammars are a popular foundation for describing syntax. Unfortunately, several syntax of programming languages are still hard to recognize with pure PEGs. Notorious cases appears: typedef-defined names in C/C++, indentation-based code layout in Python, and HERE document in many scripting languages. To recognize such PEG-hard syntax, we have addressed a declarative extension to PEGs. The "declarative" extension means no programmed semantic actions, which are traditionally used to realize the extended parsing behavior. Nez is our extended PEG language, including symbol tables and conditional parsing. This paper demonstrates that the use of Nez Extensions can realize many practical programming languages, such as C, C#, Ruby, and Python, which involve PEG-hard syntax.