Journal of Information Processing
Online ISSN : 1882-6652
ISSN-L : 1882-6652
A Declarative Extension of Parsing Expression Grammars for Recognizing Most Programming Languages
Tetsuro MatsumuraKimio Kuramitsu
著者情報
ジャーナル フリー

2016 年 24 巻 2 号 p. 256-264

詳細
抄録
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.
著者関連情報
© 2016 by the Information Processing Society of Japan
前の記事 次の記事
feedback
Top