Generating flex lexical scanners for perl parse:: Yapp

Perl is known for its versatile regular expressions. Nevertheless, using Perl regular expressions for creating fast lexical analyzer is not easy. As an alternative, the authors defend the automated generation of the lexical analyzer in a well known fast application (flex) based on a simple Perl defi...

ver descrição completa

Detalhes bibliográficos
Autor principal: Simões, Alberto (author)
Outros Autores: Carvalho, Nuno (author), Almeida, J. J. (author)
Formato: conferencePaper
Idioma:eng
Publicado em: 2012
Assuntos:
Texto completo:http://hdl.handle.net/1822/23572
País:Portugal
Oai:oai:repositorium.sdum.uminho.pt:1822/23572
Descrição
Resumo:Perl is known for its versatile regular expressions. Nevertheless, using Perl regular expressions for creating fast lexical analyzer is not easy. As an alternative, the authors defend the automated generation of the lexical analyzer in a well known fast application (flex) based on a simple Perl definition in the syntactic analyzer. In this paper we extend the syntax used by Parse::Yapp, one of the most used parser generators for Perl, making the automatic generation of flex lexical scanners possible. We explain how this is performed and conclude with some benchmarks that show the relevance of the approach.