#include <builder.h>
Inheritance diagram for UTAP::ParserBuilder:
Public Member Functions | |
virtual | ~ParserBuilder () |
virtual void | setErrorHandler (ErrorHandler *)=0 |
Set the error handler to the given handler. | |
virtual void | setPosition (const position_t &)=0 |
Sets the current position. | |
virtual bool | isType (const char *)=0 |
Must return true if and only if name is registered in the symbol table as a named type, for instance, "int" or "bool" or a user defined type. | |
virtual void | typeName (int32_t prefix, const char *name, int range)=0 |
Called when a type name has been parsed. | |
virtual void | typeStruct (int32_t prefix, uint32_t fields)=0 |
Called when a struct-type has been parsed. | |
virtual void | structField (const char *name, uint32_t dim)=0 |
Called to declare a field of a structure. | |
virtual void | structFieldEnd ()=0 |
Called at the end of a series of field declarations of the same type. | |
virtual void | declTypeDef (const char *name, uint32_t dim)=0 |
Used when a typedef declaration was parsed. | |
virtual void | declTypeDefEnd ()=0 |
Called at the end of a series of type name declarations of the same type. | |
virtual void | declVar (const char *name, uint32_t dim, bool init)=0 |
Called to when a variable declaration has been parsed. | |
virtual void | declVarEnd ()=0 |
Called at the end of a series of variable declarations of the same type. | |
virtual void | declInitialiserList (uint32_t num)=0 |
virtual void | declFieldInit (const char *name)=0 |
virtual void | declProgress (bool hasGuard)=0 |
Guard progress measure declaration. | |
virtual void | declParameter (const char *name, bool reference, uint32_t dim)=0 |
virtual void | declParameterEnd ()=0 |
virtual void | declFuncBegin (const char *name, uint32_t n)=0 |
virtual void | declFuncEnd ()=0 |
virtual void | procTemplateSet (const char *name)=0 |
virtual void | procBegin (const char *name, uint32_t m, uint32_t n)=0 |
virtual void | procEnd ()=0 |
virtual void | procState (const char *name, bool hasInvariant)=0 |
virtual void | procStateCommit (const char *name)=0 |
virtual void | procStateUrgent (const char *name)=0 |
virtual void | procStateWinning (const char *name)=0 |
virtual void | procStateLosing (const char *name)=0 |
virtual void | procStateInit (const char *name)=0 |
virtual void | procEdgeBegin (const char *from, const char *to, const bool control)=0 |
virtual void | procEdgeEnd (const char *from, const char *to)=0 |
virtual void | procSelect (const char *id)=0 |
virtual void | procGuard ()=0 |
virtual void | procSync (Constants::synchronisation_t type)=0 |
virtual void | procUpdate ()=0 |
virtual void | blockBegin ()=0 |
virtual void | blockEnd ()=0 |
virtual void | emptyStatement ()=0 |
virtual void | forBegin ()=0 |
virtual void | forEnd ()=0 |
virtual void | iterationBegin (const char *name)=0 |
virtual void | iterationEnd (const char *name)=0 |
virtual void | whileBegin ()=0 |
virtual void | whileEnd ()=0 |
virtual void | doWhileBegin ()=0 |
virtual void | doWhileEnd ()=0 |
virtual void | ifBegin ()=0 |
virtual void | ifElse ()=0 |
virtual void | ifEnd (bool)=0 |
virtual void | breakStatement ()=0 |
virtual void | continueStatement ()=0 |
virtual void | switchBegin ()=0 |
virtual void | switchEnd ()=0 |
virtual void | caseBegin ()=0 |
virtual void | caseEnd ()=0 |
virtual void | defaultBegin ()=0 |
virtual void | defaultEnd ()=0 |
virtual void | exprStatement ()=0 |
virtual void | returnStatement (bool)=0 |
virtual void | exprFalse ()=0 |
virtual void | exprTrue ()=0 |
virtual void | exprId (const char *varName)=0 |
virtual void | exprNat (int32_t)=0 |
virtual void | exprCallBegin ()=0 |
virtual void | exprCallEnd (uint32_t n)=0 |
virtual void | exprArg (uint32_t n)=0 |
virtual void | exprArray ()=0 |
virtual void | exprPostIncrement ()=0 |
virtual void | exprPreIncrement ()=0 |
virtual void | exprPostDecrement ()=0 |
virtual void | exprPreDecrement ()=0 |
virtual void | exprAssignment (Constants::kind_t op)=0 |
virtual void | exprUnary (Constants::kind_t unaryop)=0 |
virtual void | exprBinary (Constants::kind_t binaryop)=0 |
virtual void | exprInlineIf ()=0 |
virtual void | exprComma ()=0 |
virtual void | exprDot (const char *)=0 |
virtual void | exprDeadlock ()=0 |
virtual void | exprForAllBegin (const char *name)=0 |
virtual void | exprForAllEnd (const char *name)=0 |
virtual void | instantiationBegin (const char *id, const char *templ)=0 |
virtual void | instantiationEnd (const char *id, const char *templ, uint32_t n)=0 |
virtual void | process (const char *)=0 |
virtual void | done ()=0 |
virtual void | quit () |
virtual void | property (Constants::kind_t kind, int line) |
virtual void | beforeUpdate ()=0 |
virtual void | afterUpdate ()=0 |
virtual void | lowPriority (const char *)=0 |
virtual void | samePriority (const char *)=0 |
virtual void | higherPriority (const char *)=0 |
Static Public Attributes | |
static const int32_t | PREFIX_NONE = 0 |
static const int32_t | PREFIX_CONST = 1 |
static const int32_t | PREFIX_URGENT = 2 |
static const int32_t | PREFIX_BROADCAST = 4 |
static const int32_t | PREFIX_URGENT_BROADCAST |
static const int32_t | PREFIX_META = 8 |
The parser itself will only parse the system - it will not actually store or otherwise process the input. Instead, the parser is configured with an implementation of the ParserBuilder interface. Productions in the BNF implemented by the parser correspond to methods in the ParserBuilder interface.
Errors (such as type errors) can be reported back to the parser by either throwing a TypeException or by calling an error method in the ErrorHandler that has been set by a call to setErrorHandler().
Expressions are reported in reverse polish notation using the exprXXX methods.
The proper protocol for declaring a new type name is to
The proper protocol for declaring a variable is to
|
|
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Guard progress measure declaration. Requires two expressions if hasGuard is true, otherwise one. Implemented in UTAP::AbstractBuilder, and UTAP::SystemBuilder. |
|
Used when a typedef declaration was parsed. name is the name of the new type, and dim is the dimension of array types. Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Called at the end of a series of type name declarations of the same type.
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Called to when a variable declaration has been parsed.
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Called at the end of a series of variable declarations of the same type.
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Must return true if and only if name is registered in the symbol table as a named type, for instance, "int" or "bool" or a user defined type.
Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Reimplemented in UTAP::AbstractBuilder. |
|
|
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, and UTAP::SystemBuilder. |
|
Set the error handler to the given handler. Errors are reported by calling this handler or by throwing a TypeException. Implemented in UTAP::AbstractBuilder, and UTAP::PrettyPrinter. |
|
Sets the current position. The current position indicates where in the input file the current productions can be found. Implemented in UTAP::AbstractBuilder, and UTAP::PrettyPrinter. |
|
Called to declare a field of a structure. The type of the field has been reported using a typeXXX method prior to the call of structField(). In case of array fields, 'dim' expressions indicating the array sizes have been reported. Implemented in UTAP::AbstractBuilder, and UTAP::SystemBuilder. |
|
Called at the end of a series of field declarations of the same type.
Implemented in UTAP::AbstractBuilder, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, and UTAP::SystemBuilder. |
|
Called when a type name has been parsed. Prefix indicates whether the type named was prefixed (e.g. with 'const'). The range argument indicates whether a range was given for the type (in that case two expressions were reported using the exprXXX methods). Implemented in UTAP::AbstractBuilder, UTAP::ExpressionBuilder, and UTAP::PrettyPrinter. |
|
Called when a struct-type has been parsed. Prior to the call 'fields' fields must have been declared using the structXXX methods. Implemented in UTAP::AbstractBuilder, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
Implemented in UTAP::AbstractBuilder, UTAP::PrettyPrinter, and UTAP::SystemBuilder. |
|
|
|
|
|
|
|
|
|
|
|
Initial value: |