The formalization and implementation of Adaptable Parsing Expression Grammars

dc.contributor.authorIorio, Vladimir O. Di
dc.contributor.authorReis, Leonardo V. S.
dc.contributor.authorBigonha, Roberto S.
dc.contributor.authorAmorim, Luis Eduardo S.
dc.date.accessioned2018-11-13T19:07:03Z
dc.date.available2018-11-13T19:07:03Z
dc.date.issued2014-12-15
dc.description.abstractThe 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 analysers do not offer any adequate resources for the specification of extensible languages. When used in the implementation of features like syntax macro definitions, these tools usually impose severe restrictions. For example, it may be required that macro definitions and their use reside in different files; or it may be impossible to perform the syntax analysis in one single pass. We claim that one of the main reasons for these limitations is the lack of appropriate formal models for the definition of the syntax of extensible languages. This paper presents the design and formal definition of Adaptable Parsing Expression Grammars, an extension to the Parsing Expression Grammar (PEG) model that allows the manipulation of its own production rules during the analysis of an input string. The proposed model compares favourably with similar approaches for the definition of the syntax of extensible languages. An implementation of the model is also presented, simulating the behaviour of packrat parsers. Among the challenges for this implementation is the use of attributes and on the fly modifications on the production rules at parse time, features not present in standard PEG. This approach has been used on the definition of a real extensible language, and initial performance tests suggest that the model may work well in practice.en
dc.formatpdfpt-BR
dc.identifier.issn01676423
dc.identifier.urihttps://doi.org/10.1016/j.scico.2014.02.020
dc.identifier.urihttp://www.locus.ufv.br/handle/123456789/22547
dc.language.isoengpt-BR
dc.publisherScience of Computer Programmingpt-BR
dc.relation.ispartofseriesVolume 96, Part 2, Pages 191- 210, December 2014pt-BR
dc.rights2014 Elsevier B.V. All rights reserved.pt-BR
dc.subjectExtensible languagespt-BR
dc.subjectAdaptable grammarspt-BR
dc.subjectPEGpt-BR
dc.titleThe formalization and implementation of Adaptable Parsing Expression Grammarsen
dc.typeArtigopt-BR

Files

Original bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
artigo.pdf
Size:
389.12 KB
Format:
Adobe Portable Document Format
Description:
texto completo

License bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
license.txt
Size:
1.71 KB
Format:
Item-specific license agreed upon to submission
Description:

Collections