A declarative extension of parsing expression grammars for recognizing most programming languages

Tetsuro Matsumura, Kimio Kuramitsu

    • 1 引用

    抄録

    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.

    本文言語英語
    ページ(範囲)256-264
    ページ数9
    ジャーナルJournal of Information Processing
    24
    2
    DOI
    ジャーナル掲載日出版済み - 2016 3 15

    Fingerprint

    Polyethylene glycols
    Computer programming languages
    Ruby
    Indentation
    Semantics

    Keywords

      ASJC Scopus subject areas

      • Computer Science(all)

      これを引用

      A declarative extension of parsing expression grammars for recognizing most programming languages. / Matsumura, Tetsuro; Kuramitsu, Kimio.

      :: Journal of Information Processing, 巻 24, 番号 2, 15.03.2016, p. 256-264.

      研究成果: ジャーナルへの寄稿記事

      Matsumura, Tetsuro; Kuramitsu, Kimio / A declarative extension of parsing expression grammars for recognizing most programming languages.

      :: Journal of Information Processing, 巻 24, 番号 2, 15.03.2016, p. 256-264.

      研究成果: ジャーナルへの寄稿記事

      @article{7cc3373d87954b51ac40e33b454f3d6f,
      title = "A declarative extension of parsing expression grammars for recognizing most programming languages",
      keywords = "And case studies on programming languages, Context-sensitive syntax, Parsing expression grammars, Semantic actions",
      author = "Tetsuro Matsumura and Kimio Kuramitsu",
      year = "2016",
      month = "3",
      doi = "10.2197/ipsjjip.24.256",
      volume = "24",
      pages = "256--264",
      journal = "Journal of Information Processing",
      issn = "0387-5806",
      number = "2",

      }

      TY - JOUR

      T1 - A declarative extension of parsing expression grammars for recognizing most programming languages

      AU - Matsumura,Tetsuro

      AU - Kuramitsu,Kimio

      PY - 2016/3/15

      Y1 - 2016/3/15

      N2 - 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.

      AB - 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.

      KW - And case studies on programming languages

      KW - Context-sensitive syntax

      KW - Parsing expression grammars

      KW - Semantic actions

      UR - http://www.scopus.com/inward/record.url?scp=84961192070&partnerID=8YFLogxK

      UR - http://www.scopus.com/inward/citedby.url?scp=84961192070&partnerID=8YFLogxK

      U2 - 10.2197/ipsjjip.24.256

      DO - 10.2197/ipsjjip.24.256

      M3 - Article

      VL - 24

      SP - 256

      EP - 264

      JO - Journal of Information Processing

      T2 - Journal of Information Processing

      JF - Journal of Information Processing

      SN - 0387-5806

      IS - 2

      ER -