The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Lang::Tree::Builder - Build Classes from a Tree Definition File

SYNOPSIS

  use Lang::Tree::Builder;
  my $builder = new Lang::Tree::Builder(%params);
  $builder->build($config_file);

DESCRIPTION

Lang::Tree::Builder takes a set of parameters and a tree definition file and uses Template::Toolkit to generate perl classes and an API.

It is intended primarily to take the drudgery out of writing all of the support classes needed to build abstract syntax trees.

new

  my $builder = new Lang::Tree::Builder(%params);

%params are

dir

The output directory, default ./

prefix

A prefix class prepended to all generated classes, default none. If a prefix is provided, it is used literally. i.e. if you want MyPrefix:: you must supply the :: explicitly.

lang

The language of the generated classes.

build

  $builder->build($config_file);

Builds the tree classes, API and Visitor from definitions in the $config_file.

AUTHOR

  Bill Hails <me@billhails.net>

SEE ALSO

Full documentation is in the command line interface treebuild.