Text::UberText::Parser - Main parser for UberText streams
Text::UberText::Parser methods are not normally called directly
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.
Creates a new parser object.
Takes the passed text and saves it for further parsing. If called multiple times, it appends the new text to any previous text passed.
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.
Wipes out the internal document input data.
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.
Chris Josephes <cpj1@visi.com>
Text::UberText::Tree, Text::UberText::Node
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. ~
To install Text::UberText, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::UberText
CPAN shell
perl -MCPAN -e shell install Text::UberText
For more information on module installation, please visit the detailed CPAN module installation guide.