#include <expressionbuilder.h>
Inheritance diagram for UTAP::ExpressionBuilder:
Public Member Functions | |
ExpressionBuilder (TimedAutomataSystem *) | |
ExpressionFragments & | getExpressions () |
virtual void | addPosition (uint32_t position, uint32_t offset, uint32_t line, std::string path) |
Add mapping from an absolute position to a relative XML element. | |
virtual void | handleError (std::string) |
virtual void | handleWarning (std::string) |
virtual void | typeDuplicate () |
Duplicate type at the top of the type stack. | |
virtual void | typePop () |
Pop type at the topof the type stack. | |
virtual void | typeBool (PREFIX) |
Called whenever a boolean type is parsed. | |
virtual void | typeInt (PREFIX) |
Called whenever an integer type is parsed. | |
virtual void | typeBoundedInt (PREFIX) |
Called whenever an integer type with a range is parsed. | |
virtual void | typeChannel (PREFIX) |
Called whenever a channel type is parsed. | |
virtual void | typeClock () |
Called whenever a clock type is parsed. | |
virtual void | typeVoid () |
Called whenever a void type is parsed. | |
virtual void | typeScalar (PREFIX) |
Called whenever a scalar type is parsed. | |
virtual void | typeName (PREFIX, const char *name) |
Called when a type name has been parsed. | |
virtual bool | isType (const char *) |
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 bool | isLocation (const char *) |
virtual void | exprTrue () |
virtual void | exprFalse () |
virtual void | exprId (const char *varName) |
virtual void | exprNat (int32_t) |
virtual void | exprCallBegin () |
virtual void | exprCallEnd (uint32_t n) |
virtual void | exprArray () |
virtual void | exprPostIncrement () |
virtual void | exprPreIncrement () |
virtual void | exprPostDecrement () |
virtual void | exprPreDecrement () |
virtual void | exprAssignment (Constants::kind_t op) |
virtual void | exprUnary (Constants::kind_t unaryop) |
virtual void | exprBinary (Constants::kind_t binaryop) |
virtual void | exprInlineIf () |
virtual void | exprComma () |
virtual void | exprDot (const char *) |
virtual void | exprDeadlock () |
virtual void | exprForAllBegin (const char *name) |
virtual void | exprForAllEnd (const char *name) |
virtual void | exprExistsBegin (const char *name) |
virtual void | exprExistsEnd (const char *name) |
Protected Member Functions | |
void | pushFrame (frame_t) |
Push a new frame. | |
void | popFrame () |
Pop the topmost frame. | |
bool | resolve (std::string, symbol_t &) |
expression_t | makeConstant (int value) |
type_t | applyPrefix (PREFIX, type_t type) |
Given a prefix and a type, this method creates a new type by applying the prefix. | |
virtual bool | allowProcessReferences () |
If this method returns true, it is allowed to access the private identifiers of a process by prefixing the identifier with the process name. | |
Protected Attributes | |
ExpressionFragments | fragments |
Expression stack. | |
TypeFragments | typeFragments |
Type stack. | |
std::stack< frame_t > | frames |
Frame stack. | |
TimedAutomataSystem * | system |
Pointer to the system under construction. | |
template_t * | currentTemplate |
The template currently being parsed. | |
int32_t | scalar_count |
Counter for creating unique scalarset names. | |
Classes | |
class | ExpressionFragments |
class | TypeFragments |
In order to support quantifier expressions, this class also handles the type related methods.
This class does not implement any declaration related methods.
Internally, three stacks are maintained: One for expressions, one for types and for frames (scopes).
|
|
|
Add mapping from an absolute position to a relative XML element.
Implements UTAP::ParserBuilder. |
|
If this method returns true, it is allowed to access the private identifiers of a process by prefixing the identifier with the process name. This is only interesting when parsing properties. In this case the method should be overridden by a sub class. |
|
Given a prefix and a type, this method creates a new type by applying the prefix. TypeExceptions might be thrown if the combination of the prefix and the type is illegal. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. Reimplemented in UTAP::SystemBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
|
|
Implements UTAP::ParserBuilder. |
|
Implements UTAP::ParserBuilder. |
|
Reimplemented from UTAP::AbstractBuilder. |
|
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.
Reimplemented from UTAP::AbstractBuilder. |
|
|
|
Pop the topmost frame.
|
|
Push a new frame.
|
|
|
|
Called whenever a boolean type is parsed.
Reimplemented from UTAP::AbstractBuilder. |
|
Called whenever an integer type with a range is parsed. Expressions for the lower and upper have been pushed before. Reimplemented from UTAP::AbstractBuilder. |
|
Called whenever a channel type is parsed.
Reimplemented from UTAP::AbstractBuilder. |
|
Called whenever a clock type is parsed.
Reimplemented from UTAP::AbstractBuilder. |
|
Duplicate type at the top of the type stack.
Reimplemented from UTAP::AbstractBuilder. |
|
Called whenever an integer type is parsed.
Reimplemented from UTAP::AbstractBuilder. |
|
Called when a type name has been parsed. Prefix indicates whether the type named was prefixed (e.g. with 'const'). Reimplemented from UTAP::AbstractBuilder. |
|
Pop type at the topof the type stack.
Reimplemented from UTAP::AbstractBuilder. |
|
Called whenever a scalar type is parsed. The size of the scalar set was pushed as an expression before. Reimplemented from UTAP::AbstractBuilder. |
|
Called whenever a void type is parsed.
Reimplemented from UTAP::AbstractBuilder. |
|
The template currently being parsed.
|
|
Expression stack.
|
|
Frame stack.
|
|
Counter for creating unique scalarset names.
|
|
Pointer to the system under construction.
|
|
Type stack.
|