Main Page   Compound List   Compound Members   Examples  

TPT::Parser Class Reference

#include <parse.h>

List of all members.

Public Methods

 Parser (Buffer &buf)
 Parser (Buffer &buf, const Symbols &st)
 ~Parser ()
std::string run ()
bool run (std::ostream &os)
bool syntax ()
unsigned geterrorcount () const
bool geterrorlist (ErrorList &errlist)


Detailed Description

The Parser class accepts a buffer of the template to be parsed.

Author:
Isaac W. Foraker
Exceptions:
tptexception 


Constructor & Destructor Documentation

TPT::Parser::Parser Buffer   buf
 

Construct a Parser for a Buffer.

Parameters:
buf  Reference to buffer containing source template.
Returns:
nothing

TPT::Parser::Parser Buffer   buf,
const Symbols   st
 

Construct a Parser for a Buffer and Symbols table.

Parameters:
buf  Reference to Buffer containing source template.
st  Reference to Symbols table.
Returns:
nothing

TPT::Parser::~Parser  
 

Destruct this Parser.

Parameters:
none 
Returns:
nothing


Member Function Documentation

unsigned TPT::Parser::geterrorcount   const
 

Get the number of errors and warnings.

Parameters:
none 
Returns:
0 is good.

bool TPT::Parser::geterrorlist ErrorList &    errlist
 

Copy the errors and warnings generated by the last parse into the specified array.

Parameters:
errlist  Reference to array to receive list.
Returns:
false if no errors; true if errors copied.

bool TPT::Parser::run std::ostream &    os
 

Parse the template in Buffer, outputing the result to the given stream while parsing.

Parameters:
os  Reference to an output stream to write.
Returns:
false on success; true if there were errors or warnings.

std::string TPT::Parser::run  
 

Parse the template in Buffer and return the result as a string.

Note: This method is provided for completeness, but the preferred method of parsing is to use streams instead.

Parameters:
none 
Returns:
String containing parsed text.

bool TPT::Parser::syntax  
 

Perform only syntax checking on Buffer.

Parameters:
none 
Returns:
false on success; true if there were errors or warnings.


The documentation for this class was generated from the following files:
Generated on Sun Jan 20 23:40:47 2002 for LibTPT by doxygen1.2.13 written by Dimitri van Heesch, © 1997-2001