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 -maxlevel logOption1 -minlevel logOption2 -marpa_bnf_file aMarpaSLIF-DSLFileName -raw_tree_file aTextFileName -user_bnf_file aUserSLIF-DSLFileName
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 SLIF-DSL file.
This file ships with Marpa::R2, in the meta/ directory. It's name is metag.bnf.
A copy, as of Marpa::R2 V 2.066000, ships with MarpaX::Grammar::Parser.
See data/metag.bnf.
This option is mandatory.
This option affects Log::Handler.
See the Log::handler docs.
Default: 'info'.
Default: 'error'.
No lower levels are used.
The name of the text file to write containing the grammar as a raw tree.
Specify the name of the file containing your Marpa::R2-style grammar.
See data/stringparser.bnf for a sample.
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.