diff options
author | 2020-05-08 18:28:19 +0200 | |
---|---|---|
committer | 2020-05-08 18:28:19 +0200 | |
commit | 419e76265ecbdf65e960e0624be006d31ed1e191 (patch) | |
tree | dad200fe9fd0beae7adde969206b77691a51b85a /Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/UnaryOp.java | |
parent | Fix check expressions in generated VIATRA (diff) | |
download | VIATRA-Generator-419e76265ecbdf65e960e0624be006d31ed1e191.tar.gz VIATRA-Generator-419e76265ecbdf65e960e0624be006d31ed1e191.tar.zst VIATRA-Generator-419e76265ecbdf65e960e0624be006d31ed1e191.zip |
Update solver language grammar
First version, still needs TokenSource and Linker to work.
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/UnaryOp.java')
-rw-r--r-- | Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/UnaryOp.java | 317 |
1 files changed, 317 insertions, 0 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/UnaryOp.java b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/UnaryOp.java new file mode 100644 index 00000000..e426f4f1 --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/UnaryOp.java | |||
@@ -0,0 +1,317 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.21.0 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.solverLanguage; | ||
5 | |||
6 | import java.util.Arrays; | ||
7 | import java.util.Collections; | ||
8 | import java.util.List; | ||
9 | |||
10 | import org.eclipse.emf.common.util.Enumerator; | ||
11 | |||
12 | /** | ||
13 | * <!-- begin-user-doc --> | ||
14 | * A representation of the literals of the enumeration '<em><b>Unary Op</b></em>', | ||
15 | * and utility methods for working with them. | ||
16 | * <!-- end-user-doc --> | ||
17 | * @see org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage#getUnaryOp() | ||
18 | * @model | ||
19 | * @generated | ||
20 | */ | ||
21 | public enum UnaryOp implements Enumerator | ||
22 | { | ||
23 | /** | ||
24 | * The '<em><b>NEG</b></em>' literal object. | ||
25 | * <!-- begin-user-doc --> | ||
26 | * <!-- end-user-doc --> | ||
27 | * @see #NEG_VALUE | ||
28 | * @generated | ||
29 | * @ordered | ||
30 | */ | ||
31 | NEG(0, "NEG", "!"), | ||
32 | |||
33 | /** | ||
34 | * The '<em><b>PLUS</b></em>' literal object. | ||
35 | * <!-- begin-user-doc --> | ||
36 | * <!-- end-user-doc --> | ||
37 | * @see #PLUS_VALUE | ||
38 | * @generated | ||
39 | * @ordered | ||
40 | */ | ||
41 | PLUS(1, "PLUS", "+"), | ||
42 | |||
43 | /** | ||
44 | * The '<em><b>MINUS</b></em>' literal object. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @see #MINUS_VALUE | ||
48 | * @generated | ||
49 | * @ordered | ||
50 | */ | ||
51 | MINUS(2, "MINUS", "-"), | ||
52 | |||
53 | /** | ||
54 | * The '<em><b>MAY</b></em>' literal object. | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @see #MAY_VALUE | ||
58 | * @generated | ||
59 | * @ordered | ||
60 | */ | ||
61 | MAY(3, "MAY", "may"), | ||
62 | |||
63 | /** | ||
64 | * The '<em><b>MUST</b></em>' literal object. | ||
65 | * <!-- begin-user-doc --> | ||
66 | * <!-- end-user-doc --> | ||
67 | * @see #MUST_VALUE | ||
68 | * @generated | ||
69 | * @ordered | ||
70 | */ | ||
71 | MUST(4, "MUST", "must"), | ||
72 | |||
73 | /** | ||
74 | * The '<em><b>CURRENT</b></em>' literal object. | ||
75 | * <!-- begin-user-doc --> | ||
76 | * <!-- end-user-doc --> | ||
77 | * @see #CURRENT_VALUE | ||
78 | * @generated | ||
79 | * @ordered | ||
80 | */ | ||
81 | CURRENT(5, "CURRENT", "current"); | ||
82 | |||
83 | /** | ||
84 | * The '<em><b>NEG</b></em>' literal value. | ||
85 | * <!-- begin-user-doc --> | ||
86 | * <!-- end-user-doc --> | ||
87 | * @see #NEG | ||
88 | * @model literal="!" | ||
89 | * @generated | ||
90 | * @ordered | ||
91 | */ | ||
92 | public static final int NEG_VALUE = 0; | ||
93 | |||
94 | /** | ||
95 | * The '<em><b>PLUS</b></em>' literal value. | ||
96 | * <!-- begin-user-doc --> | ||
97 | * <!-- end-user-doc --> | ||
98 | * @see #PLUS | ||
99 | * @model literal="+" | ||
100 | * @generated | ||
101 | * @ordered | ||
102 | */ | ||
103 | public static final int PLUS_VALUE = 1; | ||
104 | |||
105 | /** | ||
106 | * The '<em><b>MINUS</b></em>' literal value. | ||
107 | * <!-- begin-user-doc --> | ||
108 | * <!-- end-user-doc --> | ||
109 | * @see #MINUS | ||
110 | * @model literal="-" | ||
111 | * @generated | ||
112 | * @ordered | ||
113 | */ | ||
114 | public static final int MINUS_VALUE = 2; | ||
115 | |||
116 | /** | ||
117 | * The '<em><b>MAY</b></em>' literal value. | ||
118 | * <!-- begin-user-doc --> | ||
119 | * <!-- end-user-doc --> | ||
120 | * @see #MAY | ||
121 | * @model literal="may" | ||
122 | * @generated | ||
123 | * @ordered | ||
124 | */ | ||
125 | public static final int MAY_VALUE = 3; | ||
126 | |||
127 | /** | ||
128 | * The '<em><b>MUST</b></em>' literal value. | ||
129 | * <!-- begin-user-doc --> | ||
130 | * <!-- end-user-doc --> | ||
131 | * @see #MUST | ||
132 | * @model literal="must" | ||
133 | * @generated | ||
134 | * @ordered | ||
135 | */ | ||
136 | public static final int MUST_VALUE = 4; | ||
137 | |||
138 | /** | ||
139 | * The '<em><b>CURRENT</b></em>' literal value. | ||
140 | * <!-- begin-user-doc --> | ||
141 | * <!-- end-user-doc --> | ||
142 | * @see #CURRENT | ||
143 | * @model literal="current" | ||
144 | * @generated | ||
145 | * @ordered | ||
146 | */ | ||
147 | public static final int CURRENT_VALUE = 5; | ||
148 | |||
149 | /** | ||
150 | * An array of all the '<em><b>Unary Op</b></em>' enumerators. | ||
151 | * <!-- begin-user-doc --> | ||
152 | * <!-- end-user-doc --> | ||
153 | * @generated | ||
154 | */ | ||
155 | private static final UnaryOp[] VALUES_ARRAY = | ||
156 | new UnaryOp[] | ||
157 | { | ||
158 | NEG, | ||
159 | PLUS, | ||
160 | MINUS, | ||
161 | MAY, | ||
162 | MUST, | ||
163 | CURRENT, | ||
164 | }; | ||
165 | |||
166 | /** | ||
167 | * A public read-only list of all the '<em><b>Unary Op</b></em>' enumerators. | ||
168 | * <!-- begin-user-doc --> | ||
169 | * <!-- end-user-doc --> | ||
170 | * @generated | ||
171 | */ | ||
172 | public static final List<UnaryOp> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); | ||
173 | |||
174 | /** | ||
175 | * Returns the '<em><b>Unary Op</b></em>' literal with the specified literal value. | ||
176 | * <!-- begin-user-doc --> | ||
177 | * <!-- end-user-doc --> | ||
178 | * @param literal the literal. | ||
179 | * @return the matching enumerator or <code>null</code>. | ||
180 | * @generated | ||
181 | */ | ||
182 | public static UnaryOp get(String literal) | ||
183 | { | ||
184 | for (int i = 0; i < VALUES_ARRAY.length; ++i) | ||
185 | { | ||
186 | UnaryOp result = VALUES_ARRAY[i]; | ||
187 | if (result.toString().equals(literal)) | ||
188 | { | ||
189 | return result; | ||
190 | } | ||
191 | } | ||
192 | return null; | ||
193 | } | ||
194 | |||
195 | /** | ||
196 | * Returns the '<em><b>Unary Op</b></em>' literal with the specified name. | ||
197 | * <!-- begin-user-doc --> | ||
198 | * <!-- end-user-doc --> | ||
199 | * @param name the name. | ||
200 | * @return the matching enumerator or <code>null</code>. | ||
201 | * @generated | ||
202 | */ | ||
203 | public static UnaryOp getByName(String name) | ||
204 | { | ||
205 | for (int i = 0; i < VALUES_ARRAY.length; ++i) | ||
206 | { | ||
207 | UnaryOp result = VALUES_ARRAY[i]; | ||
208 | if (result.getName().equals(name)) | ||
209 | { | ||
210 | return result; | ||
211 | } | ||
212 | } | ||
213 | return null; | ||
214 | } | ||
215 | |||
216 | /** | ||
217 | * Returns the '<em><b>Unary Op</b></em>' literal with the specified integer value. | ||
218 | * <!-- begin-user-doc --> | ||
219 | * <!-- end-user-doc --> | ||
220 | * @param value the integer value. | ||
221 | * @return the matching enumerator or <code>null</code>. | ||
222 | * @generated | ||
223 | */ | ||
224 | public static UnaryOp get(int value) | ||
225 | { | ||
226 | switch (value) | ||
227 | { | ||
228 | case NEG_VALUE: return NEG; | ||
229 | case PLUS_VALUE: return PLUS; | ||
230 | case MINUS_VALUE: return MINUS; | ||
231 | case MAY_VALUE: return MAY; | ||
232 | case MUST_VALUE: return MUST; | ||
233 | case CURRENT_VALUE: return CURRENT; | ||
234 | } | ||
235 | return null; | ||
236 | } | ||
237 | |||
238 | /** | ||
239 | * <!-- begin-user-doc --> | ||
240 | * <!-- end-user-doc --> | ||
241 | * @generated | ||
242 | */ | ||
243 | private final int value; | ||
244 | |||
245 | /** | ||
246 | * <!-- begin-user-doc --> | ||
247 | * <!-- end-user-doc --> | ||
248 | * @generated | ||
249 | */ | ||
250 | private final String name; | ||
251 | |||
252 | /** | ||
253 | * <!-- begin-user-doc --> | ||
254 | * <!-- end-user-doc --> | ||
255 | * @generated | ||
256 | */ | ||
257 | private final String literal; | ||
258 | |||
259 | /** | ||
260 | * Only this class can construct instances. | ||
261 | * <!-- begin-user-doc --> | ||
262 | * <!-- end-user-doc --> | ||
263 | * @generated | ||
264 | */ | ||
265 | private UnaryOp(int value, String name, String literal) | ||
266 | { | ||
267 | this.value = value; | ||
268 | this.name = name; | ||
269 | this.literal = literal; | ||
270 | } | ||
271 | |||
272 | /** | ||
273 | * <!-- begin-user-doc --> | ||
274 | * <!-- end-user-doc --> | ||
275 | * @generated | ||
276 | */ | ||
277 | @Override | ||
278 | public int getValue() | ||
279 | { | ||
280 | return value; | ||
281 | } | ||
282 | |||
283 | /** | ||
284 | * <!-- begin-user-doc --> | ||
285 | * <!-- end-user-doc --> | ||
286 | * @generated | ||
287 | */ | ||
288 | @Override | ||
289 | public String getName() | ||
290 | { | ||
291 | return name; | ||
292 | } | ||
293 | |||
294 | /** | ||
295 | * <!-- begin-user-doc --> | ||
296 | * <!-- end-user-doc --> | ||
297 | * @generated | ||
298 | */ | ||
299 | @Override | ||
300 | public String getLiteral() | ||
301 | { | ||
302 | return literal; | ||
303 | } | ||
304 | |||
305 | /** | ||
306 | * Returns the literal value of the enumerator, which is its string representation. | ||
307 | * <!-- begin-user-doc --> | ||
308 | * <!-- end-user-doc --> | ||
309 | * @generated | ||
310 | */ | ||
311 | @Override | ||
312 | public String toString() | ||
313 | { | ||
314 | return literal; | ||
315 | } | ||
316 | |||
317 | } //UnaryOp | ||