PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` =pod =for comment DO NOT EDIT. This Pod was generated by Swim v0.1.48. See http://github.com/ingydotnet/swim-pm#readme =encoding utf8 =head1 NAME Pegex - Acmeist PEG Parser Framework =head1 VERSION This document describes L version B<0.75>. =head1 SYNOPSIS use Pegex; my $result = pegex($grammar)->parse($input); or with options: use Pegex; use ReceiverClass; my $parser = pegex($grammar, 'ReceiverClass'); my $result = $parser->parse($input); or more explicitly: use Pegex::Parser; use Pegex::Grammar; my $pegex_grammar = Pegex::Grammar->new( text => $grammar, ); my $parser = Pegex::Parser->new( grammar => $pegex_grammar, ); my $result = $parser->parse($input); or customized explicitly: { package MyGrammar; use Pegex::Base; extends 'Pegex::Grammar'; has text => "your grammar definition text goes here"; has receiver => "MyReceiver"; } { package MyReceiver; use base 'Pegex::Receiver'; got_some_rule { ... } got_other_rule { ... } } use Pegex::Parser; my $parser = Pegex::Parser->new( grammar => MyGrammar->new, receiver => MyReceiver->new, ); $parser->parse($input); my $result = $parser->receiver->data; =head1 DESCRIPTION Pegex is an Acmeist parser framework. It allows you to easily create parsers that will work equivalently in lots of programming languages! The inspiration for Pegex comes from the parsing engine upon which the postmodern programming language B is based on. Pegex brings this beauty to the other Imodern languages that have a normal regular expression engine available. Pegex gets it name by combining Parsing Expression Grammars (PEG), with Regular Expressions (Regex). That's actually what Pegex does. PEG is the cool new way to elegantly specify recursive descent grammars. The Perl 6 language is defined in terms of a self modifying PEG language called B. Regexes are familiar to programmers of most modern programming languages. Pegex defines a simple PEG syntax, where all the terminals are regexes. This means that Pegex can be quite fast and powerful. Pegex attempts to be the simplest way to define new (or old) Domain Specific Languages (DSLs) that need to be used in several programming languages and environments. Things like JSON, YAML, Markdown etc. It also great for writing parsers/compilers that only need to work in one language. =head1 USAGE The C module itself (this module) is just a trivial way to use the Pegex framework. It is only intended for the simplest of uses. This module exports a single function, C, which takes a Pegex grammar string as input. You may also pass a receiver class name after the grammar. my $parser = pegex($grammar, 'MyReceiver'); The C function returns a L object, on which you would typically call the C method, which (on success) will return a data structure of the parsed data. See L for more details. =head1 PEGEX DEBUGGING Pegex (Pegex::Parser) has many easy to use methods of debugging. See the "Debugging" section of L for details. =head1 SEE ALSO =over =item * L =item * L =item * L =item * L =item * L =item * L =item * L =item * L =back =head1 AUTHOR Ingy döt Net =head1 COPYRIGHT AND LICENSE Copyright 2010-2020. Ingy döt Net. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L =cut