2024-03-28T19:58:39Zhttps://ipsj.ixsq.nii.ac.jp/ej/?action=repository_oaipmhoai:ipsj.ixsq.nii.ac.jp:001482092022-10-21T05:24:51Z00581:08417:08419
A Declarative Extension of Parsing Expression Grammars for Recognizing Most Programming LanguagesA Declarative Extension of Parsing Expression Grammars for Recognizing Most Programming Languageseng[特集:ソフトウェア工学] parsing expression grammars, semantic actions, context-sensitive syntax, and case studies on programming languageshttp://id.nii.ac.jp/1001/00148175/Journal Articlehttps://ipsj.ixsq.nii.ac.jp/ej/?action=repository_action_common_download&item_id=148209&item_no=1&attribute_id=1&file_no=1Copyright (c) 2016 by the Information Processing Society of JapanGraduate School of Electronic and Computer Engineering, Yokohama National University/Presently with Zuken Inc.Graduate School of Electronic and Computer Engineering, Yokohama National UniversityTetsuro, MatsumuraKimio, KuramitsuParsing 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.\n------------------------------This is a preprint of an article intended for publication Journal ofInformation Processing(JIP). This preprint should not be cited. Thisarticle should be cited as: Journal of Information Processing Vol.24(2016) No.2 (online)------------------------------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.\n------------------------------This is a preprint of an article intended for publication Journal ofInformation Processing(JIP). This preprint should not be cited. Thisarticle should be cited as: Journal of Information Processing Vol.24(2016) No.2 (online)------------------------------AN00116647情報処理学会論文誌5722016-02-151882-77642016-02-10