Hosting courtesy of Sourceforge

SourceForge Logo
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Parse::SimpleParser Class Reference

#include <Parse.h>

Inheritance diagram for Parse::SimpleParser:

Inheritance graph
[legend]
Collaboration diagram for Parse::SimpleParser:

Collaboration graph
[legend]
List of all members.

Public Methods

 SimpleParser (istream &inputFile)
virtual void read ()

Detailed Description

Fairly simple (hence the name) Parser implementation. It relies on Parser's implementation for everything other than the reading
See also:
Parse::SimpleParser::read() , Parse::Parser

Definition at line 95 of file Parse.h.


Constructor & Destructor Documentation

Parse::SimpleParser::SimpleParser std::istream &    inputFile
 

SimpleParser constructor Just kicks pack the duty to the base class constructor

Definition at line 46 of file Parse.cpp.


Member Function Documentation

void Parse::SimpleParser::read   [virtual]
 

Reads from istream passed in constructor.
Suitable for recursively parsing different sub-lists
This parser recognizes 4 different tokens

'#' - perl/shell script style comment. It reads this and continues eats the rest of the line
'=' - simple identifier. Generally used one on a line, signals that a single value will be read matching the identifier
'{' - new list starter identifier. Usually used to pass the parsing onto a different sub-parser. subparsers of the same type (SimpleParser) work fine
'}' - list ender. Causes the parser to terminate

NOTE: identifiers are not case sensative.
See ParseTestMain.cpp for an example of using a SimpleParser for lists with sublists

Reimplemented from Parse::Parser.

Definition at line 54 of file Parse.cpp.


The documentation for this class was generated from the following files:
Generated on Tue May 21 07:26:58 2002 for BomberLAN by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001