Revision 7
Added by Willibald K. over 8 years ago
IAstVisitor.java | ||
---|---|---|
1 |
/**
|
|
2 |
*
|
|
3 |
* OOAS Compiler
|
|
4 |
*
|
|
5 |
* Copyright 2015, AIT Austrian Institute of Technology.
|
|
6 |
* This code is based on the C# Version of the OOAS Compiler, which is
|
|
7 |
* copyright 2015 by the Institute of Software Technology, Graz University
|
|
8 |
* of Technology with portions copyright by the AIT Austrian Institute of
|
|
9 |
* Technology. All rights reserved.
|
|
10 |
*
|
|
11 |
* SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
|
|
12 |
*
|
|
13 |
* If you modify the file please update the list of contributors below to in-
|
|
14 |
* clude your name. Please also stick to the coding convention of using TABs
|
|
15 |
* to do the basic (block-level) indentation and spaces for anything after
|
|
16 |
* that. (Enable the display of special chars and it should be pretty obvious
|
|
17 |
* what this means.) Also, remove all trailing whitespace.
|
|
18 |
*
|
|
19 |
* Contributors:
|
|
20 |
* Willibald Krenn (AIT)
|
|
21 |
* Stephan Zimmerer (AIT)
|
|
22 |
* Markus Demetz (AIT)
|
|
23 |
* Christoph Czurda (AIT)
|
|
24 |
*
|
|
25 |
*/
|
|
1 |
/** |
|
2 |
* |
|
3 |
* OOAS Compiler |
|
4 |
* |
|
5 |
* Copyright 2015, AIT Austrian Institute of Technology. |
|
6 |
* This code is based on the C# Version of the OOAS Compiler, which is |
|
7 |
* copyright 2015 by the Institute of Software Technology, Graz University |
|
8 |
* of Technology with portions copyright by the AIT Austrian Institute of |
|
9 |
* Technology. All rights reserved. |
|
10 |
* |
|
11 |
* SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED. |
|
12 |
* |
|
13 |
* If you modify the file please update the list of contributors below to in- |
|
14 |
* clude your name. Please also stick to the coding convention of using TABs |
|
15 |
* to do the basic (block-level) indentation and spaces for anything after |
|
16 |
* that. (Enable the display of special chars and it should be pretty obvious |
|
17 |
* what this means.) Also, remove all trailing whitespace. |
|
18 |
* |
|
19 |
* Contributors: |
|
20 |
* Willibald Krenn (AIT) |
|
21 |
* Stephan Zimmerer (AIT) |
|
22 |
* Markus Demetz (AIT) |
|
23 |
* Christoph Czurda (AIT) |
|
24 |
* |
|
25 |
*/ |
|
26 | 26 |
|
27 | 27 |
|
28 |
package org.momut.ooas.ast;
|
|
29 |
|
|
28 |
package org.momut.ooas.ast; |
|
29 |
|
|
30 | 30 |
import org.momut.ooas.ast.expressions.AccessExpression; |
31 | 31 |
import org.momut.ooas.ast.expressions.BinaryOperator; |
32 | 32 |
import org.momut.ooas.ast.expressions.CallExpression; |
... | ... | |
87 | 87 |
import org.momut.ooas.ast.types.OpaqueType; |
88 | 88 |
import org.momut.ooas.ast.types.QrType; |
89 | 89 |
import org.momut.ooas.ast.types.TupleType; |
90 |
|
|
91 |
/*Notice: The visitor must implement the traversal!*/ |
|
92 |
public interface IAstVisitor |
|
93 |
{ |
|
94 |
String returnVisitorName(); |
|
95 |
void done(); |
|
96 |
|
|
97 |
/*Identifiers*/ |
|
98 |
void visit(EnumIdentifier enumIdentifier); |
|
99 |
void visit(LandmarkIdentifier landmarkIdentifier); |
|
100 |
void visit(AttributeIdentifier attributeIdentifier); |
|
101 |
void visit(ExpressionVariableIdentifier expressionVariableIdentifier); |
|
102 |
void visit(ParameterIdentifier parameterIdentifier); |
|
103 |
void visit(LocalVariableIdentifier localVariableIdentifier); |
|
104 |
void visit(TypeIdentifier typeIdentifier); |
|
105 |
void visit(SelfTypeIdentifier typeIdentifier); |
|
106 |
void visit(MethodIdentifier methodIdentifier); |
|
107 |
void visit(NamedActionIdentifier namedActionIdentifier); |
|
108 |
void visit(MainModule mainModule); |
|
109 |
void visit(Module module); |
|
110 |
void visit(NondetIdentifierList nondetIdentifierList); |
|
111 |
void visit(SeqIdentifierList seqIdentifierList); |
|
112 |
void visit(PrioIdentifierList prioIdentifierList); |
|
113 |
void visit(UnspecIdentifierList unspecIdentifierList); |
|
114 |
void visit(ConstantIdentifier constantIdentifier); |
|
115 |
|
|
116 |
|
|
117 |
/*Statements*/ |
|
118 |
void visit(NondetBlock nondetBlock); |
|
119 |
void visit(SeqBlock seqBlock); |
|
120 |
void visit(PrioBlock prioBlock); |
|
121 |
void visit(GuardedCommand guardedCommand); |
|
122 |
void visit(Assignment assignment); |
|
123 |
void visit(Call call); |
|
124 |
void visit(SkipStatement skipStatement); |
|
125 |
void visit(AbortStatement abortStatement); |
|
126 |
void visit(KillStatement killStatement); |
|
127 |
void visit(QualitativeConstraintStatement qalitativeConstraintStatement); |
|
128 |
|
|
129 |
|
|
130 |
/*Expressions*/ |
|
131 |
<T> void visit(ValueExpression<T> valueExpression); |
|
132 |
void visit(UnresolvedIdentifierExpression unresolvedIdentifierExpression); |
|
133 |
void visit(IdentifierExpression identifierExpression); |
|
134 |
void visit(ListConstructor listConstructor); |
|
135 |
void visit(SetConstructor setConstructor); |
|
136 |
void visit(MapConstructor mapConstructor); |
|
137 |
void visit(TupleConstructor tupleConstructor); |
|
138 |
void visit(ObjectConstructor objectConstructor); |
|
139 |
void visit(QValConstructor qValConstructor); |
|
140 |
void visit(AccessExpression accessExpression); |
|
141 |
void visit(BinaryOperator binaryOperator); |
|
142 |
void visit(TernaryOperator ternaryOperator); |
|
143 |
void visit(TupleMapAccessExpression tupleMapAccessExpression); |
|
144 |
void visit(CallExpression callExpression); |
|
145 |
void visit(ForallQuantifier quantifier); |
|
146 |
void visit(ExistsQuantifier quantifier); |
|
147 |
void visit(UnaryOperator unaryOperator); |
|
148 |
void visit(TypeExpression typeExpression); |
|
149 |
|
|
150 |
/*Types*/ |
|
151 |
void visit(CharType charType); |
|
152 |
void visit(IntType intType); |
|
153 |
void visit(BoolType boolType); |
|
154 |
void visit(FloatType floatType); |
|
155 |
void visit(EnumType enumType); |
|
156 |
void visit(ListType listType); |
|
157 |
void visit(MapType mapType); |
|
158 |
void visit(QrType qrType); |
|
159 |
void visit(TupleType tupleType); |
|
160 |
void visit(FunctionType functionType); |
|
161 |
void visit(OoActionSystemType ooActionSystemType); |
|
162 |
void visit(OpaqueType opaqueType); |
|
163 |
void visit(AnyType anyType); |
|
164 |
void visit(NullType nullType); |
|
165 |
|
|
166 |
void visit(BreakStatement breakStatement); |
|
167 |
} |
|
90 |
|
|
91 |
/*Notice: The visitor must implement the traversal!*/ |
|
92 |
public interface IAstVisitor |
|
93 |
{ |
|
94 |
String returnVisitorName(); |
|
95 |
void done(); |
|
96 |
|
|
97 |
/*Identifiers*/ |
|
98 |
void visit(EnumIdentifier enumIdentifier); |
|
99 |
void visit(LandmarkIdentifier landmarkIdentifier); |
|
100 |
void visit(AttributeIdentifier attributeIdentifier); |
|
101 |
void visit(ExpressionVariableIdentifier expressionVariableIdentifier); |
|
102 |
void visit(ParameterIdentifier parameterIdentifier); |
|
103 |
void visit(LocalVariableIdentifier localVariableIdentifier); |
|
104 |
void visit(TypeIdentifier typeIdentifier); |
|
105 |
void visit(SelfTypeIdentifier typeIdentifier); |
|
106 |
void visit(MethodIdentifier methodIdentifier); |
|
107 |
void visit(NamedActionIdentifier namedActionIdentifier); |
|
108 |
void visit(MainModule mainModule); |
|
109 |
void visit(Module module); |
|
110 |
void visit(NondetIdentifierList nondetIdentifierList); |
|
111 |
void visit(SeqIdentifierList seqIdentifierList); |
|
112 |
void visit(PrioIdentifierList prioIdentifierList); |
|
113 |
void visit(UnspecIdentifierList unspecIdentifierList); |
|
114 |
void visit(ConstantIdentifier constantIdentifier); |
|
115 |
|
|
116 |
|
|
117 |
/*Statements*/ |
|
118 |
void visit(NondetBlock nondetBlock); |
|
119 |
void visit(SeqBlock seqBlock); |
|
120 |
void visit(PrioBlock prioBlock); |
|
121 |
void visit(GuardedCommand guardedCommand); |
|
122 |
void visit(Assignment assignment); |
|
123 |
void visit(Call call); |
|
124 |
void visit(SkipStatement skipStatement); |
|
125 |
void visit(AbortStatement abortStatement); |
|
126 |
void visit(KillStatement killStatement); |
|
127 |
void visit(QualitativeConstraintStatement qalitativeConstraintStatement); |
|
128 |
|
|
129 |
|
|
130 |
/*Expressions*/ |
|
131 |
<T> void visit(ValueExpression<T> valueExpression); |
|
132 |
void visit(UnresolvedIdentifierExpression unresolvedIdentifierExpression); |
|
133 |
void visit(IdentifierExpression identifierExpression); |
|
134 |
void visit(ListConstructor listConstructor); |
|
135 |
void visit(SetConstructor setConstructor); |
|
136 |
void visit(MapConstructor mapConstructor); |
|
137 |
void visit(TupleConstructor tupleConstructor); |
|
138 |
void visit(ObjectConstructor objectConstructor); |
|
139 |
void visit(QValConstructor qValConstructor); |
|
140 |
void visit(AccessExpression accessExpression); |
|
141 |
void visit(BinaryOperator binaryOperator); |
|
142 |
void visit(TernaryOperator ternaryOperator); |
|
143 |
void visit(TupleMapAccessExpression tupleMapAccessExpression); |
|
144 |
void visit(CallExpression callExpression); |
|
145 |
void visit(ForallQuantifier quantifier); |
|
146 |
void visit(ExistsQuantifier quantifier); |
|
147 |
void visit(UnaryOperator unaryOperator); |
|
148 |
void visit(TypeExpression typeExpression); |
|
149 |
|
|
150 |
/*Types*/ |
|
151 |
void visit(CharType charType); |
|
152 |
void visit(IntType intType); |
|
153 |
void visit(BoolType boolType); |
|
154 |
void visit(FloatType floatType); |
|
155 |
void visit(EnumType enumType); |
|
156 |
void visit(ListType listType); |
|
157 |
void visit(MapType mapType); |
|
158 |
void visit(QrType qrType); |
|
159 |
void visit(TupleType tupleType); |
|
160 |
void visit(FunctionType functionType); |
|
161 |
void visit(OoActionSystemType ooActionSystemType); |
|
162 |
void visit(OpaqueType opaqueType); |
|
163 |
void visit(AnyType anyType); |
|
164 |
void visit(NullType nullType); |
|
165 |
|
|
166 |
void visit(BreakStatement breakStatement); |
|
167 |
} |
Also available in: Unified diff
changing java, cpp, hpp files to unix line endings