Ron Savage

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
        -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.

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 aMarpaSLIF-DSLFileName

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.

Default: ''.

o -maxlevel logOption1

This option affects Log::Handler.

See the Log::handler docs.

Default: 'info'.

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 -user_bnf_file aUserSLIF-DSLFileName

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

See data/stringparser.bnf for a sample.

This option is mandatory.

Default: ''.




Hosting generously
sponsored by Bytemark