Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

GrammarBase Class Reference

Abstract prototype of a grammar. More...

#include <grammarbase.h>

Inheritance diagram for GrammarBase:

UserOfTextCodec KYGrammar List of all members.

Public Methods

 GrammarBase (void)
 A constructor.

virtual ~GrammarBase (void)
 A destructor. More...

virtual void setAlphabetBaseSize (size_t size)=0
 Set the base size of terminal alphabet. More...

virtual void append (TerminalValue value)=0
 Append one terminal symbol to the root rule of the grammar. More...

virtual void flush (void)=0
 Ensure that all appended terminal symbols have been processed. More...

virtual void print (void)=0
 Print contents of the grammar. More...

virtual void reconstructInput (void)=0
 Reconstruct data represented by the grammar. More...


Detailed Description

Abstract prototype of a grammar.

This class represents an abstract prototype for all grammars.

Definition at line 41 of file grammarbase.h.


Constructor & Destructor Documentation

virtual GrammarBase::~GrammarBase void    [inline, virtual]
 

A destructor.

Does nothing.

Definition at line 53 of file grammarbase.h.


Member Function Documentation

virtual void GrammarBase::append TerminalValue    value [pure virtual]
 

Append one terminal symbol to the root rule of the grammar.

Parameters:
value  Appended terminal symbol.
This method is used for appending one terminal symbol to the root rule of the grammar.

Implemented in KYGrammar.

Referenced by XmlSimpleModel::manageEvent, and XmlAdaptiveModel::manageEvent.

virtual void GrammarBase::flush void    [pure virtual]
 

Ensure that all appended terminal symbols have been processed.

See also:
append()
Appending a terminal symbol by append() doesn't necessarily mean that this symbol will be immediately processed. Depending on its implementation, the grammar sometimes can (for whatever reason) wait for larger number of terminal symbols. Call to flush() ensures that all appended symbols are processed.

Implemented in KYGrammar.

virtual void GrammarBase::print void    [pure virtual]
 

Print contents of the grammar.

This method outputs a human-readable representation of the grammar on the standard output.

Implemented in KYGrammar.

virtual void GrammarBase::reconstructInput void    [pure virtual]
 

Reconstruct data represented by the grammar.

Call to this method results in reconstruction of the data represented by the grammar.

Implemented in KYGrammar.

virtual void GrammarBase::setAlphabetBaseSize size_t    size [pure virtual]
 

Set the base size of terminal alphabet.

Parameters:
size  Size of the alphabet.
Call this method if you want to override a default size (256) of the terminal alphabet.

Implemented in KYGrammar.

Referenced by XmlSimpleModel::manageEvent, and XmlAdaptiveModel::manageEvent.


The documentation for this class was generated from the following file:
Generated on Wed Feb 5 10:43:05 2003 for Exalt by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002