The main class used to parse an input string when given a language.
Specifically, this class contains a ParseData object and is
responsible for parsing an input string. This it does via its
Language class and the Language included ParseTypes. In
particular, while data remains to be parsed in the input string,
the Parser uses Language to find the proper ParseType. It then
calls this ParseType on the ParseData to parse one object. After
parsing is complete, the Parser does some upkeep on the Operators
and returns the resulting Node at the top of the Node stack.
- Source:
- parser.h:34
- Author:
- Jonathan Kitchens
- Version:
- v0.9
- See Also:
- ParseType, Language, ParseData
| Entity | Type | Scope | Short Description |
| ~Parser | destructor | public | automatically generated |
| Parser | constructor | public | The only constructor for this class; accepts a Language
pointer.
|
| Parser | constructor | public | automatically generated |
| GetData | method | public | Returns a pointer to the ParseData structure in the
Parser.
|
| GetLast | method | public | Returns the top of the Node stack, which corresponds to the
last value returned by the parser.
|
| operator = | operator | public | automatically generated |
| Parse | method | public | The main parsing function.
|
automatically generated
- Source:
- parser.h
- Code:
-
constructor Parser | ? ^
< > |
The only constructor for this class; accepts a Language
pointer.
The language pointer is essential to the Parser because it
defines the ParseTypes which need to be used to transform
the data from string to Node stack.
- Source:
- parser.h:47
- Author:
- Jonathan Kitchens
- Version:
- v0.9
- Code:
-
constructor Parser | ? ^
< > |
automatically generated
- Source:
- parser.h
- Code:
| public Parser ( | const Parser & ) |
Returns a pointer to the ParseData structure in the
Parser.
This function allows extension of the Parser by allowing
more open access to the data included during parsing.
- Source:
- parser.h:81
- Author:
- Jonathan Kitchens
- Version:
- v0.9
- Code:
-
Returns the top of the Node stack, which corresponds to the
last value returned by the parser.
- Source:
- parser.h:69
- Author:
- Jonathan Kitchens
- Version:
- v0.9
- Code:
| public Node * GetLast ( | ) const |
automatically generated
- Source:
- parser.h
- Code:
| public Parser & operator = ( | const Parser & ) |
The main parsing function.
Performs a complete parsing of the string (according to the
current Language. It then performs slight upkeep and
returns the Node left at the top of the Node stack. If the
stack is left empty, returns NULL.
- Source:
- parser.h:60
- Author:
- Jonathan Kitchens
- Version:
- v0.9
- Code:
| public Node * Parse ( | const string & s ) |
Created Sun Oct 6 21:22:16 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.