diff options
author | 2021-06-27 14:22:40 +0200 | |
---|---|---|
committer | 2021-06-27 14:22:40 +0200 | |
commit | 07719e927f9d398765e661c84fd8778cefb39083 (patch) | |
tree | 9652080f7e580f09a0763a3e258348dea6e02684 /org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.g | |
parent | Add enum support (diff) | |
download | refinery-07719e927f9d398765e661c84fd8778cefb39083.tar.gz refinery-07719e927f9d398765e661c84fd8778cefb39083.tar.zst refinery-07719e927f9d398765e661c84fd8778cefb39083.zip |
Simplify project layout
Diffstat (limited to 'org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.g')
-rw-r--r-- | org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.g | 1909 |
1 files changed, 0 insertions, 1909 deletions
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.g b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.g deleted file mode 100644 index 64db0417..00000000 --- a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.g +++ /dev/null | |||
@@ -1,1909 +0,0 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.26.0.M1 | ||
3 | */ | ||
4 | grammar InternalProblem; | ||
5 | |||
6 | options { | ||
7 | superClass=AbstractInternalAntlrParser; | ||
8 | } | ||
9 | |||
10 | @lexer::header { | ||
11 | package org.eclipse.viatra.solver.language.parser.antlr.internal; | ||
12 | |||
13 | // Hack: Use our own Lexer superclass by means of import. | ||
14 | // Currently there is no other way to specify the superclass for the lexer. | ||
15 | import org.eclipse.xtext.parser.antlr.Lexer; | ||
16 | } | ||
17 | |||
18 | @parser::header { | ||
19 | package org.eclipse.viatra.solver.language.parser.antlr.internal; | ||
20 | |||
21 | import org.eclipse.xtext.*; | ||
22 | import org.eclipse.xtext.parser.*; | ||
23 | import org.eclipse.xtext.parser.impl.*; | ||
24 | import org.eclipse.emf.ecore.util.EcoreUtil; | ||
25 | import org.eclipse.emf.ecore.EObject; | ||
26 | import org.eclipse.emf.common.util.Enumerator; | ||
27 | import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser; | ||
28 | import org.eclipse.xtext.parser.antlr.XtextTokenStream; | ||
29 | import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; | ||
30 | import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; | ||
31 | import org.eclipse.viatra.solver.language.services.ProblemGrammarAccess; | ||
32 | |||
33 | } | ||
34 | |||
35 | @parser::members { | ||
36 | |||
37 | private ProblemGrammarAccess grammarAccess; | ||
38 | |||
39 | public InternalProblemParser(TokenStream input, ProblemGrammarAccess grammarAccess) { | ||
40 | this(input); | ||
41 | this.grammarAccess = grammarAccess; | ||
42 | registerRules(grammarAccess.getGrammar()); | ||
43 | } | ||
44 | |||
45 | @Override | ||
46 | protected String getFirstRuleName() { | ||
47 | return "Problem"; | ||
48 | } | ||
49 | |||
50 | @Override | ||
51 | protected ProblemGrammarAccess getGrammarAccess() { | ||
52 | return grammarAccess; | ||
53 | } | ||
54 | |||
55 | } | ||
56 | |||
57 | @rulecatch { | ||
58 | catch (RecognitionException re) { | ||
59 | recover(input,re); | ||
60 | appendSkippedTokens(); | ||
61 | } | ||
62 | } | ||
63 | |||
64 | // Entry rule entryRuleProblem | ||
65 | entryRuleProblem returns [EObject current=null]: | ||
66 | { newCompositeNode(grammarAccess.getProblemRule()); } | ||
67 | iv_ruleProblem=ruleProblem | ||
68 | { $current=$iv_ruleProblem.current; } | ||
69 | EOF; | ||
70 | |||
71 | // Rule Problem | ||
72 | ruleProblem returns [EObject current=null] | ||
73 | @init { | ||
74 | enterRule(); | ||
75 | } | ||
76 | @after { | ||
77 | leaveRule(); | ||
78 | }: | ||
79 | ( | ||
80 | ( | ||
81 | otherlv_0='problem' | ||
82 | { | ||
83 | newLeafNode(otherlv_0, grammarAccess.getProblemAccess().getProblemKeyword_0_0()); | ||
84 | } | ||
85 | ( | ||
86 | ( | ||
87 | { | ||
88 | newCompositeNode(grammarAccess.getProblemAccess().getNameIdentifierParserRuleCall_0_1_0()); | ||
89 | } | ||
90 | lv_name_1_0=ruleIdentifier | ||
91 | { | ||
92 | if ($current==null) { | ||
93 | $current = createModelElementForParent(grammarAccess.getProblemRule()); | ||
94 | } | ||
95 | set( | ||
96 | $current, | ||
97 | "name", | ||
98 | lv_name_1_0, | ||
99 | "org.eclipse.viatra.solver.language.Problem.Identifier"); | ||
100 | afterParserOrEnumRuleCall(); | ||
101 | } | ||
102 | ) | ||
103 | ) | ||
104 | otherlv_2='.' | ||
105 | { | ||
106 | newLeafNode(otherlv_2, grammarAccess.getProblemAccess().getFullStopKeyword_0_2()); | ||
107 | } | ||
108 | )? | ||
109 | ( | ||
110 | ( | ||
111 | { | ||
112 | newCompositeNode(grammarAccess.getProblemAccess().getStatementsStatementParserRuleCall_1_0()); | ||
113 | } | ||
114 | lv_statements_3_0=ruleStatement | ||
115 | { | ||
116 | if ($current==null) { | ||
117 | $current = createModelElementForParent(grammarAccess.getProblemRule()); | ||
118 | } | ||
119 | add( | ||
120 | $current, | ||
121 | "statements", | ||
122 | lv_statements_3_0, | ||
123 | "org.eclipse.viatra.solver.language.Problem.Statement"); | ||
124 | afterParserOrEnumRuleCall(); | ||
125 | } | ||
126 | ) | ||
127 | )* | ||
128 | ) | ||
129 | ; | ||
130 | |||
131 | // Entry rule entryRuleStatement | ||
132 | entryRuleStatement returns [EObject current=null]: | ||
133 | { newCompositeNode(grammarAccess.getStatementRule()); } | ||
134 | iv_ruleStatement=ruleStatement | ||
135 | { $current=$iv_ruleStatement.current; } | ||
136 | EOF; | ||
137 | |||
138 | // Rule Statement | ||
139 | ruleStatement returns [EObject current=null] | ||
140 | @init { | ||
141 | enterRule(); | ||
142 | } | ||
143 | @after { | ||
144 | leaveRule(); | ||
145 | }: | ||
146 | ( | ||
147 | { | ||
148 | newCompositeNode(grammarAccess.getStatementAccess().getClassDeclarationParserRuleCall_0()); | ||
149 | } | ||
150 | this_ClassDeclaration_0=ruleClassDeclaration | ||
151 | { | ||
152 | $current = $this_ClassDeclaration_0.current; | ||
153 | afterParserOrEnumRuleCall(); | ||
154 | } | ||
155 | | | ||
156 | { | ||
157 | newCompositeNode(grammarAccess.getStatementAccess().getEnumDeclarationParserRuleCall_1()); | ||
158 | } | ||
159 | this_EnumDeclaration_1=ruleEnumDeclaration | ||
160 | { | ||
161 | $current = $this_EnumDeclaration_1.current; | ||
162 | afterParserOrEnumRuleCall(); | ||
163 | } | ||
164 | | | ||
165 | { | ||
166 | newCompositeNode(grammarAccess.getStatementAccess().getPredicateDefinitionParserRuleCall_2()); | ||
167 | } | ||
168 | this_PredicateDefinition_2=rulePredicateDefinition | ||
169 | { | ||
170 | $current = $this_PredicateDefinition_2.current; | ||
171 | afterParserOrEnumRuleCall(); | ||
172 | } | ||
173 | | | ||
174 | { | ||
175 | newCompositeNode(grammarAccess.getStatementAccess().getAssertionParserRuleCall_3()); | ||
176 | } | ||
177 | this_Assertion_3=ruleAssertion | ||
178 | { | ||
179 | $current = $this_Assertion_3.current; | ||
180 | afterParserOrEnumRuleCall(); | ||
181 | } | ||
182 | | | ||
183 | { | ||
184 | newCompositeNode(grammarAccess.getStatementAccess().getScopeDeclarationParserRuleCall_4()); | ||
185 | } | ||
186 | this_ScopeDeclaration_4=ruleScopeDeclaration | ||
187 | { | ||
188 | $current = $this_ScopeDeclaration_4.current; | ||
189 | afterParserOrEnumRuleCall(); | ||
190 | } | ||
191 | ) | ||
192 | ; | ||
193 | |||
194 | // Entry rule entryRuleClassDeclaration | ||
195 | entryRuleClassDeclaration returns [EObject current=null]: | ||
196 | { newCompositeNode(grammarAccess.getClassDeclarationRule()); } | ||
197 | iv_ruleClassDeclaration=ruleClassDeclaration | ||
198 | { $current=$iv_ruleClassDeclaration.current; } | ||
199 | EOF; | ||
200 | |||
201 | // Rule ClassDeclaration | ||
202 | ruleClassDeclaration returns [EObject current=null] | ||
203 | @init { | ||
204 | enterRule(); | ||
205 | } | ||
206 | @after { | ||
207 | leaveRule(); | ||
208 | }: | ||
209 | ( | ||
210 | ( | ||
211 | ( | ||
212 | lv_abstract_0_0='abstract' | ||
213 | { | ||
214 | newLeafNode(lv_abstract_0_0, grammarAccess.getClassDeclarationAccess().getAbstractAbstractKeyword_0_0()); | ||
215 | } | ||
216 | { | ||
217 | if ($current==null) { | ||
218 | $current = createModelElement(grammarAccess.getClassDeclarationRule()); | ||
219 | } | ||
220 | setWithLastConsumed($current, "abstract", lv_abstract_0_0 != null, "abstract"); | ||
221 | } | ||
222 | ) | ||
223 | )? | ||
224 | otherlv_1='class' | ||
225 | { | ||
226 | newLeafNode(otherlv_1, grammarAccess.getClassDeclarationAccess().getClassKeyword_1()); | ||
227 | } | ||
228 | ( | ||
229 | ( | ||
230 | { | ||
231 | newCompositeNode(grammarAccess.getClassDeclarationAccess().getNameIdentifierParserRuleCall_2_0()); | ||
232 | } | ||
233 | lv_name_2_0=ruleIdentifier | ||
234 | { | ||
235 | if ($current==null) { | ||
236 | $current = createModelElementForParent(grammarAccess.getClassDeclarationRule()); | ||
237 | } | ||
238 | set( | ||
239 | $current, | ||
240 | "name", | ||
241 | lv_name_2_0, | ||
242 | "org.eclipse.viatra.solver.language.Problem.Identifier"); | ||
243 | afterParserOrEnumRuleCall(); | ||
244 | } | ||
245 | ) | ||
246 | ) | ||
247 | ( | ||
248 | otherlv_3='extends' | ||
249 | { | ||
250 | newLeafNode(otherlv_3, grammarAccess.getClassDeclarationAccess().getExtendsKeyword_3_0()); | ||
251 | } | ||
252 | ( | ||
253 | ( | ||
254 | { | ||
255 | if ($current==null) { | ||
256 | $current = createModelElement(grammarAccess.getClassDeclarationRule()); | ||
257 | } | ||
258 | } | ||
259 | { | ||
260 | newCompositeNode(grammarAccess.getClassDeclarationAccess().getSuperTypesRelationCrossReference_3_1_0()); | ||
261 | } | ||
262 | ruleQualifiedName | ||
263 | { | ||
264 | afterParserOrEnumRuleCall(); | ||
265 | } | ||
266 | ) | ||
267 | ) | ||
268 | ( | ||
269 | otherlv_5=',' | ||
270 | { | ||
271 | newLeafNode(otherlv_5, grammarAccess.getClassDeclarationAccess().getCommaKeyword_3_2_0()); | ||
272 | } | ||
273 | ( | ||
274 | ( | ||
275 | { | ||
276 | if ($current==null) { | ||
277 | $current = createModelElement(grammarAccess.getClassDeclarationRule()); | ||
278 | } | ||
279 | } | ||
280 | { | ||
281 | newCompositeNode(grammarAccess.getClassDeclarationAccess().getSuperTypesRelationCrossReference_3_2_1_0()); | ||
282 | } | ||
283 | ruleQualifiedName | ||
284 | { | ||
285 | afterParserOrEnumRuleCall(); | ||
286 | } | ||
287 | ) | ||
288 | ) | ||
289 | )* | ||
290 | )? | ||
291 | ( | ||
292 | ( | ||
293 | otherlv_7='{' | ||
294 | { | ||
295 | newLeafNode(otherlv_7, grammarAccess.getClassDeclarationAccess().getLeftCurlyBracketKeyword_4_0_0()); | ||
296 | } | ||
297 | ( | ||
298 | ( | ||
299 | ( | ||
300 | { | ||
301 | newCompositeNode(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsReferenceDeclarationParserRuleCall_4_0_1_0_0()); | ||
302 | } | ||
303 | lv_referenceDeclarations_8_0=ruleReferenceDeclaration | ||
304 | { | ||
305 | if ($current==null) { | ||
306 | $current = createModelElementForParent(grammarAccess.getClassDeclarationRule()); | ||
307 | } | ||
308 | add( | ||
309 | $current, | ||
310 | "referenceDeclarations", | ||
311 | lv_referenceDeclarations_8_0, | ||
312 | "org.eclipse.viatra.solver.language.Problem.ReferenceDeclaration"); | ||
313 | afterParserOrEnumRuleCall(); | ||
314 | } | ||
315 | ) | ||
316 | ) | ||
317 | ( | ||
318 | otherlv_9=';' | ||
319 | { | ||
320 | newLeafNode(otherlv_9, grammarAccess.getClassDeclarationAccess().getSemicolonKeyword_4_0_1_1()); | ||
321 | } | ||
322 | )? | ||
323 | )* | ||
324 | otherlv_10='}' | ||
325 | { | ||
326 | newLeafNode(otherlv_10, grammarAccess.getClassDeclarationAccess().getRightCurlyBracketKeyword_4_0_2()); | ||
327 | } | ||
328 | ) | ||
329 | | | ||
330 | otherlv_11='.' | ||
331 | { | ||
332 | newLeafNode(otherlv_11, grammarAccess.getClassDeclarationAccess().getFullStopKeyword_4_1()); | ||
333 | } | ||
334 | ) | ||
335 | ) | ||
336 | ; | ||
337 | |||
338 | // Entry rule entryRuleEnumDeclaration | ||
339 | entryRuleEnumDeclaration returns [EObject current=null]: | ||
340 | { newCompositeNode(grammarAccess.getEnumDeclarationRule()); } | ||
341 | iv_ruleEnumDeclaration=ruleEnumDeclaration | ||
342 | { $current=$iv_ruleEnumDeclaration.current; } | ||
343 | EOF; | ||
344 | |||
345 | // Rule EnumDeclaration | ||
346 | ruleEnumDeclaration returns [EObject current=null] | ||
347 | @init { | ||
348 | enterRule(); | ||
349 | } | ||
350 | @after { | ||
351 | leaveRule(); | ||
352 | }: | ||
353 | ( | ||
354 | otherlv_0='enum' | ||
355 | { | ||
356 | newLeafNode(otherlv_0, grammarAccess.getEnumDeclarationAccess().getEnumKeyword_0()); | ||
357 | } | ||
358 | ( | ||
359 | ( | ||
360 | { | ||
361 | newCompositeNode(grammarAccess.getEnumDeclarationAccess().getNameIdentifierParserRuleCall_1_0()); | ||
362 | } | ||
363 | lv_name_1_0=ruleIdentifier | ||
364 | { | ||
365 | if ($current==null) { | ||
366 | $current = createModelElementForParent(grammarAccess.getEnumDeclarationRule()); | ||
367 | } | ||
368 | set( | ||
369 | $current, | ||
370 | "name", | ||
371 | lv_name_1_0, | ||
372 | "org.eclipse.viatra.solver.language.Problem.Identifier"); | ||
373 | afterParserOrEnumRuleCall(); | ||
374 | } | ||
375 | ) | ||
376 | ) | ||
377 | ( | ||
378 | ( | ||
379 | otherlv_2='{' | ||
380 | { | ||
381 | newLeafNode(otherlv_2, grammarAccess.getEnumDeclarationAccess().getLeftCurlyBracketKeyword_2_0_0()); | ||
382 | } | ||
383 | ( | ||
384 | ( | ||
385 | ( | ||
386 | { | ||
387 | newCompositeNode(grammarAccess.getEnumDeclarationAccess().getLiteralsEnumLiteralParserRuleCall_2_0_1_0_0()); | ||
388 | } | ||
389 | lv_literals_3_0=ruleEnumLiteral | ||
390 | { | ||
391 | if ($current==null) { | ||
392 | $current = createModelElementForParent(grammarAccess.getEnumDeclarationRule()); | ||
393 | } | ||
394 | add( | ||
395 | $current, | ||
396 | "literals", | ||
397 | lv_literals_3_0, | ||
398 | "org.eclipse.viatra.solver.language.Problem.EnumLiteral"); | ||
399 | afterParserOrEnumRuleCall(); | ||
400 | } | ||
401 | ) | ||
402 | ) | ||
403 | ( | ||
404 | otherlv_4=',' | ||
405 | { | ||
406 | newLeafNode(otherlv_4, grammarAccess.getEnumDeclarationAccess().getCommaKeyword_2_0_1_1_0()); | ||
407 | } | ||
408 | ( | ||
409 | ( | ||
410 | { | ||
411 | newCompositeNode(grammarAccess.getEnumDeclarationAccess().getLiteralsEnumLiteralParserRuleCall_2_0_1_1_1_0()); | ||
412 | } | ||
413 | lv_literals_5_0=ruleEnumLiteral | ||
414 | { | ||
415 | if ($current==null) { | ||
416 | $current = createModelElementForParent(grammarAccess.getEnumDeclarationRule()); | ||
417 | } | ||
418 | add( | ||
419 | $current, | ||
420 | "literals", | ||
421 | lv_literals_5_0, | ||
422 | "org.eclipse.viatra.solver.language.Problem.EnumLiteral"); | ||
423 | afterParserOrEnumRuleCall(); | ||
424 | } | ||
425 | ) | ||
426 | ) | ||
427 | )* | ||
428 | ( | ||
429 | otherlv_6=',' | ||
430 | { | ||
431 | newLeafNode(otherlv_6, grammarAccess.getEnumDeclarationAccess().getCommaKeyword_2_0_1_2_0()); | ||
432 | } | ||
433 | | | ||
434 | otherlv_7=';' | ||
435 | { | ||
436 | newLeafNode(otherlv_7, grammarAccess.getEnumDeclarationAccess().getSemicolonKeyword_2_0_1_2_1()); | ||
437 | } | ||
438 | )? | ||
439 | )? | ||
440 | otherlv_8='}' | ||
441 | { | ||
442 | newLeafNode(otherlv_8, grammarAccess.getEnumDeclarationAccess().getRightCurlyBracketKeyword_2_0_2()); | ||
443 | } | ||
444 | ) | ||
445 | | | ||
446 | otherlv_9='.' | ||
447 | { | ||
448 | newLeafNode(otherlv_9, grammarAccess.getEnumDeclarationAccess().getFullStopKeyword_2_1()); | ||
449 | } | ||
450 | ) | ||
451 | ) | ||
452 | ; | ||
453 | |||
454 | // Entry rule entryRuleEnumLiteral | ||
455 | entryRuleEnumLiteral returns [EObject current=null]: | ||
456 | { newCompositeNode(grammarAccess.getEnumLiteralRule()); } | ||
457 | iv_ruleEnumLiteral=ruleEnumLiteral | ||
458 | { $current=$iv_ruleEnumLiteral.current; } | ||
459 | EOF; | ||
460 | |||
461 | // Rule EnumLiteral | ||
462 | ruleEnumLiteral returns [EObject current=null] | ||
463 | @init { | ||
464 | enterRule(); | ||
465 | } | ||
466 | @after { | ||
467 | leaveRule(); | ||
468 | }: | ||
469 | ( | ||
470 | ( | ||
471 | { | ||
472 | newCompositeNode(grammarAccess.getEnumLiteralAccess().getNameQuotedOrUnquotedIdParserRuleCall_0()); | ||
473 | } | ||
474 | lv_name_0_0=ruleQuotedOrUnquotedId | ||
475 | { | ||
476 | if ($current==null) { | ||
477 | $current = createModelElementForParent(grammarAccess.getEnumLiteralRule()); | ||
478 | } | ||
479 | set( | ||
480 | $current, | ||
481 | "name", | ||
482 | lv_name_0_0, | ||
483 | "org.eclipse.viatra.solver.language.Problem.QuotedOrUnquotedId"); | ||
484 | afterParserOrEnumRuleCall(); | ||
485 | } | ||
486 | ) | ||
487 | ) | ||
488 | ; | ||
489 | |||
490 | // Entry rule entryRuleReferenceDeclaration | ||
491 | entryRuleReferenceDeclaration returns [EObject current=null]: | ||
492 | { newCompositeNode(grammarAccess.getReferenceDeclarationRule()); } | ||
493 | iv_ruleReferenceDeclaration=ruleReferenceDeclaration | ||
494 | { $current=$iv_ruleReferenceDeclaration.current; } | ||
495 | EOF; | ||
496 | |||
497 | // Rule ReferenceDeclaration | ||
498 | ruleReferenceDeclaration returns [EObject current=null] | ||
499 | @init { | ||
500 | enterRule(); | ||
501 | } | ||
502 | @after { | ||
503 | leaveRule(); | ||
504 | }: | ||
505 | ( | ||
506 | ( | ||
507 | ( | ||
508 | ( | ||
509 | lv_containment_0_0='contains' | ||
510 | { | ||
511 | newLeafNode(lv_containment_0_0, grammarAccess.getReferenceDeclarationAccess().getContainmentContainsKeyword_0_0_0()); | ||
512 | } | ||
513 | { | ||
514 | if ($current==null) { | ||
515 | $current = createModelElement(grammarAccess.getReferenceDeclarationRule()); | ||
516 | } | ||
517 | setWithLastConsumed($current, "containment", lv_containment_0_0 != null, "contains"); | ||
518 | } | ||
519 | ) | ||
520 | ) | ||
521 | | | ||
522 | otherlv_1='refers' | ||
523 | { | ||
524 | newLeafNode(otherlv_1, grammarAccess.getReferenceDeclarationAccess().getRefersKeyword_0_1()); | ||
525 | } | ||
526 | )? | ||
527 | ( | ||
528 | ( | ||
529 | { | ||
530 | if ($current==null) { | ||
531 | $current = createModelElement(grammarAccess.getReferenceDeclarationRule()); | ||
532 | } | ||
533 | } | ||
534 | { | ||
535 | newCompositeNode(grammarAccess.getReferenceDeclarationAccess().getReferenceTypeRelationCrossReference_1_0()); | ||
536 | } | ||
537 | ruleQualifiedName | ||
538 | { | ||
539 | afterParserOrEnumRuleCall(); | ||
540 | } | ||
541 | ) | ||
542 | ) | ||
543 | ( | ||
544 | otherlv_3='[' | ||
545 | { | ||
546 | newLeafNode(otherlv_3, grammarAccess.getReferenceDeclarationAccess().getLeftSquareBracketKeyword_2_0()); | ||
547 | } | ||
548 | ( | ||
549 | ( | ||
550 | { | ||
551 | newCompositeNode(grammarAccess.getReferenceDeclarationAccess().getMultiplicityMultiplicityParserRuleCall_2_1_0()); | ||
552 | } | ||
553 | lv_multiplicity_4_0=ruleMultiplicity | ||
554 | { | ||
555 | if ($current==null) { | ||
556 | $current = createModelElementForParent(grammarAccess.getReferenceDeclarationRule()); | ||
557 | } | ||
558 | set( | ||
559 | $current, | ||
560 | "multiplicity", | ||
561 | lv_multiplicity_4_0, | ||
562 | "org.eclipse.viatra.solver.language.Problem.Multiplicity"); | ||
563 | afterParserOrEnumRuleCall(); | ||
564 | } | ||
565 | ) | ||
566 | ) | ||
567 | otherlv_5=']' | ||
568 | { | ||
569 | newLeafNode(otherlv_5, grammarAccess.getReferenceDeclarationAccess().getRightSquareBracketKeyword_2_2()); | ||
570 | } | ||
571 | )? | ||
572 | ( | ||
573 | ( | ||
574 | { | ||
575 | newCompositeNode(grammarAccess.getReferenceDeclarationAccess().getNameIdentifierParserRuleCall_3_0()); | ||
576 | } | ||
577 | lv_name_6_0=ruleIdentifier | ||
578 | { | ||
579 | if ($current==null) { | ||
580 | $current = createModelElementForParent(grammarAccess.getReferenceDeclarationRule()); | ||
581 | } | ||
582 | set( | ||
583 | $current, | ||
584 | "name", | ||
585 | lv_name_6_0, | ||
586 | "org.eclipse.viatra.solver.language.Problem.Identifier"); | ||
587 | afterParserOrEnumRuleCall(); | ||
588 | } | ||
589 | ) | ||
590 | ) | ||
591 | ( | ||
592 | otherlv_7='opposite' | ||
593 | { | ||
594 | newLeafNode(otherlv_7, grammarAccess.getReferenceDeclarationAccess().getOppositeKeyword_4_0()); | ||
595 | } | ||
596 | ( | ||
597 | ( | ||
598 | { | ||
599 | if ($current==null) { | ||
600 | $current = createModelElement(grammarAccess.getReferenceDeclarationRule()); | ||
601 | } | ||
602 | } | ||
603 | { | ||
604 | newCompositeNode(grammarAccess.getReferenceDeclarationAccess().getOppositeReferenceDeclarationCrossReference_4_1_0()); | ||
605 | } | ||
606 | ruleQualifiedName | ||
607 | { | ||
608 | afterParserOrEnumRuleCall(); | ||
609 | } | ||
610 | ) | ||
611 | ) | ||
612 | )? | ||
613 | ) | ||
614 | ; | ||
615 | |||
616 | // Entry rule entryRulePredicateDefinition | ||
617 | entryRulePredicateDefinition returns [EObject current=null]: | ||
618 | { newCompositeNode(grammarAccess.getPredicateDefinitionRule()); } | ||
619 | iv_rulePredicateDefinition=rulePredicateDefinition | ||
620 | { $current=$iv_rulePredicateDefinition.current; } | ||
621 | EOF; | ||
622 | |||
623 | // Rule PredicateDefinition | ||
624 | rulePredicateDefinition returns [EObject current=null] | ||
625 | @init { | ||
626 | enterRule(); | ||
627 | } | ||
628 | @after { | ||
629 | leaveRule(); | ||
630 | }: | ||
631 | ( | ||
632 | ( | ||
633 | ( | ||
634 | ( | ||
635 | ( | ||
636 | lv_error_0_0='error' | ||
637 | { | ||
638 | newLeafNode(lv_error_0_0, grammarAccess.getPredicateDefinitionAccess().getErrorErrorKeyword_0_0_0_0()); | ||
639 | } | ||
640 | { | ||
641 | if ($current==null) { | ||
642 | $current = createModelElement(grammarAccess.getPredicateDefinitionRule()); | ||
643 | } | ||
644 | setWithLastConsumed($current, "error", lv_error_0_0 != null, "error"); | ||
645 | } | ||
646 | ) | ||
647 | ) | ||
648 | ( | ||
649 | otherlv_1='pred' | ||
650 | { | ||
651 | newLeafNode(otherlv_1, grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_0_1()); | ||
652 | } | ||
653 | )? | ||
654 | ) | ||
655 | | | ||
656 | otherlv_2='pred' | ||
657 | { | ||
658 | newLeafNode(otherlv_2, grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_1()); | ||
659 | } | ||
660 | ) | ||
661 | ( | ||
662 | ( | ||
663 | { | ||
664 | newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getNameIdentifierParserRuleCall_1_0()); | ||
665 | } | ||
666 | lv_name_3_0=ruleIdentifier | ||
667 | { | ||
668 | if ($current==null) { | ||
669 | $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); | ||
670 | } | ||
671 | set( | ||
672 | $current, | ||
673 | "name", | ||
674 | lv_name_3_0, | ||
675 | "org.eclipse.viatra.solver.language.Problem.Identifier"); | ||
676 | afterParserOrEnumRuleCall(); | ||
677 | } | ||
678 | ) | ||
679 | ) | ||
680 | otherlv_4='(' | ||
681 | { | ||
682 | newLeafNode(otherlv_4, grammarAccess.getPredicateDefinitionAccess().getLeftParenthesisKeyword_2()); | ||
683 | } | ||
684 | ( | ||
685 | ( | ||
686 | ( | ||
687 | { | ||
688 | newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getParametersParameterParserRuleCall_3_0_0()); | ||
689 | } | ||
690 | lv_parameters_5_0=ruleParameter | ||
691 | { | ||
692 | if ($current==null) { | ||
693 | $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); | ||
694 | } | ||
695 | add( | ||
696 | $current, | ||
697 | "parameters", | ||
698 | lv_parameters_5_0, | ||
699 | "org.eclipse.viatra.solver.language.Problem.Parameter"); | ||
700 | afterParserOrEnumRuleCall(); | ||
701 | } | ||
702 | ) | ||
703 | ) | ||
704 | ( | ||
705 | otherlv_6=',' | ||
706 | { | ||
707 | newLeafNode(otherlv_6, grammarAccess.getPredicateDefinitionAccess().getCommaKeyword_3_1_0()); | ||
708 | } | ||
709 | ( | ||
710 | ( | ||
711 | { | ||
712 | newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getParametersParameterParserRuleCall_3_1_1_0()); | ||
713 | } | ||
714 | lv_parameters_7_0=ruleParameter | ||
715 | { | ||
716 | if ($current==null) { | ||
717 | $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); | ||
718 | } | ||
719 | add( | ||
720 | $current, | ||
721 | "parameters", | ||
722 | lv_parameters_7_0, | ||
723 | "org.eclipse.viatra.solver.language.Problem.Parameter"); | ||
724 | afterParserOrEnumRuleCall(); | ||
725 | } | ||
726 | ) | ||
727 | ) | ||
728 | )* | ||
729 | )? | ||
730 | otherlv_8=')' | ||
731 | { | ||
732 | newLeafNode(otherlv_8, grammarAccess.getPredicateDefinitionAccess().getRightParenthesisKeyword_4()); | ||
733 | } | ||
734 | ( | ||
735 | otherlv_9=':-' | ||
736 | { | ||
737 | newLeafNode(otherlv_9, grammarAccess.getPredicateDefinitionAccess().getColonHyphenMinusKeyword_5_0()); | ||
738 | } | ||
739 | ( | ||
740 | ( | ||
741 | { | ||
742 | newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getBodiesConjunctionParserRuleCall_5_1_0()); | ||
743 | } | ||
744 | lv_bodies_10_0=ruleConjunction | ||
745 | { | ||
746 | if ($current==null) { | ||
747 | $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); | ||
748 | } | ||
749 | add( | ||
750 | $current, | ||
751 | "bodies", | ||
752 | lv_bodies_10_0, | ||
753 | "org.eclipse.viatra.solver.language.Problem.Conjunction"); | ||
754 | afterParserOrEnumRuleCall(); | ||
755 | } | ||
756 | ) | ||
757 | ) | ||
758 | ( | ||
759 | otherlv_11=';' | ||
760 | { | ||
761 | newLeafNode(otherlv_11, grammarAccess.getPredicateDefinitionAccess().getSemicolonKeyword_5_2_0()); | ||
762 | } | ||
763 | ( | ||
764 | ( | ||
765 | { | ||
766 | newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getBodiesConjunctionParserRuleCall_5_2_1_0()); | ||
767 | } | ||
768 | lv_bodies_12_0=ruleConjunction | ||
769 | { | ||
770 | if ($current==null) { | ||
771 | $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); | ||
772 | } | ||
773 | add( | ||
774 | $current, | ||
775 | "bodies", | ||
776 | lv_bodies_12_0, | ||
777 | "org.eclipse.viatra.solver.language.Problem.Conjunction"); | ||
778 | afterParserOrEnumRuleCall(); | ||
779 | } | ||
780 | ) | ||
781 | ) | ||
782 | )* | ||
783 | )? | ||
784 | otherlv_13='.' | ||
785 | { | ||
786 | newLeafNode(otherlv_13, grammarAccess.getPredicateDefinitionAccess().getFullStopKeyword_6()); | ||
787 | } | ||
788 | ) | ||
789 | ; | ||
790 | |||
791 | // Entry rule entryRuleParameter | ||
792 | entryRuleParameter returns [EObject current=null]: | ||
793 | { newCompositeNode(grammarAccess.getParameterRule()); } | ||
794 | iv_ruleParameter=ruleParameter | ||
795 | { $current=$iv_ruleParameter.current; } | ||
796 | EOF; | ||
797 | |||
798 | // Rule Parameter | ||
799 | ruleParameter returns [EObject current=null] | ||
800 | @init { | ||
801 | enterRule(); | ||
802 | } | ||
803 | @after { | ||
804 | leaveRule(); | ||
805 | }: | ||
806 | ( | ||
807 | ( | ||
808 | ( | ||
809 | { | ||
810 | if ($current==null) { | ||
811 | $current = createModelElement(grammarAccess.getParameterRule()); | ||
812 | } | ||
813 | } | ||
814 | { | ||
815 | newCompositeNode(grammarAccess.getParameterAccess().getParameterTypeRelationCrossReference_0_0()); | ||
816 | } | ||
817 | ruleQualifiedName | ||
818 | { | ||
819 | afterParserOrEnumRuleCall(); | ||
820 | } | ||
821 | ) | ||
822 | )? | ||
823 | ( | ||
824 | ( | ||
825 | { | ||
826 | newCompositeNode(grammarAccess.getParameterAccess().getNameIdentifierParserRuleCall_1_0()); | ||
827 | } | ||
828 | lv_name_1_0=ruleIdentifier | ||
829 | { | ||
830 | if ($current==null) { | ||
831 | $current = createModelElementForParent(grammarAccess.getParameterRule()); | ||
832 | } | ||
833 | set( | ||
834 | $current, | ||
835 | "name", | ||
836 | lv_name_1_0, | ||
837 | "org.eclipse.viatra.solver.language.Problem.Identifier"); | ||
838 | afterParserOrEnumRuleCall(); | ||
839 | } | ||
840 | ) | ||
841 | ) | ||
842 | ) | ||
843 | ; | ||
844 | |||
845 | // Entry rule entryRuleConjunction | ||
846 | entryRuleConjunction returns [EObject current=null]: | ||
847 | { newCompositeNode(grammarAccess.getConjunctionRule()); } | ||
848 | iv_ruleConjunction=ruleConjunction | ||
849 | { $current=$iv_ruleConjunction.current; } | ||
850 | EOF; | ||
851 | |||
852 | // Rule Conjunction | ||
853 | ruleConjunction returns [EObject current=null] | ||
854 | @init { | ||
855 | enterRule(); | ||
856 | } | ||
857 | @after { | ||
858 | leaveRule(); | ||
859 | }: | ||
860 | ( | ||
861 | ( | ||
862 | ( | ||
863 | { | ||
864 | newCompositeNode(grammarAccess.getConjunctionAccess().getLiteralsLiteralParserRuleCall_0_0()); | ||
865 | } | ||
866 | lv_literals_0_0=ruleLiteral | ||
867 | { | ||
868 | if ($current==null) { | ||
869 | $current = createModelElementForParent(grammarAccess.getConjunctionRule()); | ||
870 | } | ||
871 | add( | ||
872 | $current, | ||
873 | "literals", | ||
874 | lv_literals_0_0, | ||
875 | "org.eclipse.viatra.solver.language.Problem.Literal"); | ||
876 | afterParserOrEnumRuleCall(); | ||
877 | } | ||
878 | ) | ||
879 | ) | ||
880 | ( | ||
881 | otherlv_1=',' | ||
882 | { | ||
883 | newLeafNode(otherlv_1, grammarAccess.getConjunctionAccess().getCommaKeyword_1_0()); | ||
884 | } | ||
885 | ( | ||
886 | ( | ||
887 | { | ||
888 | newCompositeNode(grammarAccess.getConjunctionAccess().getLiteralsLiteralParserRuleCall_1_1_0()); | ||
889 | } | ||
890 | lv_literals_2_0=ruleLiteral | ||
891 | { | ||
892 | if ($current==null) { | ||
893 | $current = createModelElementForParent(grammarAccess.getConjunctionRule()); | ||
894 | } | ||
895 | add( | ||
896 | $current, | ||
897 | "literals", | ||
898 | lv_literals_2_0, | ||
899 | "org.eclipse.viatra.solver.language.Problem.Literal"); | ||
900 | afterParserOrEnumRuleCall(); | ||
901 | } | ||
902 | ) | ||
903 | ) | ||
904 | )* | ||
905 | ) | ||
906 | ; | ||
907 | |||
908 | // Entry rule entryRuleLiteral | ||
909 | entryRuleLiteral returns [EObject current=null]: | ||
910 | { newCompositeNode(grammarAccess.getLiteralRule()); } | ||
911 | iv_ruleLiteral=ruleLiteral | ||
912 | { $current=$iv_ruleLiteral.current; } | ||
913 | EOF; | ||
914 | |||
915 | // Rule Literal | ||
916 | ruleLiteral returns [EObject current=null] | ||
917 | @init { | ||
918 | enterRule(); | ||
919 | } | ||
920 | @after { | ||
921 | leaveRule(); | ||
922 | }: | ||
923 | ( | ||
924 | { | ||
925 | newCompositeNode(grammarAccess.getLiteralAccess().getAtomParserRuleCall_0()); | ||
926 | } | ||
927 | this_Atom_0=ruleAtom | ||
928 | { | ||
929 | $current = $this_Atom_0.current; | ||
930 | afterParserOrEnumRuleCall(); | ||
931 | } | ||
932 | | | ||
933 | { | ||
934 | newCompositeNode(grammarAccess.getLiteralAccess().getNegativeLiteralParserRuleCall_1()); | ||
935 | } | ||
936 | this_NegativeLiteral_1=ruleNegativeLiteral | ||
937 | { | ||
938 | $current = $this_NegativeLiteral_1.current; | ||
939 | afterParserOrEnumRuleCall(); | ||
940 | } | ||
941 | ) | ||
942 | ; | ||
943 | |||
944 | // Entry rule entryRuleNegativeLiteral | ||
945 | entryRuleNegativeLiteral returns [EObject current=null]: | ||
946 | { newCompositeNode(grammarAccess.getNegativeLiteralRule()); } | ||
947 | iv_ruleNegativeLiteral=ruleNegativeLiteral | ||
948 | { $current=$iv_ruleNegativeLiteral.current; } | ||
949 | EOF; | ||
950 | |||
951 | // Rule NegativeLiteral | ||
952 | ruleNegativeLiteral returns [EObject current=null] | ||
953 | @init { | ||
954 | enterRule(); | ||
955 | } | ||
956 | @after { | ||
957 | leaveRule(); | ||
958 | }: | ||
959 | ( | ||
960 | otherlv_0='!' | ||
961 | { | ||
962 | newLeafNode(otherlv_0, grammarAccess.getNegativeLiteralAccess().getExclamationMarkKeyword_0()); | ||
963 | } | ||
964 | ( | ||
965 | ( | ||
966 | { | ||
967 | newCompositeNode(grammarAccess.getNegativeLiteralAccess().getAtomAtomParserRuleCall_1_0()); | ||
968 | } | ||
969 | lv_atom_1_0=ruleAtom | ||
970 | { | ||
971 | if ($current==null) { | ||
972 | $current = createModelElementForParent(grammarAccess.getNegativeLiteralRule()); | ||
973 | } | ||
974 | set( | ||
975 | $current, | ||
976 | "atom", | ||
977 | lv_atom_1_0, | ||
978 | "org.eclipse.viatra.solver.language.Problem.Atom"); | ||
979 | afterParserOrEnumRuleCall(); | ||
980 | } | ||
981 | ) | ||
982 | ) | ||
983 | ) | ||
984 | ; | ||
985 | |||
986 | // Entry rule entryRuleAtom | ||
987 | entryRuleAtom returns [EObject current=null]: | ||
988 | { newCompositeNode(grammarAccess.getAtomRule()); } | ||
989 | iv_ruleAtom=ruleAtom | ||
990 | { $current=$iv_ruleAtom.current; } | ||
991 | EOF; | ||
992 | |||
993 | // Rule Atom | ||
994 | ruleAtom returns [EObject current=null] | ||
995 | @init { | ||
996 | enterRule(); | ||
997 | } | ||
998 | @after { | ||
999 | leaveRule(); | ||
1000 | }: | ||
1001 | ( | ||
1002 | ( | ||
1003 | ( | ||
1004 | { | ||
1005 | if ($current==null) { | ||
1006 | $current = createModelElement(grammarAccess.getAtomRule()); | ||
1007 | } | ||
1008 | } | ||
1009 | { | ||
1010 | newCompositeNode(grammarAccess.getAtomAccess().getRelationRelationCrossReference_0_0()); | ||
1011 | } | ||
1012 | ruleQualifiedName | ||
1013 | { | ||
1014 | afterParserOrEnumRuleCall(); | ||
1015 | } | ||
1016 | ) | ||
1017 | ) | ||
1018 | ( | ||
1019 | ( | ||
1020 | lv_transitiveClosure_1_0='+' | ||
1021 | { | ||
1022 | newLeafNode(lv_transitiveClosure_1_0, grammarAccess.getAtomAccess().getTransitiveClosurePlusSignKeyword_1_0()); | ||
1023 | } | ||
1024 | { | ||
1025 | if ($current==null) { | ||
1026 | $current = createModelElement(grammarAccess.getAtomRule()); | ||
1027 | } | ||
1028 | setWithLastConsumed($current, "transitiveClosure", lv_transitiveClosure_1_0 != null, "+"); | ||
1029 | } | ||
1030 | ) | ||
1031 | )? | ||
1032 | otherlv_2='(' | ||
1033 | { | ||
1034 | newLeafNode(otherlv_2, grammarAccess.getAtomAccess().getLeftParenthesisKeyword_2()); | ||
1035 | } | ||
1036 | ( | ||
1037 | ( | ||
1038 | ( | ||
1039 | { | ||
1040 | newCompositeNode(grammarAccess.getAtomAccess().getArgumentsArgumentParserRuleCall_3_0_0()); | ||
1041 | } | ||
1042 | lv_arguments_3_0=ruleArgument | ||
1043 | { | ||
1044 | if ($current==null) { | ||
1045 | $current = createModelElementForParent(grammarAccess.getAtomRule()); | ||
1046 | } | ||
1047 | add( | ||
1048 | $current, | ||
1049 | "arguments", | ||
1050 | lv_arguments_3_0, | ||
1051 | "org.eclipse.viatra.solver.language.Problem.Argument"); | ||
1052 | afterParserOrEnumRuleCall(); | ||
1053 | } | ||
1054 | ) | ||
1055 | ) | ||
1056 | ( | ||
1057 | otherlv_4=',' | ||
1058 | { | ||
1059 | newLeafNode(otherlv_4, grammarAccess.getAtomAccess().getCommaKeyword_3_1_0()); | ||
1060 | } | ||
1061 | ( | ||
1062 | ( | ||
1063 | { | ||
1064 | newCompositeNode(grammarAccess.getAtomAccess().getArgumentsArgumentParserRuleCall_3_1_1_0()); | ||
1065 | } | ||
1066 | lv_arguments_5_0=ruleArgument | ||
1067 | { | ||
1068 | if ($current==null) { | ||
1069 | $current = createModelElementForParent(grammarAccess.getAtomRule()); | ||
1070 | } | ||
1071 | add( | ||
1072 | $current, | ||
1073 | "arguments", | ||
1074 | lv_arguments_5_0, | ||
1075 | "org.eclipse.viatra.solver.language.Problem.Argument"); | ||
1076 | afterParserOrEnumRuleCall(); | ||
1077 | } | ||
1078 | ) | ||
1079 | ) | ||
1080 | )* | ||
1081 | )? | ||
1082 | otherlv_6=')' | ||
1083 | { | ||
1084 | newLeafNode(otherlv_6, grammarAccess.getAtomAccess().getRightParenthesisKeyword_4()); | ||
1085 | } | ||
1086 | ) | ||
1087 | ; | ||
1088 | |||
1089 | // Entry rule entryRuleArgument | ||
1090 | entryRuleArgument returns [EObject current=null]: | ||
1091 | { newCompositeNode(grammarAccess.getArgumentRule()); } | ||
1092 | iv_ruleArgument=ruleArgument | ||
1093 | { $current=$iv_ruleArgument.current; } | ||
1094 | EOF; | ||
1095 | |||
1096 | // Rule Argument | ||
1097 | ruleArgument returns [EObject current=null] | ||
1098 | @init { | ||
1099 | enterRule(); | ||
1100 | } | ||
1101 | @after { | ||
1102 | leaveRule(); | ||
1103 | }: | ||
1104 | ( | ||
1105 | ( | ||
1106 | { | ||
1107 | if ($current==null) { | ||
1108 | $current = createModelElement(grammarAccess.getArgumentRule()); | ||
1109 | } | ||
1110 | } | ||
1111 | { | ||
1112 | newCompositeNode(grammarAccess.getArgumentAccess().getVariableOrNodeVariableOrNodeCrossReference_0()); | ||
1113 | } | ||
1114 | ruleQualifiedName | ||
1115 | { | ||
1116 | afterParserOrEnumRuleCall(); | ||
1117 | } | ||
1118 | ) | ||
1119 | ) | ||
1120 | ; | ||
1121 | |||
1122 | // Entry rule entryRuleAssertion | ||
1123 | entryRuleAssertion returns [EObject current=null]: | ||
1124 | { newCompositeNode(grammarAccess.getAssertionRule()); } | ||
1125 | iv_ruleAssertion=ruleAssertion | ||
1126 | { $current=$iv_ruleAssertion.current; } | ||
1127 | EOF; | ||
1128 | |||
1129 | // Rule Assertion | ||
1130 | ruleAssertion returns [EObject current=null] | ||
1131 | @init { | ||
1132 | enterRule(); | ||
1133 | } | ||
1134 | @after { | ||
1135 | leaveRule(); | ||
1136 | }: | ||
1137 | ( | ||
1138 | ( | ||
1139 | ( | ||
1140 | ( | ||
1141 | ( | ||
1142 | { | ||
1143 | if ($current==null) { | ||
1144 | $current = createModelElement(grammarAccess.getAssertionRule()); | ||
1145 | } | ||
1146 | } | ||
1147 | { | ||
1148 | newCompositeNode(grammarAccess.getAssertionAccess().getRelationRelationCrossReference_0_0_0_0()); | ||
1149 | } | ||
1150 | ruleQualifiedName | ||
1151 | { | ||
1152 | afterParserOrEnumRuleCall(); | ||
1153 | } | ||
1154 | ) | ||
1155 | ) | ||
1156 | otherlv_1='(' | ||
1157 | { | ||
1158 | newLeafNode(otherlv_1, grammarAccess.getAssertionAccess().getLeftParenthesisKeyword_0_0_1()); | ||
1159 | } | ||
1160 | ( | ||
1161 | ( | ||
1162 | ( | ||
1163 | { | ||
1164 | if ($current==null) { | ||
1165 | $current = createModelElement(grammarAccess.getAssertionRule()); | ||
1166 | } | ||
1167 | } | ||
1168 | { | ||
1169 | newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_0_2_0_0()); | ||
1170 | } | ||
1171 | ruleQualifiedName | ||
1172 | { | ||
1173 | afterParserOrEnumRuleCall(); | ||
1174 | } | ||
1175 | ) | ||
1176 | ) | ||
1177 | ( | ||
1178 | otherlv_3=',' | ||
1179 | { | ||
1180 | newLeafNode(otherlv_3, grammarAccess.getAssertionAccess().getCommaKeyword_0_0_2_1_0()); | ||
1181 | } | ||
1182 | ( | ||
1183 | ( | ||
1184 | { | ||
1185 | if ($current==null) { | ||
1186 | $current = createModelElement(grammarAccess.getAssertionRule()); | ||
1187 | } | ||
1188 | } | ||
1189 | { | ||
1190 | newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_0_2_1_1_0()); | ||
1191 | } | ||
1192 | ruleQualifiedName | ||
1193 | { | ||
1194 | afterParserOrEnumRuleCall(); | ||
1195 | } | ||
1196 | ) | ||
1197 | ) | ||
1198 | )* | ||
1199 | )? | ||
1200 | otherlv_5=')' | ||
1201 | { | ||
1202 | newLeafNode(otherlv_5, grammarAccess.getAssertionAccess().getRightParenthesisKeyword_0_0_3()); | ||
1203 | } | ||
1204 | otherlv_6=':' | ||
1205 | { | ||
1206 | newLeafNode(otherlv_6, grammarAccess.getAssertionAccess().getColonKeyword_0_0_4()); | ||
1207 | } | ||
1208 | ( | ||
1209 | ( | ||
1210 | { | ||
1211 | newCompositeNode(grammarAccess.getAssertionAccess().getValueLogicValueEnumRuleCall_0_0_5_0()); | ||
1212 | } | ||
1213 | lv_value_7_0=ruleLogicValue | ||
1214 | { | ||
1215 | if ($current==null) { | ||
1216 | $current = createModelElementForParent(grammarAccess.getAssertionRule()); | ||
1217 | } | ||
1218 | set( | ||
1219 | $current, | ||
1220 | "value", | ||
1221 | lv_value_7_0, | ||
1222 | "org.eclipse.viatra.solver.language.Problem.LogicValue"); | ||
1223 | afterParserOrEnumRuleCall(); | ||
1224 | } | ||
1225 | ) | ||
1226 | ) | ||
1227 | ) | ||
1228 | | | ||
1229 | ( | ||
1230 | ( | ||
1231 | ( | ||
1232 | { | ||
1233 | newCompositeNode(grammarAccess.getAssertionAccess().getValueShortLogicValueEnumRuleCall_0_1_0_0()); | ||
1234 | } | ||
1235 | lv_value_8_0=ruleShortLogicValue | ||
1236 | { | ||
1237 | if ($current==null) { | ||
1238 | $current = createModelElementForParent(grammarAccess.getAssertionRule()); | ||
1239 | } | ||
1240 | set( | ||
1241 | $current, | ||
1242 | "value", | ||
1243 | lv_value_8_0, | ||
1244 | "org.eclipse.viatra.solver.language.Problem.ShortLogicValue"); | ||
1245 | afterParserOrEnumRuleCall(); | ||
1246 | } | ||
1247 | ) | ||
1248 | )? | ||
1249 | ( | ||
1250 | ( | ||
1251 | { | ||
1252 | if ($current==null) { | ||
1253 | $current = createModelElement(grammarAccess.getAssertionRule()); | ||
1254 | } | ||
1255 | } | ||
1256 | { | ||
1257 | newCompositeNode(grammarAccess.getAssertionAccess().getRelationRelationCrossReference_0_1_1_0()); | ||
1258 | } | ||
1259 | ruleQualifiedName | ||
1260 | { | ||
1261 | afterParserOrEnumRuleCall(); | ||
1262 | } | ||
1263 | ) | ||
1264 | ) | ||
1265 | otherlv_10='(' | ||
1266 | { | ||
1267 | newLeafNode(otherlv_10, grammarAccess.getAssertionAccess().getLeftParenthesisKeyword_0_1_2()); | ||
1268 | } | ||
1269 | ( | ||
1270 | ( | ||
1271 | ( | ||
1272 | { | ||
1273 | if ($current==null) { | ||
1274 | $current = createModelElement(grammarAccess.getAssertionRule()); | ||
1275 | } | ||
1276 | } | ||
1277 | { | ||
1278 | newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_1_3_0_0()); | ||
1279 | } | ||
1280 | ruleQualifiedName | ||
1281 | { | ||
1282 | afterParserOrEnumRuleCall(); | ||
1283 | } | ||
1284 | ) | ||
1285 | ) | ||
1286 | ( | ||
1287 | otherlv_12=',' | ||
1288 | { | ||
1289 | newLeafNode(otherlv_12, grammarAccess.getAssertionAccess().getCommaKeyword_0_1_3_1_0()); | ||
1290 | } | ||
1291 | ( | ||
1292 | ( | ||
1293 | { | ||
1294 | if ($current==null) { | ||
1295 | $current = createModelElement(grammarAccess.getAssertionRule()); | ||
1296 | } | ||
1297 | } | ||
1298 | { | ||
1299 | newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_1_3_1_1_0()); | ||
1300 | } | ||
1301 | ruleQualifiedName | ||
1302 | { | ||
1303 | afterParserOrEnumRuleCall(); | ||
1304 | } | ||
1305 | ) | ||
1306 | ) | ||
1307 | )* | ||
1308 | )? | ||
1309 | otherlv_14=')' | ||
1310 | { | ||
1311 | newLeafNode(otherlv_14, grammarAccess.getAssertionAccess().getRightParenthesisKeyword_0_1_4()); | ||
1312 | } | ||
1313 | ) | ||
1314 | ) | ||
1315 | otherlv_15='.' | ||
1316 | { | ||
1317 | newLeafNode(otherlv_15, grammarAccess.getAssertionAccess().getFullStopKeyword_1()); | ||
1318 | } | ||
1319 | ) | ||
1320 | ; | ||
1321 | |||
1322 | // Entry rule entryRuleScopeDeclaration | ||
1323 | entryRuleScopeDeclaration returns [EObject current=null]: | ||
1324 | { newCompositeNode(grammarAccess.getScopeDeclarationRule()); } | ||
1325 | iv_ruleScopeDeclaration=ruleScopeDeclaration | ||
1326 | { $current=$iv_ruleScopeDeclaration.current; } | ||
1327 | EOF; | ||
1328 | |||
1329 | // Rule ScopeDeclaration | ||
1330 | ruleScopeDeclaration returns [EObject current=null] | ||
1331 | @init { | ||
1332 | enterRule(); | ||
1333 | } | ||
1334 | @after { | ||
1335 | leaveRule(); | ||
1336 | }: | ||
1337 | ( | ||
1338 | otherlv_0='scope' | ||
1339 | { | ||
1340 | newLeafNode(otherlv_0, grammarAccess.getScopeDeclarationAccess().getScopeKeyword_0()); | ||
1341 | } | ||
1342 | ( | ||
1343 | ( | ||
1344 | { | ||
1345 | newCompositeNode(grammarAccess.getScopeDeclarationAccess().getTypeScopesTypeScopeParserRuleCall_1_0()); | ||
1346 | } | ||
1347 | lv_typeScopes_1_0=ruleTypeScope | ||
1348 | { | ||
1349 | if ($current==null) { | ||
1350 | $current = createModelElementForParent(grammarAccess.getScopeDeclarationRule()); | ||
1351 | } | ||
1352 | add( | ||
1353 | $current, | ||
1354 | "typeScopes", | ||
1355 | lv_typeScopes_1_0, | ||
1356 | "org.eclipse.viatra.solver.language.Problem.TypeScope"); | ||
1357 | afterParserOrEnumRuleCall(); | ||
1358 | } | ||
1359 | ) | ||
1360 | ) | ||
1361 | ( | ||
1362 | otherlv_2=',' | ||
1363 | { | ||
1364 | newLeafNode(otherlv_2, grammarAccess.getScopeDeclarationAccess().getCommaKeyword_2_0()); | ||
1365 | } | ||
1366 | ( | ||
1367 | ( | ||
1368 | { | ||
1369 | newCompositeNode(grammarAccess.getScopeDeclarationAccess().getTypeScopesTypeScopeParserRuleCall_2_1_0()); | ||
1370 | } | ||
1371 | lv_typeScopes_3_0=ruleTypeScope | ||
1372 | { | ||
1373 | if ($current==null) { | ||
1374 | $current = createModelElementForParent(grammarAccess.getScopeDeclarationRule()); | ||
1375 | } | ||
1376 | add( | ||
1377 | $current, | ||
1378 | "typeScopes", | ||
1379 | lv_typeScopes_3_0, | ||
1380 | "org.eclipse.viatra.solver.language.Problem.TypeScope"); | ||
1381 | afterParserOrEnumRuleCall(); | ||
1382 | } | ||
1383 | ) | ||
1384 | ) | ||
1385 | )* | ||
1386 | otherlv_4='.' | ||
1387 | { | ||
1388 | newLeafNode(otherlv_4, grammarAccess.getScopeDeclarationAccess().getFullStopKeyword_3()); | ||
1389 | } | ||
1390 | ) | ||
1391 | ; | ||
1392 | |||
1393 | // Entry rule entryRuleTypeScope | ||
1394 | entryRuleTypeScope returns [EObject current=null]: | ||
1395 | { newCompositeNode(grammarAccess.getTypeScopeRule()); } | ||
1396 | iv_ruleTypeScope=ruleTypeScope | ||
1397 | { $current=$iv_ruleTypeScope.current; } | ||
1398 | EOF; | ||
1399 | |||
1400 | // Rule TypeScope | ||
1401 | ruleTypeScope returns [EObject current=null] | ||
1402 | @init { | ||
1403 | enterRule(); | ||
1404 | } | ||
1405 | @after { | ||
1406 | leaveRule(); | ||
1407 | }: | ||
1408 | ( | ||
1409 | ( | ||
1410 | ( | ||
1411 | { | ||
1412 | if ($current==null) { | ||
1413 | $current = createModelElement(grammarAccess.getTypeScopeRule()); | ||
1414 | } | ||
1415 | } | ||
1416 | otherlv_0=RULE_ID | ||
1417 | { | ||
1418 | newLeafNode(otherlv_0, grammarAccess.getTypeScopeAccess().getTargetTypeClassDeclarationCrossReference_0_0()); | ||
1419 | } | ||
1420 | ) | ||
1421 | ) | ||
1422 | ( | ||
1423 | ( | ||
1424 | ( | ||
1425 | lv_increment_1_0='+=' | ||
1426 | { | ||
1427 | newLeafNode(lv_increment_1_0, grammarAccess.getTypeScopeAccess().getIncrementPlusSignEqualsSignKeyword_1_0_0()); | ||
1428 | } | ||
1429 | { | ||
1430 | if ($current==null) { | ||
1431 | $current = createModelElement(grammarAccess.getTypeScopeRule()); | ||
1432 | } | ||
1433 | setWithLastConsumed($current, "increment", lv_increment_1_0 != null, "+="); | ||
1434 | } | ||
1435 | ) | ||
1436 | ) | ||
1437 | | | ||
1438 | otherlv_2='=' | ||
1439 | { | ||
1440 | newLeafNode(otherlv_2, grammarAccess.getTypeScopeAccess().getEqualsSignKeyword_1_1()); | ||
1441 | } | ||
1442 | ) | ||
1443 | ( | ||
1444 | ( | ||
1445 | { | ||
1446 | newCompositeNode(grammarAccess.getTypeScopeAccess().getMultiplicityDefiniteMultiplicityParserRuleCall_2_0()); | ||
1447 | } | ||
1448 | lv_multiplicity_3_0=ruleDefiniteMultiplicity | ||
1449 | { | ||
1450 | if ($current==null) { | ||
1451 | $current = createModelElementForParent(grammarAccess.getTypeScopeRule()); | ||
1452 | } | ||
1453 | set( | ||
1454 | $current, | ||
1455 | "multiplicity", | ||
1456 | lv_multiplicity_3_0, | ||
1457 | "org.eclipse.viatra.solver.language.Problem.DefiniteMultiplicity"); | ||
1458 | afterParserOrEnumRuleCall(); | ||
1459 | } | ||
1460 | ) | ||
1461 | ) | ||
1462 | ) | ||
1463 | ; | ||
1464 | |||
1465 | // Entry rule entryRuleMultiplicity | ||
1466 | entryRuleMultiplicity returns [EObject current=null]: | ||
1467 | { newCompositeNode(grammarAccess.getMultiplicityRule()); } | ||
1468 | iv_ruleMultiplicity=ruleMultiplicity | ||
1469 | { $current=$iv_ruleMultiplicity.current; } | ||
1470 | EOF; | ||
1471 | |||
1472 | // Rule Multiplicity | ||
1473 | ruleMultiplicity returns [EObject current=null] | ||
1474 | @init { | ||
1475 | enterRule(); | ||
1476 | } | ||
1477 | @after { | ||
1478 | leaveRule(); | ||
1479 | }: | ||
1480 | ( | ||
1481 | { | ||
1482 | newCompositeNode(grammarAccess.getMultiplicityAccess().getUnboundedMultiplicityParserRuleCall_0()); | ||
1483 | } | ||
1484 | this_UnboundedMultiplicity_0=ruleUnboundedMultiplicity | ||
1485 | { | ||
1486 | $current = $this_UnboundedMultiplicity_0.current; | ||
1487 | afterParserOrEnumRuleCall(); | ||
1488 | } | ||
1489 | | | ||
1490 | { | ||
1491 | newCompositeNode(grammarAccess.getMultiplicityAccess().getDefiniteMultiplicityParserRuleCall_1()); | ||
1492 | } | ||
1493 | this_DefiniteMultiplicity_1=ruleDefiniteMultiplicity | ||
1494 | { | ||
1495 | $current = $this_DefiniteMultiplicity_1.current; | ||
1496 | afterParserOrEnumRuleCall(); | ||
1497 | } | ||
1498 | ) | ||
1499 | ; | ||
1500 | |||
1501 | // Entry rule entryRuleDefiniteMultiplicity | ||
1502 | entryRuleDefiniteMultiplicity returns [EObject current=null]: | ||
1503 | { newCompositeNode(grammarAccess.getDefiniteMultiplicityRule()); } | ||
1504 | iv_ruleDefiniteMultiplicity=ruleDefiniteMultiplicity | ||
1505 | { $current=$iv_ruleDefiniteMultiplicity.current; } | ||
1506 | EOF; | ||
1507 | |||
1508 | // Rule DefiniteMultiplicity | ||
1509 | ruleDefiniteMultiplicity returns [EObject current=null] | ||
1510 | @init { | ||
1511 | enterRule(); | ||
1512 | } | ||
1513 | @after { | ||
1514 | leaveRule(); | ||
1515 | }: | ||
1516 | ( | ||
1517 | { | ||
1518 | newCompositeNode(grammarAccess.getDefiniteMultiplicityAccess().getRangeMultiplicityParserRuleCall_0()); | ||
1519 | } | ||
1520 | this_RangeMultiplicity_0=ruleRangeMultiplicity | ||
1521 | { | ||
1522 | $current = $this_RangeMultiplicity_0.current; | ||
1523 | afterParserOrEnumRuleCall(); | ||
1524 | } | ||
1525 | | | ||
1526 | { | ||
1527 | newCompositeNode(grammarAccess.getDefiniteMultiplicityAccess().getExactMultiplicityParserRuleCall_1()); | ||
1528 | } | ||
1529 | this_ExactMultiplicity_1=ruleExactMultiplicity | ||
1530 | { | ||
1531 | $current = $this_ExactMultiplicity_1.current; | ||
1532 | afterParserOrEnumRuleCall(); | ||
1533 | } | ||
1534 | ) | ||
1535 | ; | ||
1536 | |||
1537 | // Entry rule entryRuleUnboundedMultiplicity | ||
1538 | entryRuleUnboundedMultiplicity returns [EObject current=null]: | ||
1539 | { newCompositeNode(grammarAccess.getUnboundedMultiplicityRule()); } | ||
1540 | iv_ruleUnboundedMultiplicity=ruleUnboundedMultiplicity | ||
1541 | { $current=$iv_ruleUnboundedMultiplicity.current; } | ||
1542 | EOF; | ||
1543 | |||
1544 | // Rule UnboundedMultiplicity | ||
1545 | ruleUnboundedMultiplicity returns [EObject current=null] | ||
1546 | @init { | ||
1547 | enterRule(); | ||
1548 | } | ||
1549 | @after { | ||
1550 | leaveRule(); | ||
1551 | }: | ||
1552 | ( | ||
1553 | { | ||
1554 | $current = forceCreateModelElement( | ||
1555 | grammarAccess.getUnboundedMultiplicityAccess().getUnboundedMultiplicityAction(), | ||
1556 | $current); | ||
1557 | } | ||
1558 | ) | ||
1559 | ; | ||
1560 | |||
1561 | // Entry rule entryRuleRangeMultiplicity | ||
1562 | entryRuleRangeMultiplicity returns [EObject current=null]: | ||
1563 | { newCompositeNode(grammarAccess.getRangeMultiplicityRule()); } | ||
1564 | iv_ruleRangeMultiplicity=ruleRangeMultiplicity | ||
1565 | { $current=$iv_ruleRangeMultiplicity.current; } | ||
1566 | EOF; | ||
1567 | |||
1568 | // Rule RangeMultiplicity | ||
1569 | ruleRangeMultiplicity returns [EObject current=null] | ||
1570 | @init { | ||
1571 | enterRule(); | ||
1572 | } | ||
1573 | @after { | ||
1574 | leaveRule(); | ||
1575 | }: | ||
1576 | ( | ||
1577 | ( | ||
1578 | ( | ||
1579 | lv_lowerBound_0_0=RULE_INT | ||
1580 | { | ||
1581 | newLeafNode(lv_lowerBound_0_0, grammarAccess.getRangeMultiplicityAccess().getLowerBoundINTTerminalRuleCall_0_0()); | ||
1582 | } | ||
1583 | { | ||
1584 | if ($current==null) { | ||
1585 | $current = createModelElement(grammarAccess.getRangeMultiplicityRule()); | ||
1586 | } | ||
1587 | setWithLastConsumed( | ||
1588 | $current, | ||
1589 | "lowerBound", | ||
1590 | lv_lowerBound_0_0, | ||
1591 | "org.eclipse.xtext.common.Terminals.INT"); | ||
1592 | } | ||
1593 | ) | ||
1594 | ) | ||
1595 | otherlv_1='..' | ||
1596 | { | ||
1597 | newLeafNode(otherlv_1, grammarAccess.getRangeMultiplicityAccess().getFullStopFullStopKeyword_1()); | ||
1598 | } | ||
1599 | ( | ||
1600 | ( | ||
1601 | { | ||
1602 | newCompositeNode(grammarAccess.getRangeMultiplicityAccess().getUpperBoundUpperBoundParserRuleCall_2_0()); | ||
1603 | } | ||
1604 | lv_upperBound_2_0=ruleUpperBound | ||
1605 | { | ||
1606 | if ($current==null) { | ||
1607 | $current = createModelElementForParent(grammarAccess.getRangeMultiplicityRule()); | ||
1608 | } | ||
1609 | set( | ||
1610 | $current, | ||
1611 | "upperBound", | ||
1612 | lv_upperBound_2_0, | ||
1613 | "org.eclipse.viatra.solver.language.Problem.UpperBound"); | ||
1614 | afterParserOrEnumRuleCall(); | ||
1615 | } | ||
1616 | ) | ||
1617 | ) | ||
1618 | ) | ||
1619 | ; | ||
1620 | |||
1621 | // Entry rule entryRuleExactMultiplicity | ||
1622 | entryRuleExactMultiplicity returns [EObject current=null]: | ||
1623 | { newCompositeNode(grammarAccess.getExactMultiplicityRule()); } | ||
1624 | iv_ruleExactMultiplicity=ruleExactMultiplicity | ||
1625 | { $current=$iv_ruleExactMultiplicity.current; } | ||
1626 | EOF; | ||
1627 | |||
1628 | // Rule ExactMultiplicity | ||
1629 | ruleExactMultiplicity returns [EObject current=null] | ||
1630 | @init { | ||
1631 | enterRule(); | ||
1632 | } | ||
1633 | @after { | ||
1634 | leaveRule(); | ||
1635 | }: | ||
1636 | ( | ||
1637 | ( | ||
1638 | lv_exactValue_0_0=RULE_INT | ||
1639 | { | ||
1640 | newLeafNode(lv_exactValue_0_0, grammarAccess.getExactMultiplicityAccess().getExactValueINTTerminalRuleCall_0()); | ||
1641 | } | ||
1642 | { | ||
1643 | if ($current==null) { | ||
1644 | $current = createModelElement(grammarAccess.getExactMultiplicityRule()); | ||
1645 | } | ||
1646 | setWithLastConsumed( | ||
1647 | $current, | ||
1648 | "exactValue", | ||
1649 | lv_exactValue_0_0, | ||
1650 | "org.eclipse.xtext.common.Terminals.INT"); | ||
1651 | } | ||
1652 | ) | ||
1653 | ) | ||
1654 | ; | ||
1655 | |||
1656 | // Entry rule entryRuleUpperBound | ||
1657 | entryRuleUpperBound returns [String current=null]: | ||
1658 | { newCompositeNode(grammarAccess.getUpperBoundRule()); } | ||
1659 | iv_ruleUpperBound=ruleUpperBound | ||
1660 | { $current=$iv_ruleUpperBound.current.getText(); } | ||
1661 | EOF; | ||
1662 | |||
1663 | // Rule UpperBound | ||
1664 | ruleUpperBound returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] | ||
1665 | @init { | ||
1666 | enterRule(); | ||
1667 | } | ||
1668 | @after { | ||
1669 | leaveRule(); | ||
1670 | }: | ||
1671 | ( | ||
1672 | this_INT_0=RULE_INT | ||
1673 | { | ||
1674 | $current.merge(this_INT_0); | ||
1675 | } | ||
1676 | { | ||
1677 | newLeafNode(this_INT_0, grammarAccess.getUpperBoundAccess().getINTTerminalRuleCall_0()); | ||
1678 | } | ||
1679 | | | ||
1680 | kw='*' | ||
1681 | { | ||
1682 | $current.merge(kw); | ||
1683 | newLeafNode(kw, grammarAccess.getUpperBoundAccess().getAsteriskKeyword_1()); | ||
1684 | } | ||
1685 | ) | ||
1686 | ; | ||
1687 | |||
1688 | // Entry rule entryRuleQuotedOrUnquotedId | ||
1689 | entryRuleQuotedOrUnquotedId returns [String current=null]: | ||
1690 | { newCompositeNode(grammarAccess.getQuotedOrUnquotedIdRule()); } | ||
1691 | iv_ruleQuotedOrUnquotedId=ruleQuotedOrUnquotedId | ||
1692 | { $current=$iv_ruleQuotedOrUnquotedId.current.getText(); } | ||
1693 | EOF; | ||
1694 | |||
1695 | // Rule QuotedOrUnquotedId | ||
1696 | ruleQuotedOrUnquotedId returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] | ||
1697 | @init { | ||
1698 | enterRule(); | ||
1699 | } | ||
1700 | @after { | ||
1701 | leaveRule(); | ||
1702 | }: | ||
1703 | ( | ||
1704 | this_QUOTED_ID_0=RULE_QUOTED_ID | ||
1705 | { | ||
1706 | $current.merge(this_QUOTED_ID_0); | ||
1707 | } | ||
1708 | { | ||
1709 | newLeafNode(this_QUOTED_ID_0, grammarAccess.getQuotedOrUnquotedIdAccess().getQUOTED_IDTerminalRuleCall_0()); | ||
1710 | } | ||
1711 | | | ||
1712 | { | ||
1713 | newCompositeNode(grammarAccess.getQuotedOrUnquotedIdAccess().getIdentifierParserRuleCall_1()); | ||
1714 | } | ||
1715 | this_Identifier_1=ruleIdentifier | ||
1716 | { | ||
1717 | $current.merge(this_Identifier_1); | ||
1718 | } | ||
1719 | { | ||
1720 | afterParserOrEnumRuleCall(); | ||
1721 | } | ||
1722 | ) | ||
1723 | ; | ||
1724 | |||
1725 | // Entry rule entryRuleQualifiedName | ||
1726 | entryRuleQualifiedName returns [String current=null]: | ||
1727 | { newCompositeNode(grammarAccess.getQualifiedNameRule()); } | ||
1728 | iv_ruleQualifiedName=ruleQualifiedName | ||
1729 | { $current=$iv_ruleQualifiedName.current.getText(); } | ||
1730 | EOF; | ||
1731 | |||
1732 | // Rule QualifiedName | ||
1733 | ruleQualifiedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] | ||
1734 | @init { | ||
1735 | enterRule(); | ||
1736 | } | ||
1737 | @after { | ||
1738 | leaveRule(); | ||
1739 | }: | ||
1740 | ( | ||
1741 | this_QUOTED_ID_0=RULE_QUOTED_ID | ||
1742 | { | ||
1743 | $current.merge(this_QUOTED_ID_0); | ||
1744 | } | ||
1745 | { | ||
1746 | newLeafNode(this_QUOTED_ID_0, grammarAccess.getQualifiedNameAccess().getQUOTED_IDTerminalRuleCall_0()); | ||
1747 | } | ||
1748 | | | ||
1749 | ( | ||
1750 | { | ||
1751 | newCompositeNode(grammarAccess.getQualifiedNameAccess().getIdentifierParserRuleCall_1_0()); | ||
1752 | } | ||
1753 | this_Identifier_1=ruleIdentifier | ||
1754 | { | ||
1755 | $current.merge(this_Identifier_1); | ||
1756 | } | ||
1757 | { | ||
1758 | afterParserOrEnumRuleCall(); | ||
1759 | } | ||
1760 | ( | ||
1761 | kw=':' | ||
1762 | { | ||
1763 | $current.merge(kw); | ||
1764 | newLeafNode(kw, grammarAccess.getQualifiedNameAccess().getColonKeyword_1_1_0()); | ||
1765 | } | ||
1766 | { | ||
1767 | newCompositeNode(grammarAccess.getQualifiedNameAccess().getIdentifierParserRuleCall_1_1_1()); | ||
1768 | } | ||
1769 | this_Identifier_3=ruleIdentifier | ||
1770 | { | ||
1771 | $current.merge(this_Identifier_3); | ||
1772 | } | ||
1773 | { | ||
1774 | afterParserOrEnumRuleCall(); | ||
1775 | } | ||
1776 | )* | ||
1777 | ( | ||
1778 | kw=':' | ||
1779 | { | ||
1780 | $current.merge(kw); | ||
1781 | newLeafNode(kw, grammarAccess.getQualifiedNameAccess().getColonKeyword_1_2_0()); | ||
1782 | } | ||
1783 | this_QUOTED_ID_5=RULE_QUOTED_ID | ||
1784 | { | ||
1785 | $current.merge(this_QUOTED_ID_5); | ||
1786 | } | ||
1787 | { | ||
1788 | newLeafNode(this_QUOTED_ID_5, grammarAccess.getQualifiedNameAccess().getQUOTED_IDTerminalRuleCall_1_2_1()); | ||
1789 | } | ||
1790 | )? | ||
1791 | ) | ||
1792 | ) | ||
1793 | ; | ||
1794 | |||
1795 | // Entry rule entryRuleIdentifier | ||
1796 | entryRuleIdentifier returns [String current=null]: | ||
1797 | { newCompositeNode(grammarAccess.getIdentifierRule()); } | ||
1798 | iv_ruleIdentifier=ruleIdentifier | ||
1799 | { $current=$iv_ruleIdentifier.current.getText(); } | ||
1800 | EOF; | ||
1801 | |||
1802 | // Rule Identifier | ||
1803 | ruleIdentifier returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] | ||
1804 | @init { | ||
1805 | enterRule(); | ||
1806 | } | ||
1807 | @after { | ||
1808 | leaveRule(); | ||
1809 | }: | ||
1810 | ( | ||
1811 | this_ID_0=RULE_ID | ||
1812 | { | ||
1813 | $current.merge(this_ID_0); | ||
1814 | } | ||
1815 | { | ||
1816 | newLeafNode(this_ID_0, grammarAccess.getIdentifierAccess().getIDTerminalRuleCall_0()); | ||
1817 | } | ||
1818 | | | ||
1819 | kw='true' | ||
1820 | { | ||
1821 | $current.merge(kw); | ||
1822 | newLeafNode(kw, grammarAccess.getIdentifierAccess().getTrueKeyword_1()); | ||
1823 | } | ||
1824 | | | ||
1825 | kw='false' | ||
1826 | { | ||
1827 | $current.merge(kw); | ||
1828 | newLeafNode(kw, grammarAccess.getIdentifierAccess().getFalseKeyword_2()); | ||
1829 | } | ||
1830 | ) | ||
1831 | ; | ||
1832 | |||
1833 | // Rule LogicValue | ||
1834 | ruleLogicValue returns [Enumerator current=null] | ||
1835 | @init { | ||
1836 | enterRule(); | ||
1837 | } | ||
1838 | @after { | ||
1839 | leaveRule(); | ||
1840 | }: | ||
1841 | ( | ||
1842 | ( | ||
1843 | enumLiteral_0='true' | ||
1844 | { | ||
1845 | $current = grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); | ||
1846 | newLeafNode(enumLiteral_0, grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0()); | ||
1847 | } | ||
1848 | ) | ||
1849 | | | ||
1850 | ( | ||
1851 | enumLiteral_1='false' | ||
1852 | { | ||
1853 | $current = grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); | ||
1854 | newLeafNode(enumLiteral_1, grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1()); | ||
1855 | } | ||
1856 | ) | ||
1857 | | | ||
1858 | ( | ||
1859 | enumLiteral_2='unknown' | ||
1860 | { | ||
1861 | $current = grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2().getEnumLiteral().getInstance(); | ||
1862 | newLeafNode(enumLiteral_2, grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2()); | ||
1863 | } | ||
1864 | ) | ||
1865 | ) | ||
1866 | ; | ||
1867 | |||
1868 | // Rule ShortLogicValue | ||
1869 | ruleShortLogicValue returns [Enumerator current=null] | ||
1870 | @init { | ||
1871 | enterRule(); | ||
1872 | } | ||
1873 | @after { | ||
1874 | leaveRule(); | ||
1875 | }: | ||
1876 | ( | ||
1877 | ( | ||
1878 | enumLiteral_0='!' | ||
1879 | { | ||
1880 | $current = grammarAccess.getShortLogicValueAccess().getFALSEEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); | ||
1881 | newLeafNode(enumLiteral_0, grammarAccess.getShortLogicValueAccess().getFALSEEnumLiteralDeclaration_0()); | ||
1882 | } | ||
1883 | ) | ||
1884 | | | ||
1885 | ( | ||
1886 | enumLiteral_1='?' | ||
1887 | { | ||
1888 | $current = grammarAccess.getShortLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); | ||
1889 | newLeafNode(enumLiteral_1, grammarAccess.getShortLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_1()); | ||
1890 | } | ||
1891 | ) | ||
1892 | ) | ||
1893 | ; | ||
1894 | |||
1895 | RULE_STRING : '"' ('\\' .|~(('\\'|'"')))* '"'; | ||
1896 | |||
1897 | RULE_QUOTED_ID : '\'' ('\\' .|~(('\\'|'\'')))* '\''; | ||
1898 | |||
1899 | RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*; | ||
1900 | |||
1901 | RULE_INT : ('0'..'9')+; | ||
1902 | |||
1903 | RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/'; | ||
1904 | |||
1905 | RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?; | ||
1906 | |||
1907 | RULE_WS : (' '|'\t'|'\r'|'\n')+; | ||
1908 | |||
1909 | RULE_ANY_OTHER : .; | ||