Parse::Marpa

Generate Parsers from any BNF grammar
Download

Parse::Marpa Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Jeffrey Kegler
  • Publisher web site:
  • http://search.cpan.org/~jkegl/

Parse::Marpa Tags


Parse::Marpa Description

Generate Parsers from any BNF grammar If you can write a grammar in BNF, Marpa will generate a parser for it. That means Marpa can parse left- and right-recursive grammars; all ambiguous grammars, including infinitely ambiguous grammars; grammars with empty rules; and grammars with useless rules.Here's all you need to get started: * This document. * The MDL document. It describes the format of Marpa's grammars. * The Parse::Marpa::Doc::Options document. This one you only need to skim, checking for anything relevant to your application.The Marpa documents use a lot of parsing terminology. For a quick refresher in the standard parsing vocabulary, there's a Parse::Marpa::Doc::Parse_Terms document. Defining uses of terms are in boldface, for easy skimming.SYNOPSIS #!perl use 5.010; use strict; use warnings; use English qw( -no_match_vars ); use Parse::Marpa; # remember to use refs to strings my $value = Parse::Marpa::mdl( ( do { local ($RS) = undef; my $source = ; \$source; } ), \('2+2*3') ); say ${$value}; __DATA__ semantics are perl5. version is 1.006000. start symbol is Expression. Expression: Expression, //, Expression. priority 200. q{ $_ * $_ }. Expression: Expression, //, Expression. priority 100. q{ $_ + $_ }. Expression: /\d+/. q{ $_ }. Requirements: · Perl


Parse::Marpa Related Software