NAME

bnf2tree.pl - Convert a Marpa grammar into a tree using Tree::DAG_Node.

SYNOPSIS

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.

OPTIONS

o -bind_attributes Boolean

Include (1) or exclude (0) attributes in the tree file(s) output.

Default: 0.

o -cooked_tree_file aTextFileName

The name of the text file to write containing the grammar as a cooked tree.

If '', the file is not written.

Default: ''.

o -help

Print help and exit.

o -logger aLog::HandlerObject

By default, an object is created which prints to STDOUT.

Set this to '' to stop logging.

Default: undef.

o -marpa_bnf_file aMarpaBNFFileName

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.

Default: ''.

o -maxlevel logOption1

This option affects Log::Handler.

See the Log::Handler docs.

Nothing is printed by default.

Default: 'notice'.

o -minlevel logOption2

This option affects Log::Handler.

See the Log::Handler docs.

Default: 'error'.

No lower levels are used.

o -raw_tree_file aTextFileName

The name of the text file to write containing the grammar as a raw tree.

If '', the file is not written.

Default: ''.

o -rules_file aTextFileName

The name of the text file to write containing the BNF generated from parsing the input.

If '', the file is not written.

Default: ''.

o -user_bnf_file aUserBNFFileName

Specify the name of the file containing your Marpa::R2-style grammar.

See share/stringparser.bnf for a sample.

This option is mandatory.

Default: ''.

o -verbose $Boolean

Display more or less during debugging.

Default: 0.