bnf2tree.pl - Convert a Marpa grammar into a tree using Tree::DAG_Node.
bnf2tree.pl [options]
Options: -bind_attributes Boolean -cooked_tree_file aTextFileName -help -logger aLog::HandlerObject -marpa_bnf_file aMarpaBNFFileName -maxlevel logOption1 -minlevel logOption2 -raw_tree_file aTextFileName -rules_file aTextFileName -user_bnf_file aUserBNFFileName -verbose $Boolean
Exit value: 0 for success, 1 for failure. Die upon error.
Include (1) or exclude (0) attributes in the tree file(s) output.
Default: 0.
The name of the text file to write containing the grammar as a cooked tree.
If '', the file is not written.
Default: ''.
Print help and exit.
By default, an object is created which prints to STDOUT.
Set this to '' to stop logging.
Default: undef.
Specify the name of Marpa's own BNF file.
This file ships with Marpa::R2's file as share/metag.bnf.
This option is mandatory.
This option affects Log::Handler.
See the Log::Handler docs.
Nothing is printed by default.
Default: 'notice'.
Default: 'error'.
No lower levels are used.
The name of the text file to write containing the grammar as a raw tree.
The name of the text file to write containing the BNF generated from parsing the input.
Specify the name of the file containing your Marpa::R2-style grammar.
See share/stringparser.bnf for a sample.
Display more or less during debugging.
To install MarpaX::Grammar::Parser, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MarpaX::Grammar::Parser
CPAN shell
perl -MCPAN -e shell install MarpaX::Grammar::Parser
For more information on module installation, please visit the detailed CPAN module installation guide.