| @root | classes |
class ParseType | ^ |
The ParseType abstract base class for parsing one "type" of Nodes.
This superclass allows each Node to be parsed by different ParseTypes that all fall under the same inherited superclass. It would have been difficult for each node to parse itself (redundant code for operators,etc), and it also would have been difficult and poor design to make the Parser responsible for each type of input. Thus, the Parser subordinates the task of parsing to the ParseTypes contained in the Language class. Each ParseType is responsible for parsing an whole group of Nodes, and each Node subclass should have a ParseType defined for it.
- Source:
- parsetype.hh:23
- Author:
- Jonathan Kitchens
- Version:
- v0.9
Contents | ^ |
Entity Type Scope Short Description ~ParseType destructor public The virtual destructor must be defined. ParseType constructor public automatically generated ParseType constructor public automatically generated IsMyType method public Tests whether or not the next object to be parsed can be handled by this ParseType. operator = operator public automatically generated ParseOne method public Parses the next object in the input string if possible.
destructor ~ParseType | ? ^ > |
The virtual destructor must be defined.
- Source:
- parsetype.hh:31
- Author:
- Jonathan Kitchens
- Version:
- v0.9
- Code:
public virtual ~ ParseType ( )
constructor ParseType | ? ^ < > |
automatically generated
- Source:
- parsetype.hh
- Code:
public ParseType ( )
constructor ParseType | ? ^ < > |
automatically generated
- Source:
- parsetype.hh
- Code:
public ParseType ( const ParseType & )
method IsMyType | ? ^ < > |
Tests whether or not the next object to be parsed can be handled by this ParseType.
This function allows the Language and the Parser class to subordinate the task of parsing an input string. Because each ParseType can recognize and parse itself, the code is very extendable and more object oriented.
- Source:
- parsetype.hh:47
- Author:
- Jonathan Kitchens
- Version:
- v0.9
- See Also:
- Parser, Language
- Code:
public virtual bool IsMyType ( ParseData & myData ) const = 0
operator = | ? ^ < > |
automatically generated
- Source:
- parsetype.hh
- Code:
public ParseType & operator = ( const ParseType & )
method ParseOne | ? ^ < > |
Parses the next object in the input string if possible.
Like IsMyType(), this allows subordinator because the ParseType is able to perform its own parsing when given the ParseData.
- Source:
- parsetype.hh:60
- Author:
- Jonathan Kitchens
- Version:
- v0.9
- See Also:
- ParseData
- Code:
public virtual void ParseOne ( ParseData & myData ) = 0
Created Sun Oct 6 21:22:17 2002.
This documentation was generated automatically by
ccdoc v0.8 r26 2001/11/28 bin_opt_suncc_solaris-2.8.
Click here to submit a bug report or feature request.
Click here to return to the top of the page.