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

NAME

Text::UberText::Parser - Main parser for UberText streams

SYNOPSIS

Text::UberText::Parser methods are not normally called directly

DESCRIPTION

The UberText::Parser module handles the incoming text stream and breaks it up into the text and command nodes. The nodes are then handed off to a Text::UberText::Tree object which creates the Text::UberText::Node objects and inserts them at the appropriate part of the document tree.

METHODS

$parser=Text::UberText::Parser->new();

Creates a new parser object.

$parser->input(@array);

Takes the passed text and saves it for further parsing. If called multiple times, it appends the new text to any previous text passed.

$tree=$parser->parse();

Runs the parsing routines to break apart the document. The commands and text of the document are seperated into nodes and passed to the Text::UberText::Tree object which places them in the appropriate order. The tree object is then returned so it can be run or further manipulated.

$parser->clear();

Wipes out the internal document input data.

$parser->quickie(@array);

Designed to quickly process small streams (like the values tied to commands or options in a Command node), the quickie method takes the input, and sends it to a new parser object, processes the input, returns a new tree, runs the tree, and then returns the output from the tree object.

The quickie method is actually very complex because it needs to create a seperate Tree object, but it also needs to refer back to the main Dispatch and Log objects. Every time a value is used in an option or command, it is treated like an entirely seperate UberText document.

AUTHOR

Chris Josephes <cpj1@visi.com>

SEE ALSO

Text::UberText::Tree, Text::UberText::Node

COPYRIGHT

Copyright 2002, Chris Josephes. All rights reserved. This module is free software. It may be used, redistributed, and/or modified under the same terms as Perl itself. ~