Parse::Native

Perl extension for parsing in your native language (perl!)
Download

Parse::Native Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Greg London
  • Publisher web site:
  • http://search.cpan.org/~gslondon/

Parse::Native Tags


Parse::Native Description

Perl extension for parsing in your native language (perl!) Parse::Native is a Perl extension for parsing in your native language.SYNOPSIS use Parse::Native; Grammar NameOfMyGrammar; Rule NameOfMyRule; sub Parse { lit 'Hello'; lit ','; rule 'identifier'; lit '!' } EndGrammar; Parse::Native is yet another parser that you can use to write grammars for parsing some arbitrary input. However, Parse::Native allows you to write your grammar as pure perl code. This provides some advantages over parsers that use intermediate languages to define their grammars.When a parser uses an intermediary language to define its grammar, the grammar goes through some translation and is converted into perl code. Design errors in the intermediate grammar cause run time errors in the final perl code. But these run time errors are reported in reference to the generated perl code. This leaves the task of determining what part of the intermediate grammar caused the run time error in the generated perl code. This is especially troublesome when the intermediate grammar allows users to embed perl code within their grammar (actions). This embedded code is cut and pasted into the generated code by the parser. If a run time error occurs while running the user-written code within the generated code, perl will report an error using filenames and line numbers that refer to the generated code, leaving it to the user to determine where the error occurred within the intermediate grammar. Requirements: · Perl


Parse::Native Related Software