#include <iparser_spec.hh>
Inheritance diagram for IParserSpec:
Public Methods | |
virtual IEbnfNodeBuilder& | getEbnfNodeBuilder ()=0 |
virtual void | addProduction (const string &name, const string &retTypeName, const Position &retTypePos, const string &formalArgs, const Position &formalArgsPos, const string &exceptList, const Position &exceptListPos, const string &preambleCode, const Position &preambleCodePos, EbnfNode *expansion, const Position &pos)=0 throw (ParseException) |
virtual void | setPreambleCode (const string &block, const Position &pos)=0 |
virtual void | setClassName (const string &className)=0 |
virtual void | setInheritance (const string &inheritance, const Position &pos)=0 |
virtual void | addCodeBlock (const string &block, const Position &pos)=0 |
virtual void | dump (ostream &os) const=0 |
An object the implements this inetrface must be created and passed to an IParser implementation which will fill in the parser's data by calling the appropriate methods of this interface and those of IEbnfNodeBuilder.
Definition at line 71 of file iparser_spec.hh.
|
Returns a reference to an ebnf node builder that will create the productions' oarse trees suitable for this parser spec representation. Reimplemented in ParserSpec. Referenced by LexYaccParser::parse().
|
|
Adds a new production declaration to this parser spec. name is the production's name formalArgs is a string containing the list of formal arguments declarations, in the same order as they appeared into the production's declarastion, without the enclosing parentheses. exceptList is the list of exception type identifiers that can be thrown from this production. preambleCode is the first block of user code of this production. expansion the EBNF expansion's parse tree. Can be null. All the Position arguments (except the last one) represent the textual position of the previous argument in the list.
Reimplemented in ParserSpec. Referenced by IParserSpec_addProduction().
|
|
Sets the preamble block to the given string, which must be the block of code that preceded the syntax section in the input grammar file, without the enclosing brackets. Reimplemented in ParserSpec. Referenced by IParserSpec_setPreambleCode().
|
|
Stes the parser's class name. Reimplemented in ParserSpec. Referenced by IParserSpec_setClassName().
|
|
Specifies an inheritance string for the parser's class. Reimplemented in ParserSpec. Referenced by IParserSpec_setInheritance().
|
|
Adds a block of user code to the scanner spec. The block string is a block of code found inside the syntax section, without the enclosing brackets. Reimplemented in ParserSpec. Referenced by IParserSpec_addCodeBlock().
|
|
If DEBUG is enabled, this method will dump all the data currently contained into this spec into the given stream Reimplemented in ParserSpec. Referenced by LexYaccParser::parse().
|