MicroModelicaCCompiler
4.5.3
|
Go to the source code of this file.
Macros | |
#define | MAKE_SPACE for (int __i = 0; __i < block; __i++) ret << " "; |
#define | BEGIN_BLOCK block += 2; |
#define | END_BLOCK block -= 2; |
#define | current_element(it) (*it) |
#define | foreach(it, list) for (it = list->begin(); it != list->end(); it++) |
#define | foreachReverse(it, list) for (it = list->rbegin(); it != list->rend(); it++) |
Typedefs | |
typedef std::set< string > | PreSet_ |
typedef PreSet_ * | PreSet |
typedef bool | AST_Boolean |
typedef string * | AST_String |
typedef int | AST_Integer |
typedef double | AST_Real |
typedef string | AST_Type |
typedef int | AST_TypePrefix |
typedef int | AST_ClassPrefix |
Functions | |
DEFINE_TYPE (AST_Node) | |
DEFINE_TYPE (AST_Argument) | |
DEFINE_TYPE (AST_Argument_Modification) | |
DEFINE_TYPE (AST_Argument_Redeclaration) | |
DEFINE_TYPE (AST_Class) | |
DEFINE_TYPE (AST_Comment) | |
DEFINE_TYPE (AST_Element_Component) | |
DEFINE_TYPE (AST_Composition) | |
DEFINE_TYPE (AST_CompositionElement) | |
DEFINE_TYPE (AST_CompositionEqsAlgs) | |
DEFINE_TYPE (AST_Declaration) | |
DEFINE_TYPE (AST_Element) | |
DEFINE_TYPE (AST_Element_ClassWrapper) | |
DEFINE_TYPE (AST_Equation) | |
DEFINE_TYPE (AST_Equation_Call) | |
DEFINE_TYPE (AST_Equation_Connect) | |
DEFINE_TYPE (AST_Equation_Else) | |
DEFINE_TYPE (AST_Equation_Equality) | |
DEFINE_TYPE (AST_Equation_For) | |
DEFINE_TYPE (AST_Equation_If) | |
DEFINE_TYPE (AST_Equation_When) | |
DEFINE_TYPE (AST_Expression) | |
DEFINE_TYPE (AST_Expression_BinOp) | |
DEFINE_TYPE (AST_Expression_Boolean) | |
DEFINE_TYPE (AST_Expression_BooleanNot) | |
DEFINE_TYPE (AST_Expression_Brace) | |
DEFINE_TYPE (AST_Expression_Call) | |
DEFINE_TYPE (AST_Expression_CallArgs) | |
DEFINE_TYPE (AST_Expression_Colon) | |
DEFINE_TYPE (AST_Expression_ComponentReference) | |
DEFINE_TYPE (AST_Expression_Derivative) | |
DEFINE_TYPE (AST_Expression_End) | |
DEFINE_TYPE (AST_Expression_If) | |
DEFINE_TYPE (AST_Expression_If_ElseIf) | |
DEFINE_TYPE (AST_Expression_Integer) | |
DEFINE_TYPE (AST_Expression_NamedArgument) | |
DEFINE_TYPE (AST_Expression_Null) | |
DEFINE_TYPE (AST_Expression_Output) | |
DEFINE_TYPE (AST_Expression_Range) | |
DEFINE_TYPE (AST_Expression_Real) | |
DEFINE_TYPE (AST_Expression_String) | |
DEFINE_TYPE (AST_Expression_UMinus) | |
DEFINE_TYPE (AST_Expression_ArrayIndex) | |
DEFINE_TYPE (AST_Expression_Bracket) | |
DEFINE_TYPE (AST_External_Function_Call) | |
DEFINE_TYPE (AST_Element_ExtendsClause) | |
DEFINE_TYPE (AST_Element_ImportClause) | |
DEFINE_TYPE (AST_ForIndex) | |
DEFINE_TYPE (AST_ImportClause) | |
DEFINE_TYPE (AST_Modification) | |
DEFINE_TYPE (AST_Modification_Assign) | |
DEFINE_TYPE (AST_Modification_Class) | |
DEFINE_TYPE (AST_Modification_Equal) | |
DEFINE_TYPE (AST_ShortClassExp) | |
DEFINE_TYPE (AST_Statement) | |
DEFINE_TYPE (AST_Statement_Break) | |
DEFINE_TYPE (AST_Statement_Else) | |
DEFINE_TYPE (AST_Statement_Return) | |
DEFINE_TYPE (AST_Statement_When) | |
DEFINE_TYPE (AST_Statement_While) | |
DEFINE_TYPE (AST_Statement_For) | |
DEFINE_TYPE (AST_Statement_If) | |
DEFINE_TYPE (AST_Statement_Assign) | |
DEFINE_TYPE (AST_Statement_OutputAssigment) | |
DEFINE_TYPE (AST_StoredDefinition) | |
DEFINE_LIST (AST_Argument) | |
DEFINE_LIST (AST_Class) | |
DEFINE_LIST (AST_Element_Component) | |
DEFINE_LIST (AST_CompositionElement) | |
DEFINE_LIST (AST_Declaration) | |
DEFINE_LIST (AST_Element) | |
DEFINE_LIST (AST_Equation) | |
DEFINE_LIST (AST_Equation_Else) | |
DEFINE_LIST (AST_Expression) | |
DEFINE_LIST (AST_ExpressionList) | |
DEFINE_LIST (AST_Expression_ComponentReference) | |
DEFINE_LIST (AST_ForIndex) | |
DEFINE_LIST (AST_Statement) | |
DEFINE_LIST (AST_Statement_Else) | |
DEFINE_LIST (AST_String) | |
DEFINE_LIST (AST_Integer) | |
AST_TypePrefix | newAST_TypePrefix () |
AST_TypePrefix | newAST_TypePrefix (AST_TypePrefix) |
AST_TypePrefix | AST_TypePrefixAdd (AST_TypePrefix, AST_TypePrefix) |
template<typename T1 > | |
T1 | AST_ListElement (list< T1 > *l, int n) |
template<typename T1 > | |
list< T1 > * | AST_ListAppend (list< T1 > *l, T1 e) |
template<typename T1 > | |
list< T1 > * | AST_ListPrepend (list< T1 > *l, T1 e) |
template<typename T1 > | |
list< T1 > * | AST_ListRemove (list< T1 > *l, T1 e) |
template<typename T1 > | |
void | AST_ListInsert (list< T1 > *l1, typename std::list< T1 >::iterator it, T1 e) |
template<typename T1 > | |
T1 | AST_ListFirst (list< T1 > *l) |
template<typename T1 > | |
list< T1 > * | AST_ListConcat (list< T1 > *l1, list< T1 > *l2) |
template<typename T1 > | |
list< T1 > * | AST_ListCopy (list< T1 > *l1) |
template<typename T1 > | |
int | AST_Length (list< T1 > *l1) |
template<typename T1 > | |
T1 | AST_ListAt (list< T1 > *l1, int i) |
template<typename T1 > | |
list< T1 > * | newAST_SimpleList (T1 t) |
template<typename T1 > | |
void | AST_ListPrint (list< T1 > *l1, ostream &ret, string sec_name="", string separator=" ", string opener="", string closer="", bool block=false) |
Variables | |
int | block |
#define BEGIN_BLOCK block += 2; |
Definition at line 32 of file ast_types.hpp.
#define current_element | ( | it | ) | (*it) |
Definition at line 34 of file ast_types.hpp.
#define END_BLOCK block -= 2; |
Definition at line 33 of file ast_types.hpp.
#define foreach | ( | it, | |
list | |||
) | for (it = list->begin(); it != list->end(); it++) |
Definition at line 35 of file ast_types.hpp.
#define foreachReverse | ( | it, | |
list | |||
) | for (it = list->rbegin(); it != list->rend(); it++) |
Definition at line 36 of file ast_types.hpp.
#define MAKE_SPACE for (int __i = 0; __i < block; __i++) ret << " "; |
Definition at line 30 of file ast_types.hpp.
typedef bool AST_Boolean |
Definition at line 45 of file ast_types.hpp.
typedef int AST_ClassPrefix |
Definition at line 51 of file ast_types.hpp.
typedef int AST_Integer |
Definition at line 47 of file ast_types.hpp.
typedef double AST_Real |
Definition at line 48 of file ast_types.hpp.
typedef string* AST_String |
Definition at line 46 of file ast_types.hpp.
typedef string AST_Type |
Definition at line 49 of file ast_types.hpp.
typedef int AST_TypePrefix |
Definition at line 50 of file ast_types.hpp.
Definition at line 44 of file ast_types.hpp.
typedef std::set<string> PreSet_ |
Definition at line 43 of file ast_types.hpp.
enum ArgumentType |
Enumerator | |
---|---|
AR_MODIFICATION | |
AR_REDECLARATION |
Definition at line 206 of file ast_types.hpp.
enum BinOpType |
Definition at line 137 of file ast_types.hpp.
enum ClassPrefix |
Enumerator | |
---|---|
CP_PARTIAL | |
CP_CLASS | |
CP_MODEL | |
CP_BLOCK | |
CP_RECORD | |
CP_CONNECTOR | |
CP_TYPE | |
CP_OPERATOR | |
CP_EXPANDABLE | |
CP_PURE | |
CP_IMPURE | |
CP_PACKAGE | |
CP_FUNCTION |
Definition at line 212 of file ast_types.hpp.
enum ElementType |
Enumerator | |
---|---|
ELNONE | |
COMPONENT | |
IMPORT | |
EXTENDS | |
ELCLASS |
Definition at line 159 of file ast_types.hpp.
enum EquationType |
Enumerator | |
---|---|
EQNONE | |
EQEQUALITY | |
EQCONNECT | |
EQCALL | |
EQFOR | |
EQWHEN | |
EQIF |
Definition at line 161 of file ast_types.hpp.
enum ExpressionType |
Definition at line 163 of file ast_types.hpp.
enum ModificationType |
Enumerator | |
---|---|
MODNONE | |
MODEQUAL | |
MODASSIGN | |
MODCLASS |
Definition at line 189 of file ast_types.hpp.
enum StatementType |
Enumerator | |
---|---|
STNONE | |
STRETURN | |
STBREAK | |
STWHEN | |
STASSIGN | |
STFOR | |
STIF | |
STWHILE | |
STOUTASSING |
Definition at line 191 of file ast_types.hpp.
enum TypePrefix |
Enumerator | |
---|---|
TP_INPUT | |
TP_OUTPUT | |
TP_DISCRETE | |
TP_PARAMETER | |
TP_FLOW | |
TP_STREAM | |
TP_CONSTANT | |
TP_FOR | |
TP_EQ | |
TP_LOCAL |
Definition at line 193 of file ast_types.hpp.
int AST_Length | ( | list< T1 > * | l1 | ) |
Definition at line 292 of file ast_types.hpp.
Referenced by EqualExp::_compareList(), and AST_Declaration_::hasIndexes().
list<T1>* AST_ListAppend | ( | list< T1 > * | l, |
T1 | e | ||
) |
Definition at line 240 of file ast_types.hpp.
Referenced by AST_Class_::addClass(), AST_Class_::addComponent(), AST_Class_::addExtends(), AST_Expression_ComponentReference_::append(), AST_Expression_Traverse::apply(), newAST_BracketExpList(), newAST_Expression_Range(), AST_Expression_ComponentReference_::prepend(), and AST_Imports::visit().
T1 AST_ListAt | ( | list< T1 > * | l1, |
int | i | ||
) |
Definition at line 298 of file ast_types.hpp.
Referenced by EqualExp::_compareList(), and MicroModelica::IR::Range::testExpression().
list<T1>* AST_ListConcat | ( | list< T1 > * | l1, |
list< T1 > * | l2 | ||
) |
Definition at line 277 of file ast_types.hpp.
list<T1>* AST_ListCopy | ( | list< T1 > * | l1 | ) |
Definition at line 284 of file ast_types.hpp.
T1 AST_ListElement | ( | list< T1 > * | l, |
int | n | ||
) |
Definition at line 229 of file ast_types.hpp.
Referenced by MicroModelica::Util::ConvertToGiNaC::foldTraverseElement().
T1 AST_ListFirst | ( | list< T1 > * | l | ) |
Definition at line 271 of file ast_types.hpp.
Referenced by MicroModelica::IR::ModelChecker::_lValue(), MicroModelica::IR::ModelChecker::_whenStatement(), AST_Expression_Fold< bool >::apply(), MicroModelica::IR::Event::compare(), AST_Expression_ComponentReference_::firstIndex(), MicroModelica::Util::ConvertToGiNaC::foldTraverseElement(), and MicroModelica::IR::Range::testExpression().
void AST_ListInsert | ( | list< T1 > * | l1, |
typename std::list< T1 >::iterator | it, | ||
T1 | e | ||
) |
Definition at line 261 of file ast_types.hpp.
list<T1>* AST_ListPrepend | ( | list< T1 > * | l, |
T1 | e | ||
) |
Definition at line 247 of file ast_types.hpp.
Referenced by AST_Expression_ComponentReference_::prepend(), and Type_Array_::print().
void AST_ListPrint | ( | list< T1 > * | l1, |
ostream & | ret, | ||
string | sec_name = "" , |
||
string | separator = " " , |
||
string | opener = "" , |
||
string | closer = "" , |
||
bool | block = false |
||
) |
Definition at line 319 of file ast_types.hpp.
References BEGIN_BLOCK, block, current_element, and END_BLOCK.
Referenced by operator<<(), AST_Equation_For_::print(), AST_Statement_For_::print(), AST_Expression_Brace_::print(), and AST_Modification_Class_::print().
list<T1>* AST_ListRemove | ( | list< T1 > * | l, |
T1 | e | ||
) |
Definition at line 254 of file ast_types.hpp.
AST_TypePrefix AST_TypePrefixAdd | ( | AST_TypePrefix | , |
AST_TypePrefix | |||
) |
Definition at line 263 of file ast_builder.cpp.
DEFINE_LIST | ( | AST_Argument | ) |
DEFINE_LIST | ( | AST_Class | ) |
DEFINE_LIST | ( | AST_CompositionElement | ) |
DEFINE_LIST | ( | AST_Declaration | ) |
DEFINE_LIST | ( | AST_Element | ) |
DEFINE_LIST | ( | AST_Element_Component | ) |
DEFINE_LIST | ( | AST_Equation | ) |
DEFINE_LIST | ( | AST_Equation_Else | ) |
DEFINE_LIST | ( | AST_Expression | ) |
DEFINE_LIST | ( | AST_Expression_ComponentReference | ) |
DEFINE_LIST | ( | AST_ExpressionList | ) |
DEFINE_LIST | ( | AST_ForIndex | ) |
DEFINE_LIST | ( | AST_Integer | ) |
DEFINE_LIST | ( | AST_Statement | ) |
DEFINE_LIST | ( | AST_Statement_Else | ) |
DEFINE_LIST | ( | AST_String | ) |
DEFINE_TYPE | ( | AST_Argument | ) |
DEFINE_TYPE | ( | AST_Argument_Modification | ) |
DEFINE_TYPE | ( | AST_Argument_Redeclaration | ) |
DEFINE_TYPE | ( | AST_Class | ) |
DEFINE_TYPE | ( | AST_Comment | ) |
DEFINE_TYPE | ( | AST_Composition | ) |
DEFINE_TYPE | ( | AST_CompositionElement | ) |
DEFINE_TYPE | ( | AST_CompositionEqsAlgs | ) |
DEFINE_TYPE | ( | AST_Declaration | ) |
DEFINE_TYPE | ( | AST_Element | ) |
DEFINE_TYPE | ( | AST_Element_ClassWrapper | ) |
DEFINE_TYPE | ( | AST_Element_Component | ) |
DEFINE_TYPE | ( | AST_Element_ExtendsClause | ) |
DEFINE_TYPE | ( | AST_Element_ImportClause | ) |
DEFINE_TYPE | ( | AST_Equation | ) |
DEFINE_TYPE | ( | AST_Equation_Call | ) |
DEFINE_TYPE | ( | AST_Equation_Connect | ) |
DEFINE_TYPE | ( | AST_Equation_Else | ) |
DEFINE_TYPE | ( | AST_Equation_Equality | ) |
DEFINE_TYPE | ( | AST_Equation_For | ) |
DEFINE_TYPE | ( | AST_Equation_If | ) |
DEFINE_TYPE | ( | AST_Equation_When | ) |
DEFINE_TYPE | ( | AST_Expression | ) |
DEFINE_TYPE | ( | AST_Expression_ArrayIndex | ) |
DEFINE_TYPE | ( | AST_Expression_BinOp | ) |
DEFINE_TYPE | ( | AST_Expression_Boolean | ) |
DEFINE_TYPE | ( | AST_Expression_BooleanNot | ) |
DEFINE_TYPE | ( | AST_Expression_Brace | ) |
DEFINE_TYPE | ( | AST_Expression_Bracket | ) |
DEFINE_TYPE | ( | AST_Expression_Call | ) |
DEFINE_TYPE | ( | AST_Expression_CallArgs | ) |
DEFINE_TYPE | ( | AST_Expression_Colon | ) |
DEFINE_TYPE | ( | AST_Expression_ComponentReference | ) |
DEFINE_TYPE | ( | AST_Expression_Derivative | ) |
DEFINE_TYPE | ( | AST_Expression_End | ) |
DEFINE_TYPE | ( | AST_Expression_If | ) |
DEFINE_TYPE | ( | AST_Expression_If_ElseIf | ) |
DEFINE_TYPE | ( | AST_Expression_Integer | ) |
DEFINE_TYPE | ( | AST_Expression_NamedArgument | ) |
DEFINE_TYPE | ( | AST_Expression_Null | ) |
DEFINE_TYPE | ( | AST_Expression_Output | ) |
DEFINE_TYPE | ( | AST_Expression_Range | ) |
DEFINE_TYPE | ( | AST_Expression_Real | ) |
DEFINE_TYPE | ( | AST_Expression_String | ) |
DEFINE_TYPE | ( | AST_Expression_UMinus | ) |
DEFINE_TYPE | ( | AST_External_Function_Call | ) |
DEFINE_TYPE | ( | AST_ForIndex | ) |
DEFINE_TYPE | ( | AST_ImportClause | ) |
DEFINE_TYPE | ( | AST_Modification | ) |
DEFINE_TYPE | ( | AST_Modification_Assign | ) |
DEFINE_TYPE | ( | AST_Modification_Class | ) |
DEFINE_TYPE | ( | AST_Modification_Equal | ) |
DEFINE_TYPE | ( | AST_Node | ) |
DEFINE_TYPE | ( | AST_ShortClassExp | ) |
DEFINE_TYPE | ( | AST_Statement | ) |
DEFINE_TYPE | ( | AST_Statement_Assign | ) |
DEFINE_TYPE | ( | AST_Statement_Break | ) |
DEFINE_TYPE | ( | AST_Statement_Else | ) |
DEFINE_TYPE | ( | AST_Statement_For | ) |
DEFINE_TYPE | ( | AST_Statement_If | ) |
DEFINE_TYPE | ( | AST_Statement_OutputAssigment | ) |
DEFINE_TYPE | ( | AST_Statement_Return | ) |
DEFINE_TYPE | ( | AST_Statement_When | ) |
DEFINE_TYPE | ( | AST_Statement_While | ) |
DEFINE_TYPE | ( | AST_StoredDefinition | ) |
list<T1>* newAST_SimpleList | ( | T1 | t | ) |
Definition at line 311 of file ast_types.hpp.
Referenced by WhenEqualityTrasforms::foldTraverseElement(), PreChange::foldTraverseElement(), ReplaceReference::foldTraverseElement(), newAST_DeclarationList(), and newAST_ExpressionList().
AST_TypePrefix newAST_TypePrefix | ( | ) |
Definition at line 259 of file ast_builder.cpp.
AST_TypePrefix newAST_TypePrefix | ( | AST_TypePrefix | ) |
Definition at line 261 of file ast_builder.cpp.
int block |
Definition at line 41 of file ast_builder.cpp.
Referenced by AST_ListPrint(), MicroModelica::IR::Event::getExpression(), MicroModelica::IR::Event::handler(), and MicroModelica::IR::FunctionPrinter::jacMacrosAccess().