Adaptable parsing expression grammars

  • Authors:
  • Leonardo Vieira dos Santos Reis;Roberto da Silva Bigonha;Vladimir Oliveira Di Iorio;Luis Eduardo de Souza Amorim

  • Affiliations:
  • Departamento de Ciência da Computação, Universidade Federal de Minas Gerais, Brazil;Departamento de Ciência da Computação, Universidade Federal de Minas Gerais, Brazil;Departamento de Informática, Universidade Federal de Viçosa, Brazil;Departamento de Informática, Universidade Federal de Viçosa, Brazil

  • Venue:
  • SBLP'12 Proceedings of the 16th Brazilian conference on Programming Languages
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

The term "extensible language" is especially used when a language allows the extension of its own concrete syntax and the definition of the semantics of new constructs. Most popular tools designed for automatic generation of syntactic analyzers do not offer any desirable resources for the specification of extensible languages. When used in the implementation of features like syntax macro definitions, these tools usually impose severe restrictions. We claim that one of the main reasons for these limitations is the lack of formal models that are appropriate for the definition of the syntax of extensible languages. This paper presents the design and formal definition for Adaptable Parsing Expression Grammars (APEG), an extension to the PEG model that allows the manipulation of its own production rules during the analysis of an input string. It is shown that the proposed model may compare favorably with similar approaches for the definition of the syntax of extensible languages.