diff options
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 | 1522 |
1 files changed, 1522 insertions, 0 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 new file mode 100644 index 00000000..61b76835 --- /dev/null +++ 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 | |||
@@ -0,0 +1,1522 @@ | |||
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 | { | ||
82 | newCompositeNode(grammarAccess.getProblemAccess().getStatementsStatementParserRuleCall_0()); | ||
83 | } | ||
84 | lv_statements_0_0=ruleStatement | ||
85 | { | ||
86 | if ($current==null) { | ||
87 | $current = createModelElementForParent(grammarAccess.getProblemRule()); | ||
88 | } | ||
89 | add( | ||
90 | $current, | ||
91 | "statements", | ||
92 | lv_statements_0_0, | ||
93 | "org.eclipse.viatra.solver.language.Problem.Statement"); | ||
94 | afterParserOrEnumRuleCall(); | ||
95 | } | ||
96 | ) | ||
97 | )* | ||
98 | ; | ||
99 | |||
100 | // Entry rule entryRuleStatement | ||
101 | entryRuleStatement returns [EObject current=null]: | ||
102 | { newCompositeNode(grammarAccess.getStatementRule()); } | ||
103 | iv_ruleStatement=ruleStatement | ||
104 | { $current=$iv_ruleStatement.current; } | ||
105 | EOF; | ||
106 | |||
107 | // Rule Statement | ||
108 | ruleStatement returns [EObject current=null] | ||
109 | @init { | ||
110 | enterRule(); | ||
111 | } | ||
112 | @after { | ||
113 | leaveRule(); | ||
114 | }: | ||
115 | ( | ||
116 | { | ||
117 | newCompositeNode(grammarAccess.getStatementAccess().getClassDeclarationParserRuleCall_0()); | ||
118 | } | ||
119 | this_ClassDeclaration_0=ruleClassDeclaration | ||
120 | { | ||
121 | $current = $this_ClassDeclaration_0.current; | ||
122 | afterParserOrEnumRuleCall(); | ||
123 | } | ||
124 | | | ||
125 | { | ||
126 | newCompositeNode(grammarAccess.getStatementAccess().getPredicateDefinitionParserRuleCall_1()); | ||
127 | } | ||
128 | this_PredicateDefinition_1=rulePredicateDefinition | ||
129 | { | ||
130 | $current = $this_PredicateDefinition_1.current; | ||
131 | afterParserOrEnumRuleCall(); | ||
132 | } | ||
133 | | | ||
134 | { | ||
135 | newCompositeNode(grammarAccess.getStatementAccess().getAssertionParserRuleCall_2()); | ||
136 | } | ||
137 | this_Assertion_2=ruleAssertion | ||
138 | { | ||
139 | $current = $this_Assertion_2.current; | ||
140 | afterParserOrEnumRuleCall(); | ||
141 | } | ||
142 | | | ||
143 | { | ||
144 | newCompositeNode(grammarAccess.getStatementAccess().getScopeDeclarationParserRuleCall_3()); | ||
145 | } | ||
146 | this_ScopeDeclaration_3=ruleScopeDeclaration | ||
147 | { | ||
148 | $current = $this_ScopeDeclaration_3.current; | ||
149 | afterParserOrEnumRuleCall(); | ||
150 | } | ||
151 | ) | ||
152 | ; | ||
153 | |||
154 | // Entry rule entryRuleClassDeclaration | ||
155 | entryRuleClassDeclaration returns [EObject current=null]: | ||
156 | { newCompositeNode(grammarAccess.getClassDeclarationRule()); } | ||
157 | iv_ruleClassDeclaration=ruleClassDeclaration | ||
158 | { $current=$iv_ruleClassDeclaration.current; } | ||
159 | EOF; | ||
160 | |||
161 | // Rule ClassDeclaration | ||
162 | ruleClassDeclaration returns [EObject current=null] | ||
163 | @init { | ||
164 | enterRule(); | ||
165 | } | ||
166 | @after { | ||
167 | leaveRule(); | ||
168 | }: | ||
169 | ( | ||
170 | ( | ||
171 | ( | ||
172 | lv_abstract_0_0='abstract' | ||
173 | { | ||
174 | newLeafNode(lv_abstract_0_0, grammarAccess.getClassDeclarationAccess().getAbstractAbstractKeyword_0_0()); | ||
175 | } | ||
176 | { | ||
177 | if ($current==null) { | ||
178 | $current = createModelElement(grammarAccess.getClassDeclarationRule()); | ||
179 | } | ||
180 | setWithLastConsumed($current, "abstract", lv_abstract_0_0 != null, "abstract"); | ||
181 | } | ||
182 | ) | ||
183 | )? | ||
184 | otherlv_1='class' | ||
185 | { | ||
186 | newLeafNode(otherlv_1, grammarAccess.getClassDeclarationAccess().getClassKeyword_1()); | ||
187 | } | ||
188 | ( | ||
189 | ( | ||
190 | lv_name_2_0=RULE_ID | ||
191 | { | ||
192 | newLeafNode(lv_name_2_0, grammarAccess.getClassDeclarationAccess().getNameIDTerminalRuleCall_2_0()); | ||
193 | } | ||
194 | { | ||
195 | if ($current==null) { | ||
196 | $current = createModelElement(grammarAccess.getClassDeclarationRule()); | ||
197 | } | ||
198 | setWithLastConsumed( | ||
199 | $current, | ||
200 | "name", | ||
201 | lv_name_2_0, | ||
202 | "org.eclipse.xtext.common.Terminals.ID"); | ||
203 | } | ||
204 | ) | ||
205 | ) | ||
206 | ( | ||
207 | ( | ||
208 | otherlv_3='extends' | ||
209 | { | ||
210 | newLeafNode(otherlv_3, grammarAccess.getClassDeclarationAccess().getExtendsKeyword_3_0_0()); | ||
211 | } | ||
212 | ( | ||
213 | ( | ||
214 | ( | ||
215 | { | ||
216 | if ($current==null) { | ||
217 | $current = createModelElement(grammarAccess.getClassDeclarationRule()); | ||
218 | } | ||
219 | } | ||
220 | otherlv_4=RULE_ID | ||
221 | { | ||
222 | newLeafNode(otherlv_4, grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_0_0()); | ||
223 | } | ||
224 | ) | ||
225 | ) | ||
226 | | | ||
227 | ( | ||
228 | otherlv_5='[' | ||
229 | { | ||
230 | newLeafNode(otherlv_5, grammarAccess.getClassDeclarationAccess().getLeftSquareBracketKeyword_3_0_1_1_0()); | ||
231 | } | ||
232 | ( | ||
233 | ( | ||
234 | ( | ||
235 | { | ||
236 | if ($current==null) { | ||
237 | $current = createModelElement(grammarAccess.getClassDeclarationRule()); | ||
238 | } | ||
239 | } | ||
240 | otherlv_6=RULE_ID | ||
241 | { | ||
242 | newLeafNode(otherlv_6, grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_1_1_0_0()); | ||
243 | } | ||
244 | ) | ||
245 | ) | ||
246 | ( | ||
247 | otherlv_7=',' | ||
248 | { | ||
249 | newLeafNode(otherlv_7, grammarAccess.getClassDeclarationAccess().getCommaKeyword_3_0_1_1_1_1_0()); | ||
250 | } | ||
251 | ( | ||
252 | ( | ||
253 | { | ||
254 | if ($current==null) { | ||
255 | $current = createModelElement(grammarAccess.getClassDeclarationRule()); | ||
256 | } | ||
257 | } | ||
258 | otherlv_8=RULE_ID | ||
259 | { | ||
260 | newLeafNode(otherlv_8, grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_1_1_1_1_0()); | ||
261 | } | ||
262 | ) | ||
263 | ) | ||
264 | )* | ||
265 | )? | ||
266 | otherlv_9=']' | ||
267 | { | ||
268 | newLeafNode(otherlv_9, grammarAccess.getClassDeclarationAccess().getRightSquareBracketKeyword_3_0_1_1_2()); | ||
269 | } | ||
270 | ) | ||
271 | ) | ||
272 | ) | ||
273 | | | ||
274 | ( | ||
275 | ( | ||
276 | { | ||
277 | newCompositeNode(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsReferenceDeclarationParserRuleCall_3_1_0()); | ||
278 | } | ||
279 | lv_referenceDeclarations_10_0=ruleReferenceDeclaration | ||
280 | { | ||
281 | if ($current==null) { | ||
282 | $current = createModelElementForParent(grammarAccess.getClassDeclarationRule()); | ||
283 | } | ||
284 | add( | ||
285 | $current, | ||
286 | "referenceDeclarations", | ||
287 | lv_referenceDeclarations_10_0, | ||
288 | "org.eclipse.viatra.solver.language.Problem.ReferenceDeclaration"); | ||
289 | afterParserOrEnumRuleCall(); | ||
290 | } | ||
291 | ) | ||
292 | ) | ||
293 | )? | ||
294 | ( | ||
295 | otherlv_11=',' | ||
296 | { | ||
297 | newLeafNode(otherlv_11, grammarAccess.getClassDeclarationAccess().getCommaKeyword_4_0()); | ||
298 | } | ||
299 | ( | ||
300 | ( | ||
301 | { | ||
302 | newCompositeNode(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsReferenceDeclarationParserRuleCall_4_1_0()); | ||
303 | } | ||
304 | lv_referenceDeclarations_12_0=ruleReferenceDeclaration | ||
305 | { | ||
306 | if ($current==null) { | ||
307 | $current = createModelElementForParent(grammarAccess.getClassDeclarationRule()); | ||
308 | } | ||
309 | add( | ||
310 | $current, | ||
311 | "referenceDeclarations", | ||
312 | lv_referenceDeclarations_12_0, | ||
313 | "org.eclipse.viatra.solver.language.Problem.ReferenceDeclaration"); | ||
314 | afterParserOrEnumRuleCall(); | ||
315 | } | ||
316 | ) | ||
317 | ) | ||
318 | )* | ||
319 | otherlv_13='.' | ||
320 | { | ||
321 | newLeafNode(otherlv_13, grammarAccess.getClassDeclarationAccess().getFullStopKeyword_5()); | ||
322 | } | ||
323 | ) | ||
324 | ; | ||
325 | |||
326 | // Entry rule entryRuleReferenceDeclaration | ||
327 | entryRuleReferenceDeclaration returns [EObject current=null]: | ||
328 | { newCompositeNode(grammarAccess.getReferenceDeclarationRule()); } | ||
329 | iv_ruleReferenceDeclaration=ruleReferenceDeclaration | ||
330 | { $current=$iv_ruleReferenceDeclaration.current; } | ||
331 | EOF; | ||
332 | |||
333 | // Rule ReferenceDeclaration | ||
334 | ruleReferenceDeclaration returns [EObject current=null] | ||
335 | @init { | ||
336 | enterRule(); | ||
337 | } | ||
338 | @after { | ||
339 | leaveRule(); | ||
340 | }: | ||
341 | ( | ||
342 | ( | ||
343 | ( | ||
344 | ( | ||
345 | lv_containment_0_0='contains' | ||
346 | { | ||
347 | newLeafNode(lv_containment_0_0, grammarAccess.getReferenceDeclarationAccess().getContainmentContainsKeyword_0_0_0()); | ||
348 | } | ||
349 | { | ||
350 | if ($current==null) { | ||
351 | $current = createModelElement(grammarAccess.getReferenceDeclarationRule()); | ||
352 | } | ||
353 | setWithLastConsumed($current, "containment", lv_containment_0_0 != null, "contains"); | ||
354 | } | ||
355 | ) | ||
356 | ) | ||
357 | | | ||
358 | otherlv_1='refers' | ||
359 | { | ||
360 | newLeafNode(otherlv_1, grammarAccess.getReferenceDeclarationAccess().getRefersKeyword_0_1()); | ||
361 | } | ||
362 | ) | ||
363 | ( | ||
364 | ( | ||
365 | { | ||
366 | if ($current==null) { | ||
367 | $current = createModelElement(grammarAccess.getReferenceDeclarationRule()); | ||
368 | } | ||
369 | } | ||
370 | otherlv_2=RULE_ID | ||
371 | { | ||
372 | newLeafNode(otherlv_2, grammarAccess.getReferenceDeclarationAccess().getReferenceTypeClassDeclarationCrossReference_1_0()); | ||
373 | } | ||
374 | ) | ||
375 | ) | ||
376 | otherlv_3='[' | ||
377 | { | ||
378 | newLeafNode(otherlv_3, grammarAccess.getReferenceDeclarationAccess().getLeftSquareBracketKeyword_2()); | ||
379 | } | ||
380 | ( | ||
381 | ( | ||
382 | { | ||
383 | newCompositeNode(grammarAccess.getReferenceDeclarationAccess().getMultiplicityMultiplicityParserRuleCall_3_0()); | ||
384 | } | ||
385 | lv_multiplicity_4_0=ruleMultiplicity | ||
386 | { | ||
387 | if ($current==null) { | ||
388 | $current = createModelElementForParent(grammarAccess.getReferenceDeclarationRule()); | ||
389 | } | ||
390 | set( | ||
391 | $current, | ||
392 | "multiplicity", | ||
393 | lv_multiplicity_4_0, | ||
394 | "org.eclipse.viatra.solver.language.Problem.Multiplicity"); | ||
395 | afterParserOrEnumRuleCall(); | ||
396 | } | ||
397 | ) | ||
398 | ) | ||
399 | otherlv_5=']' | ||
400 | { | ||
401 | newLeafNode(otherlv_5, grammarAccess.getReferenceDeclarationAccess().getRightSquareBracketKeyword_4()); | ||
402 | } | ||
403 | ( | ||
404 | ( | ||
405 | lv_name_6_0=RULE_ID | ||
406 | { | ||
407 | newLeafNode(lv_name_6_0, grammarAccess.getReferenceDeclarationAccess().getNameIDTerminalRuleCall_5_0()); | ||
408 | } | ||
409 | { | ||
410 | if ($current==null) { | ||
411 | $current = createModelElement(grammarAccess.getReferenceDeclarationRule()); | ||
412 | } | ||
413 | setWithLastConsumed( | ||
414 | $current, | ||
415 | "name", | ||
416 | lv_name_6_0, | ||
417 | "org.eclipse.xtext.common.Terminals.ID"); | ||
418 | } | ||
419 | ) | ||
420 | ) | ||
421 | ( | ||
422 | otherlv_7='opposite' | ||
423 | { | ||
424 | newLeafNode(otherlv_7, grammarAccess.getReferenceDeclarationAccess().getOppositeKeyword_6_0()); | ||
425 | } | ||
426 | ( | ||
427 | ( | ||
428 | { | ||
429 | if ($current==null) { | ||
430 | $current = createModelElement(grammarAccess.getReferenceDeclarationRule()); | ||
431 | } | ||
432 | } | ||
433 | { | ||
434 | newCompositeNode(grammarAccess.getReferenceDeclarationAccess().getOppositeReferenceDeclarationCrossReference_6_1_0()); | ||
435 | } | ||
436 | ruleQualifiedName | ||
437 | { | ||
438 | afterParserOrEnumRuleCall(); | ||
439 | } | ||
440 | ) | ||
441 | ) | ||
442 | )? | ||
443 | ) | ||
444 | ; | ||
445 | |||
446 | // Entry rule entryRulePredicateDefinition | ||
447 | entryRulePredicateDefinition returns [EObject current=null]: | ||
448 | { newCompositeNode(grammarAccess.getPredicateDefinitionRule()); } | ||
449 | iv_rulePredicateDefinition=rulePredicateDefinition | ||
450 | { $current=$iv_rulePredicateDefinition.current; } | ||
451 | EOF; | ||
452 | |||
453 | // Rule PredicateDefinition | ||
454 | rulePredicateDefinition returns [EObject current=null] | ||
455 | @init { | ||
456 | enterRule(); | ||
457 | } | ||
458 | @after { | ||
459 | leaveRule(); | ||
460 | }: | ||
461 | ( | ||
462 | ( | ||
463 | ( | ||
464 | ( | ||
465 | ( | ||
466 | lv_error_0_0='error' | ||
467 | { | ||
468 | newLeafNode(lv_error_0_0, grammarAccess.getPredicateDefinitionAccess().getErrorErrorKeyword_0_0_0_0()); | ||
469 | } | ||
470 | { | ||
471 | if ($current==null) { | ||
472 | $current = createModelElement(grammarAccess.getPredicateDefinitionRule()); | ||
473 | } | ||
474 | setWithLastConsumed($current, "error", lv_error_0_0 != null, "error"); | ||
475 | } | ||
476 | ) | ||
477 | ) | ||
478 | ( | ||
479 | otherlv_1='pred' | ||
480 | { | ||
481 | newLeafNode(otherlv_1, grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_0_1()); | ||
482 | } | ||
483 | )? | ||
484 | ) | ||
485 | | | ||
486 | otherlv_2='pred' | ||
487 | { | ||
488 | newLeafNode(otherlv_2, grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_1()); | ||
489 | } | ||
490 | ) | ||
491 | ( | ||
492 | ( | ||
493 | lv_name_3_0=RULE_ID | ||
494 | { | ||
495 | newLeafNode(lv_name_3_0, grammarAccess.getPredicateDefinitionAccess().getNameIDTerminalRuleCall_1_0()); | ||
496 | } | ||
497 | { | ||
498 | if ($current==null) { | ||
499 | $current = createModelElement(grammarAccess.getPredicateDefinitionRule()); | ||
500 | } | ||
501 | setWithLastConsumed( | ||
502 | $current, | ||
503 | "name", | ||
504 | lv_name_3_0, | ||
505 | "org.eclipse.xtext.common.Terminals.ID"); | ||
506 | } | ||
507 | ) | ||
508 | ) | ||
509 | otherlv_4='(' | ||
510 | { | ||
511 | newLeafNode(otherlv_4, grammarAccess.getPredicateDefinitionAccess().getLeftParenthesisKeyword_2()); | ||
512 | } | ||
513 | ( | ||
514 | ( | ||
515 | ( | ||
516 | { | ||
517 | newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getParametersParameterParserRuleCall_3_0_0()); | ||
518 | } | ||
519 | lv_parameters_5_0=ruleParameter | ||
520 | { | ||
521 | if ($current==null) { | ||
522 | $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); | ||
523 | } | ||
524 | add( | ||
525 | $current, | ||
526 | "parameters", | ||
527 | lv_parameters_5_0, | ||
528 | "org.eclipse.viatra.solver.language.Problem.Parameter"); | ||
529 | afterParserOrEnumRuleCall(); | ||
530 | } | ||
531 | ) | ||
532 | ) | ||
533 | ( | ||
534 | otherlv_6=',' | ||
535 | { | ||
536 | newLeafNode(otherlv_6, grammarAccess.getPredicateDefinitionAccess().getCommaKeyword_3_1_0()); | ||
537 | } | ||
538 | ( | ||
539 | ( | ||
540 | { | ||
541 | newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getParametersParameterParserRuleCall_3_1_1_0()); | ||
542 | } | ||
543 | lv_parameters_7_0=ruleParameter | ||
544 | { | ||
545 | if ($current==null) { | ||
546 | $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); | ||
547 | } | ||
548 | add( | ||
549 | $current, | ||
550 | "parameters", | ||
551 | lv_parameters_7_0, | ||
552 | "org.eclipse.viatra.solver.language.Problem.Parameter"); | ||
553 | afterParserOrEnumRuleCall(); | ||
554 | } | ||
555 | ) | ||
556 | ) | ||
557 | )* | ||
558 | )? | ||
559 | otherlv_8=')' | ||
560 | { | ||
561 | newLeafNode(otherlv_8, grammarAccess.getPredicateDefinitionAccess().getRightParenthesisKeyword_4()); | ||
562 | } | ||
563 | ( | ||
564 | otherlv_9=':=' | ||
565 | { | ||
566 | newLeafNode(otherlv_9, grammarAccess.getPredicateDefinitionAccess().getColonEqualsSignKeyword_5_0()); | ||
567 | } | ||
568 | ( | ||
569 | ( | ||
570 | { | ||
571 | newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getBodiesConjunctionParserRuleCall_5_1_0()); | ||
572 | } | ||
573 | lv_bodies_10_0=ruleConjunction | ||
574 | { | ||
575 | if ($current==null) { | ||
576 | $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); | ||
577 | } | ||
578 | add( | ||
579 | $current, | ||
580 | "bodies", | ||
581 | lv_bodies_10_0, | ||
582 | "org.eclipse.viatra.solver.language.Problem.Conjunction"); | ||
583 | afterParserOrEnumRuleCall(); | ||
584 | } | ||
585 | ) | ||
586 | ) | ||
587 | ( | ||
588 | otherlv_11=';' | ||
589 | { | ||
590 | newLeafNode(otherlv_11, grammarAccess.getPredicateDefinitionAccess().getSemicolonKeyword_5_2_0()); | ||
591 | } | ||
592 | ( | ||
593 | ( | ||
594 | { | ||
595 | newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getBodiesConjunctionParserRuleCall_5_2_1_0()); | ||
596 | } | ||
597 | lv_bodies_12_0=ruleConjunction | ||
598 | { | ||
599 | if ($current==null) { | ||
600 | $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); | ||
601 | } | ||
602 | add( | ||
603 | $current, | ||
604 | "bodies", | ||
605 | lv_bodies_12_0, | ||
606 | "org.eclipse.viatra.solver.language.Problem.Conjunction"); | ||
607 | afterParserOrEnumRuleCall(); | ||
608 | } | ||
609 | ) | ||
610 | ) | ||
611 | )* | ||
612 | )? | ||
613 | otherlv_13='.' | ||
614 | { | ||
615 | newLeafNode(otherlv_13, grammarAccess.getPredicateDefinitionAccess().getFullStopKeyword_6()); | ||
616 | } | ||
617 | ) | ||
618 | ; | ||
619 | |||
620 | // Entry rule entryRuleParameter | ||
621 | entryRuleParameter returns [EObject current=null]: | ||
622 | { newCompositeNode(grammarAccess.getParameterRule()); } | ||
623 | iv_ruleParameter=ruleParameter | ||
624 | { $current=$iv_ruleParameter.current; } | ||
625 | EOF; | ||
626 | |||
627 | // Rule Parameter | ||
628 | ruleParameter returns [EObject current=null] | ||
629 | @init { | ||
630 | enterRule(); | ||
631 | } | ||
632 | @after { | ||
633 | leaveRule(); | ||
634 | }: | ||
635 | ( | ||
636 | ( | ||
637 | ( | ||
638 | { | ||
639 | if ($current==null) { | ||
640 | $current = createModelElement(grammarAccess.getParameterRule()); | ||
641 | } | ||
642 | } | ||
643 | otherlv_0=RULE_ID | ||
644 | { | ||
645 | newLeafNode(otherlv_0, grammarAccess.getParameterAccess().getParameterTypeClassDeclarationCrossReference_0_0()); | ||
646 | } | ||
647 | ) | ||
648 | ) | ||
649 | ( | ||
650 | ( | ||
651 | lv_name_1_0=RULE_ID | ||
652 | { | ||
653 | newLeafNode(lv_name_1_0, grammarAccess.getParameterAccess().getNameIDTerminalRuleCall_1_0()); | ||
654 | } | ||
655 | { | ||
656 | if ($current==null) { | ||
657 | $current = createModelElement(grammarAccess.getParameterRule()); | ||
658 | } | ||
659 | setWithLastConsumed( | ||
660 | $current, | ||
661 | "name", | ||
662 | lv_name_1_0, | ||
663 | "org.eclipse.xtext.common.Terminals.ID"); | ||
664 | } | ||
665 | ) | ||
666 | ) | ||
667 | ) | ||
668 | ; | ||
669 | |||
670 | // Entry rule entryRuleConjunction | ||
671 | entryRuleConjunction returns [EObject current=null]: | ||
672 | { newCompositeNode(grammarAccess.getConjunctionRule()); } | ||
673 | iv_ruleConjunction=ruleConjunction | ||
674 | { $current=$iv_ruleConjunction.current; } | ||
675 | EOF; | ||
676 | |||
677 | // Rule Conjunction | ||
678 | ruleConjunction returns [EObject current=null] | ||
679 | @init { | ||
680 | enterRule(); | ||
681 | } | ||
682 | @after { | ||
683 | leaveRule(); | ||
684 | }: | ||
685 | ( | ||
686 | ( | ||
687 | ( | ||
688 | { | ||
689 | newCompositeNode(grammarAccess.getConjunctionAccess().getLiteralsLiteralParserRuleCall_0_0()); | ||
690 | } | ||
691 | lv_literals_0_0=ruleLiteral | ||
692 | { | ||
693 | if ($current==null) { | ||
694 | $current = createModelElementForParent(grammarAccess.getConjunctionRule()); | ||
695 | } | ||
696 | add( | ||
697 | $current, | ||
698 | "literals", | ||
699 | lv_literals_0_0, | ||
700 | "org.eclipse.viatra.solver.language.Problem.Literal"); | ||
701 | afterParserOrEnumRuleCall(); | ||
702 | } | ||
703 | ) | ||
704 | ) | ||
705 | ( | ||
706 | otherlv_1=',' | ||
707 | { | ||
708 | newLeafNode(otherlv_1, grammarAccess.getConjunctionAccess().getCommaKeyword_1_0()); | ||
709 | } | ||
710 | ( | ||
711 | ( | ||
712 | { | ||
713 | newCompositeNode(grammarAccess.getConjunctionAccess().getLiteralsLiteralParserRuleCall_1_1_0()); | ||
714 | } | ||
715 | lv_literals_2_0=ruleLiteral | ||
716 | { | ||
717 | if ($current==null) { | ||
718 | $current = createModelElementForParent(grammarAccess.getConjunctionRule()); | ||
719 | } | ||
720 | add( | ||
721 | $current, | ||
722 | "literals", | ||
723 | lv_literals_2_0, | ||
724 | "org.eclipse.viatra.solver.language.Problem.Literal"); | ||
725 | afterParserOrEnumRuleCall(); | ||
726 | } | ||
727 | ) | ||
728 | ) | ||
729 | )* | ||
730 | ) | ||
731 | ; | ||
732 | |||
733 | // Entry rule entryRuleLiteral | ||
734 | entryRuleLiteral returns [EObject current=null]: | ||
735 | { newCompositeNode(grammarAccess.getLiteralRule()); } | ||
736 | iv_ruleLiteral=ruleLiteral | ||
737 | { $current=$iv_ruleLiteral.current; } | ||
738 | EOF; | ||
739 | |||
740 | // Rule Literal | ||
741 | ruleLiteral returns [EObject current=null] | ||
742 | @init { | ||
743 | enterRule(); | ||
744 | } | ||
745 | @after { | ||
746 | leaveRule(); | ||
747 | }: | ||
748 | ( | ||
749 | { | ||
750 | newCompositeNode(grammarAccess.getLiteralAccess().getAtomParserRuleCall_0()); | ||
751 | } | ||
752 | this_Atom_0=ruleAtom | ||
753 | { | ||
754 | $current = $this_Atom_0.current; | ||
755 | afterParserOrEnumRuleCall(); | ||
756 | } | ||
757 | | | ||
758 | { | ||
759 | newCompositeNode(grammarAccess.getLiteralAccess().getNegativeLiteralParserRuleCall_1()); | ||
760 | } | ||
761 | this_NegativeLiteral_1=ruleNegativeLiteral | ||
762 | { | ||
763 | $current = $this_NegativeLiteral_1.current; | ||
764 | afterParserOrEnumRuleCall(); | ||
765 | } | ||
766 | ) | ||
767 | ; | ||
768 | |||
769 | // Entry rule entryRuleNegativeLiteral | ||
770 | entryRuleNegativeLiteral returns [EObject current=null]: | ||
771 | { newCompositeNode(grammarAccess.getNegativeLiteralRule()); } | ||
772 | iv_ruleNegativeLiteral=ruleNegativeLiteral | ||
773 | { $current=$iv_ruleNegativeLiteral.current; } | ||
774 | EOF; | ||
775 | |||
776 | // Rule NegativeLiteral | ||
777 | ruleNegativeLiteral returns [EObject current=null] | ||
778 | @init { | ||
779 | enterRule(); | ||
780 | } | ||
781 | @after { | ||
782 | leaveRule(); | ||
783 | }: | ||
784 | ( | ||
785 | otherlv_0='!' | ||
786 | { | ||
787 | newLeafNode(otherlv_0, grammarAccess.getNegativeLiteralAccess().getExclamationMarkKeyword_0()); | ||
788 | } | ||
789 | ( | ||
790 | ( | ||
791 | { | ||
792 | newCompositeNode(grammarAccess.getNegativeLiteralAccess().getAtomAtomParserRuleCall_1_0()); | ||
793 | } | ||
794 | lv_atom_1_0=ruleAtom | ||
795 | { | ||
796 | if ($current==null) { | ||
797 | $current = createModelElementForParent(grammarAccess.getNegativeLiteralRule()); | ||
798 | } | ||
799 | set( | ||
800 | $current, | ||
801 | "atom", | ||
802 | lv_atom_1_0, | ||
803 | "org.eclipse.viatra.solver.language.Problem.Atom"); | ||
804 | afterParserOrEnumRuleCall(); | ||
805 | } | ||
806 | ) | ||
807 | ) | ||
808 | ) | ||
809 | ; | ||
810 | |||
811 | // Entry rule entryRuleAtom | ||
812 | entryRuleAtom returns [EObject current=null]: | ||
813 | { newCompositeNode(grammarAccess.getAtomRule()); } | ||
814 | iv_ruleAtom=ruleAtom | ||
815 | { $current=$iv_ruleAtom.current; } | ||
816 | EOF; | ||
817 | |||
818 | // Rule Atom | ||
819 | ruleAtom returns [EObject current=null] | ||
820 | @init { | ||
821 | enterRule(); | ||
822 | } | ||
823 | @after { | ||
824 | leaveRule(); | ||
825 | }: | ||
826 | ( | ||
827 | ( | ||
828 | ( | ||
829 | { | ||
830 | if ($current==null) { | ||
831 | $current = createModelElement(grammarAccess.getAtomRule()); | ||
832 | } | ||
833 | } | ||
834 | { | ||
835 | newCompositeNode(grammarAccess.getAtomAccess().getRelationRelationCrossReference_0_0()); | ||
836 | } | ||
837 | ruleQualifiedName | ||
838 | { | ||
839 | afterParserOrEnumRuleCall(); | ||
840 | } | ||
841 | ) | ||
842 | ) | ||
843 | ( | ||
844 | ( | ||
845 | lv_transitiveClosure_1_0='+' | ||
846 | { | ||
847 | newLeafNode(lv_transitiveClosure_1_0, grammarAccess.getAtomAccess().getTransitiveClosurePlusSignKeyword_1_0()); | ||
848 | } | ||
849 | { | ||
850 | if ($current==null) { | ||
851 | $current = createModelElement(grammarAccess.getAtomRule()); | ||
852 | } | ||
853 | setWithLastConsumed($current, "transitiveClosure", lv_transitiveClosure_1_0 != null, "+"); | ||
854 | } | ||
855 | ) | ||
856 | )? | ||
857 | otherlv_2='(' | ||
858 | { | ||
859 | newLeafNode(otherlv_2, grammarAccess.getAtomAccess().getLeftParenthesisKeyword_2()); | ||
860 | } | ||
861 | ( | ||
862 | ( | ||
863 | ( | ||
864 | { | ||
865 | if ($current==null) { | ||
866 | $current = createModelElement(grammarAccess.getAtomRule()); | ||
867 | } | ||
868 | } | ||
869 | otherlv_3=RULE_ID | ||
870 | { | ||
871 | newLeafNode(otherlv_3, grammarAccess.getAtomAccess().getArgumentsVariableCrossReference_3_0_0()); | ||
872 | } | ||
873 | ) | ||
874 | ) | ||
875 | ( | ||
876 | otherlv_4=',' | ||
877 | { | ||
878 | newLeafNode(otherlv_4, grammarAccess.getAtomAccess().getCommaKeyword_3_1_0()); | ||
879 | } | ||
880 | ( | ||
881 | ( | ||
882 | { | ||
883 | if ($current==null) { | ||
884 | $current = createModelElement(grammarAccess.getAtomRule()); | ||
885 | } | ||
886 | } | ||
887 | otherlv_5=RULE_ID | ||
888 | { | ||
889 | newLeafNode(otherlv_5, grammarAccess.getAtomAccess().getArgumentsVariableCrossReference_3_1_1_0()); | ||
890 | } | ||
891 | ) | ||
892 | ) | ||
893 | )* | ||
894 | )? | ||
895 | otherlv_6=')' | ||
896 | { | ||
897 | newLeafNode(otherlv_6, grammarAccess.getAtomAccess().getRightParenthesisKeyword_4()); | ||
898 | } | ||
899 | ) | ||
900 | ; | ||
901 | |||
902 | // Entry rule entryRuleAssertion | ||
903 | entryRuleAssertion returns [EObject current=null]: | ||
904 | { newCompositeNode(grammarAccess.getAssertionRule()); } | ||
905 | iv_ruleAssertion=ruleAssertion | ||
906 | { $current=$iv_ruleAssertion.current; } | ||
907 | EOF; | ||
908 | |||
909 | // Rule Assertion | ||
910 | ruleAssertion returns [EObject current=null] | ||
911 | @init { | ||
912 | enterRule(); | ||
913 | } | ||
914 | @after { | ||
915 | leaveRule(); | ||
916 | }: | ||
917 | ( | ||
918 | ( | ||
919 | ( | ||
920 | ( | ||
921 | ( | ||
922 | { | ||
923 | if ($current==null) { | ||
924 | $current = createModelElement(grammarAccess.getAssertionRule()); | ||
925 | } | ||
926 | } | ||
927 | { | ||
928 | newCompositeNode(grammarAccess.getAssertionAccess().getRelationRelationCrossReference_0_0_0_0()); | ||
929 | } | ||
930 | ruleQualifiedName | ||
931 | { | ||
932 | afterParserOrEnumRuleCall(); | ||
933 | } | ||
934 | ) | ||
935 | ) | ||
936 | otherlv_1='(' | ||
937 | { | ||
938 | newLeafNode(otherlv_1, grammarAccess.getAssertionAccess().getLeftParenthesisKeyword_0_0_1()); | ||
939 | } | ||
940 | ( | ||
941 | ( | ||
942 | ( | ||
943 | { | ||
944 | if ($current==null) { | ||
945 | $current = createModelElement(grammarAccess.getAssertionRule()); | ||
946 | } | ||
947 | } | ||
948 | { | ||
949 | newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_0_2_0_0()); | ||
950 | } | ||
951 | ruleQualifiedName | ||
952 | { | ||
953 | afterParserOrEnumRuleCall(); | ||
954 | } | ||
955 | ) | ||
956 | ) | ||
957 | ( | ||
958 | otherlv_3=',' | ||
959 | { | ||
960 | newLeafNode(otherlv_3, grammarAccess.getAssertionAccess().getCommaKeyword_0_0_2_1_0()); | ||
961 | } | ||
962 | ( | ||
963 | ( | ||
964 | { | ||
965 | if ($current==null) { | ||
966 | $current = createModelElement(grammarAccess.getAssertionRule()); | ||
967 | } | ||
968 | } | ||
969 | { | ||
970 | newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_0_2_1_1_0()); | ||
971 | } | ||
972 | ruleQualifiedName | ||
973 | { | ||
974 | afterParserOrEnumRuleCall(); | ||
975 | } | ||
976 | ) | ||
977 | ) | ||
978 | )* | ||
979 | )? | ||
980 | otherlv_5=')' | ||
981 | { | ||
982 | newLeafNode(otherlv_5, grammarAccess.getAssertionAccess().getRightParenthesisKeyword_0_0_3()); | ||
983 | } | ||
984 | otherlv_6=':' | ||
985 | { | ||
986 | newLeafNode(otherlv_6, grammarAccess.getAssertionAccess().getColonKeyword_0_0_4()); | ||
987 | } | ||
988 | ( | ||
989 | ( | ||
990 | { | ||
991 | newCompositeNode(grammarAccess.getAssertionAccess().getValueLogicValueEnumRuleCall_0_0_5_0()); | ||
992 | } | ||
993 | lv_value_7_0=ruleLogicValue | ||
994 | { | ||
995 | if ($current==null) { | ||
996 | $current = createModelElementForParent(grammarAccess.getAssertionRule()); | ||
997 | } | ||
998 | set( | ||
999 | $current, | ||
1000 | "value", | ||
1001 | lv_value_7_0, | ||
1002 | "org.eclipse.viatra.solver.language.Problem.LogicValue"); | ||
1003 | afterParserOrEnumRuleCall(); | ||
1004 | } | ||
1005 | ) | ||
1006 | ) | ||
1007 | ) | ||
1008 | | | ||
1009 | ( | ||
1010 | ( | ||
1011 | ( | ||
1012 | { | ||
1013 | newCompositeNode(grammarAccess.getAssertionAccess().getValueShortLogicValueEnumRuleCall_0_1_0_0()); | ||
1014 | } | ||
1015 | lv_value_8_0=ruleShortLogicValue | ||
1016 | { | ||
1017 | if ($current==null) { | ||
1018 | $current = createModelElementForParent(grammarAccess.getAssertionRule()); | ||
1019 | } | ||
1020 | set( | ||
1021 | $current, | ||
1022 | "value", | ||
1023 | lv_value_8_0, | ||
1024 | "org.eclipse.viatra.solver.language.Problem.ShortLogicValue"); | ||
1025 | afterParserOrEnumRuleCall(); | ||
1026 | } | ||
1027 | ) | ||
1028 | )? | ||
1029 | ( | ||
1030 | ( | ||
1031 | { | ||
1032 | if ($current==null) { | ||
1033 | $current = createModelElement(grammarAccess.getAssertionRule()); | ||
1034 | } | ||
1035 | } | ||
1036 | { | ||
1037 | newCompositeNode(grammarAccess.getAssertionAccess().getRelationRelationCrossReference_0_1_1_0()); | ||
1038 | } | ||
1039 | ruleQualifiedName | ||
1040 | { | ||
1041 | afterParserOrEnumRuleCall(); | ||
1042 | } | ||
1043 | ) | ||
1044 | ) | ||
1045 | otherlv_10='(' | ||
1046 | { | ||
1047 | newLeafNode(otherlv_10, grammarAccess.getAssertionAccess().getLeftParenthesisKeyword_0_1_2()); | ||
1048 | } | ||
1049 | ( | ||
1050 | ( | ||
1051 | ( | ||
1052 | { | ||
1053 | if ($current==null) { | ||
1054 | $current = createModelElement(grammarAccess.getAssertionRule()); | ||
1055 | } | ||
1056 | } | ||
1057 | { | ||
1058 | newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_1_3_0_0()); | ||
1059 | } | ||
1060 | ruleQualifiedName | ||
1061 | { | ||
1062 | afterParserOrEnumRuleCall(); | ||
1063 | } | ||
1064 | ) | ||
1065 | ) | ||
1066 | ( | ||
1067 | otherlv_12=',' | ||
1068 | { | ||
1069 | newLeafNode(otherlv_12, grammarAccess.getAssertionAccess().getCommaKeyword_0_1_3_1_0()); | ||
1070 | } | ||
1071 | ( | ||
1072 | ( | ||
1073 | { | ||
1074 | if ($current==null) { | ||
1075 | $current = createModelElement(grammarAccess.getAssertionRule()); | ||
1076 | } | ||
1077 | } | ||
1078 | { | ||
1079 | newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_1_3_1_1_0()); | ||
1080 | } | ||
1081 | ruleQualifiedName | ||
1082 | { | ||
1083 | afterParserOrEnumRuleCall(); | ||
1084 | } | ||
1085 | ) | ||
1086 | ) | ||
1087 | )* | ||
1088 | )? | ||
1089 | otherlv_14=')' | ||
1090 | { | ||
1091 | newLeafNode(otherlv_14, grammarAccess.getAssertionAccess().getRightParenthesisKeyword_0_1_4()); | ||
1092 | } | ||
1093 | ) | ||
1094 | ) | ||
1095 | otherlv_15='.' | ||
1096 | { | ||
1097 | newLeafNode(otherlv_15, grammarAccess.getAssertionAccess().getFullStopKeyword_1()); | ||
1098 | } | ||
1099 | ) | ||
1100 | ; | ||
1101 | |||
1102 | // Entry rule entryRuleScopeDeclaration | ||
1103 | entryRuleScopeDeclaration returns [EObject current=null]: | ||
1104 | { newCompositeNode(grammarAccess.getScopeDeclarationRule()); } | ||
1105 | iv_ruleScopeDeclaration=ruleScopeDeclaration | ||
1106 | { $current=$iv_ruleScopeDeclaration.current; } | ||
1107 | EOF; | ||
1108 | |||
1109 | // Rule ScopeDeclaration | ||
1110 | ruleScopeDeclaration returns [EObject current=null] | ||
1111 | @init { | ||
1112 | enterRule(); | ||
1113 | } | ||
1114 | @after { | ||
1115 | leaveRule(); | ||
1116 | }: | ||
1117 | ( | ||
1118 | otherlv_0='scope' | ||
1119 | { | ||
1120 | newLeafNode(otherlv_0, grammarAccess.getScopeDeclarationAccess().getScopeKeyword_0()); | ||
1121 | } | ||
1122 | ( | ||
1123 | ( | ||
1124 | { | ||
1125 | newCompositeNode(grammarAccess.getScopeDeclarationAccess().getTypeScopesTypeScopeParserRuleCall_1_0()); | ||
1126 | } | ||
1127 | lv_typeScopes_1_0=ruleTypeScope | ||
1128 | { | ||
1129 | if ($current==null) { | ||
1130 | $current = createModelElementForParent(grammarAccess.getScopeDeclarationRule()); | ||
1131 | } | ||
1132 | add( | ||
1133 | $current, | ||
1134 | "typeScopes", | ||
1135 | lv_typeScopes_1_0, | ||
1136 | "org.eclipse.viatra.solver.language.Problem.TypeScope"); | ||
1137 | afterParserOrEnumRuleCall(); | ||
1138 | } | ||
1139 | ) | ||
1140 | ) | ||
1141 | ( | ||
1142 | otherlv_2=',' | ||
1143 | { | ||
1144 | newLeafNode(otherlv_2, grammarAccess.getScopeDeclarationAccess().getCommaKeyword_2_0()); | ||
1145 | } | ||
1146 | ( | ||
1147 | ( | ||
1148 | { | ||
1149 | newCompositeNode(grammarAccess.getScopeDeclarationAccess().getTypeScopesTypeScopeParserRuleCall_2_1_0()); | ||
1150 | } | ||
1151 | lv_typeScopes_3_0=ruleTypeScope | ||
1152 | { | ||
1153 | if ($current==null) { | ||
1154 | $current = createModelElementForParent(grammarAccess.getScopeDeclarationRule()); | ||
1155 | } | ||
1156 | add( | ||
1157 | $current, | ||
1158 | "typeScopes", | ||
1159 | lv_typeScopes_3_0, | ||
1160 | "org.eclipse.viatra.solver.language.Problem.TypeScope"); | ||
1161 | afterParserOrEnumRuleCall(); | ||
1162 | } | ||
1163 | ) | ||
1164 | ) | ||
1165 | )* | ||
1166 | otherlv_4='.' | ||
1167 | { | ||
1168 | newLeafNode(otherlv_4, grammarAccess.getScopeDeclarationAccess().getFullStopKeyword_3()); | ||
1169 | } | ||
1170 | ) | ||
1171 | ; | ||
1172 | |||
1173 | // Entry rule entryRuleTypeScope | ||
1174 | entryRuleTypeScope returns [EObject current=null]: | ||
1175 | { newCompositeNode(grammarAccess.getTypeScopeRule()); } | ||
1176 | iv_ruleTypeScope=ruleTypeScope | ||
1177 | { $current=$iv_ruleTypeScope.current; } | ||
1178 | EOF; | ||
1179 | |||
1180 | // Rule TypeScope | ||
1181 | ruleTypeScope returns [EObject current=null] | ||
1182 | @init { | ||
1183 | enterRule(); | ||
1184 | } | ||
1185 | @after { | ||
1186 | leaveRule(); | ||
1187 | }: | ||
1188 | ( | ||
1189 | ( | ||
1190 | ( | ||
1191 | { | ||
1192 | if ($current==null) { | ||
1193 | $current = createModelElement(grammarAccess.getTypeScopeRule()); | ||
1194 | } | ||
1195 | } | ||
1196 | otherlv_0=RULE_ID | ||
1197 | { | ||
1198 | newLeafNode(otherlv_0, grammarAccess.getTypeScopeAccess().getTargetTypeClassDeclarationCrossReference_0_0()); | ||
1199 | } | ||
1200 | ) | ||
1201 | ) | ||
1202 | ( | ||
1203 | ( | ||
1204 | ( | ||
1205 | lv_increment_1_0='+=' | ||
1206 | { | ||
1207 | newLeafNode(lv_increment_1_0, grammarAccess.getTypeScopeAccess().getIncrementPlusSignEqualsSignKeyword_1_0_0()); | ||
1208 | } | ||
1209 | { | ||
1210 | if ($current==null) { | ||
1211 | $current = createModelElement(grammarAccess.getTypeScopeRule()); | ||
1212 | } | ||
1213 | setWithLastConsumed($current, "increment", lv_increment_1_0 != null, "+="); | ||
1214 | } | ||
1215 | ) | ||
1216 | ) | ||
1217 | | | ||
1218 | otherlv_2='=' | ||
1219 | { | ||
1220 | newLeafNode(otherlv_2, grammarAccess.getTypeScopeAccess().getEqualsSignKeyword_1_1()); | ||
1221 | } | ||
1222 | ) | ||
1223 | ( | ||
1224 | ( | ||
1225 | { | ||
1226 | newCompositeNode(grammarAccess.getTypeScopeAccess().getMultiplicityMultiplicityParserRuleCall_2_0()); | ||
1227 | } | ||
1228 | lv_multiplicity_3_0=ruleMultiplicity | ||
1229 | { | ||
1230 | if ($current==null) { | ||
1231 | $current = createModelElementForParent(grammarAccess.getTypeScopeRule()); | ||
1232 | } | ||
1233 | set( | ||
1234 | $current, | ||
1235 | "multiplicity", | ||
1236 | lv_multiplicity_3_0, | ||
1237 | "org.eclipse.viatra.solver.language.Problem.Multiplicity"); | ||
1238 | afterParserOrEnumRuleCall(); | ||
1239 | } | ||
1240 | ) | ||
1241 | ) | ||
1242 | ) | ||
1243 | ; | ||
1244 | |||
1245 | // Entry rule entryRuleMultiplicity | ||
1246 | entryRuleMultiplicity returns [EObject current=null]: | ||
1247 | { newCompositeNode(grammarAccess.getMultiplicityRule()); } | ||
1248 | iv_ruleMultiplicity=ruleMultiplicity | ||
1249 | { $current=$iv_ruleMultiplicity.current; } | ||
1250 | EOF; | ||
1251 | |||
1252 | // Rule Multiplicity | ||
1253 | ruleMultiplicity returns [EObject current=null] | ||
1254 | @init { | ||
1255 | enterRule(); | ||
1256 | } | ||
1257 | @after { | ||
1258 | leaveRule(); | ||
1259 | }: | ||
1260 | ( | ||
1261 | { | ||
1262 | newCompositeNode(grammarAccess.getMultiplicityAccess().getRangeMultiplicityParserRuleCall_0()); | ||
1263 | } | ||
1264 | this_RangeMultiplicity_0=ruleRangeMultiplicity | ||
1265 | { | ||
1266 | $current = $this_RangeMultiplicity_0.current; | ||
1267 | afterParserOrEnumRuleCall(); | ||
1268 | } | ||
1269 | | | ||
1270 | { | ||
1271 | newCompositeNode(grammarAccess.getMultiplicityAccess().getExactMultiplicityParserRuleCall_1()); | ||
1272 | } | ||
1273 | this_ExactMultiplicity_1=ruleExactMultiplicity | ||
1274 | { | ||
1275 | $current = $this_ExactMultiplicity_1.current; | ||
1276 | afterParserOrEnumRuleCall(); | ||
1277 | } | ||
1278 | ) | ||
1279 | ; | ||
1280 | |||
1281 | // Entry rule entryRuleRangeMultiplicity | ||
1282 | entryRuleRangeMultiplicity returns [EObject current=null]: | ||
1283 | { newCompositeNode(grammarAccess.getRangeMultiplicityRule()); } | ||
1284 | iv_ruleRangeMultiplicity=ruleRangeMultiplicity | ||
1285 | { $current=$iv_ruleRangeMultiplicity.current; } | ||
1286 | EOF; | ||
1287 | |||
1288 | // Rule RangeMultiplicity | ||
1289 | ruleRangeMultiplicity returns [EObject current=null] | ||
1290 | @init { | ||
1291 | enterRule(); | ||
1292 | } | ||
1293 | @after { | ||
1294 | leaveRule(); | ||
1295 | }: | ||
1296 | ( | ||
1297 | ( | ||
1298 | ( | ||
1299 | lv_lowerBound_0_0=RULE_INT | ||
1300 | { | ||
1301 | newLeafNode(lv_lowerBound_0_0, grammarAccess.getRangeMultiplicityAccess().getLowerBoundINTTerminalRuleCall_0_0()); | ||
1302 | } | ||
1303 | { | ||
1304 | if ($current==null) { | ||
1305 | $current = createModelElement(grammarAccess.getRangeMultiplicityRule()); | ||
1306 | } | ||
1307 | setWithLastConsumed( | ||
1308 | $current, | ||
1309 | "lowerBound", | ||
1310 | lv_lowerBound_0_0, | ||
1311 | "org.eclipse.xtext.common.Terminals.INT"); | ||
1312 | } | ||
1313 | ) | ||
1314 | ) | ||
1315 | otherlv_1='..' | ||
1316 | { | ||
1317 | newLeafNode(otherlv_1, grammarAccess.getRangeMultiplicityAccess().getFullStopFullStopKeyword_1()); | ||
1318 | } | ||
1319 | ( | ||
1320 | ( | ||
1321 | { | ||
1322 | newCompositeNode(grammarAccess.getRangeMultiplicityAccess().getUpperBoundUpperBoundParserRuleCall_2_0()); | ||
1323 | } | ||
1324 | lv_upperBound_2_0=ruleUpperBound | ||
1325 | { | ||
1326 | if ($current==null) { | ||
1327 | $current = createModelElementForParent(grammarAccess.getRangeMultiplicityRule()); | ||
1328 | } | ||
1329 | set( | ||
1330 | $current, | ||
1331 | "upperBound", | ||
1332 | lv_upperBound_2_0, | ||
1333 | "org.eclipse.viatra.solver.language.Problem.UpperBound"); | ||
1334 | afterParserOrEnumRuleCall(); | ||
1335 | } | ||
1336 | ) | ||
1337 | ) | ||
1338 | ) | ||
1339 | ; | ||
1340 | |||
1341 | // Entry rule entryRuleExactMultiplicity | ||
1342 | entryRuleExactMultiplicity returns [EObject current=null]: | ||
1343 | { newCompositeNode(grammarAccess.getExactMultiplicityRule()); } | ||
1344 | iv_ruleExactMultiplicity=ruleExactMultiplicity | ||
1345 | { $current=$iv_ruleExactMultiplicity.current; } | ||
1346 | EOF; | ||
1347 | |||
1348 | // Rule ExactMultiplicity | ||
1349 | ruleExactMultiplicity returns [EObject current=null] | ||
1350 | @init { | ||
1351 | enterRule(); | ||
1352 | } | ||
1353 | @after { | ||
1354 | leaveRule(); | ||
1355 | }: | ||
1356 | ( | ||
1357 | ( | ||
1358 | lv_exactValue_0_0=RULE_INT | ||
1359 | { | ||
1360 | newLeafNode(lv_exactValue_0_0, grammarAccess.getExactMultiplicityAccess().getExactValueINTTerminalRuleCall_0()); | ||
1361 | } | ||
1362 | { | ||
1363 | if ($current==null) { | ||
1364 | $current = createModelElement(grammarAccess.getExactMultiplicityRule()); | ||
1365 | } | ||
1366 | setWithLastConsumed( | ||
1367 | $current, | ||
1368 | "exactValue", | ||
1369 | lv_exactValue_0_0, | ||
1370 | "org.eclipse.xtext.common.Terminals.INT"); | ||
1371 | } | ||
1372 | ) | ||
1373 | ) | ||
1374 | ; | ||
1375 | |||
1376 | // Entry rule entryRuleUpperBound | ||
1377 | entryRuleUpperBound returns [String current=null]: | ||
1378 | { newCompositeNode(grammarAccess.getUpperBoundRule()); } | ||
1379 | iv_ruleUpperBound=ruleUpperBound | ||
1380 | { $current=$iv_ruleUpperBound.current.getText(); } | ||
1381 | EOF; | ||
1382 | |||
1383 | // Rule UpperBound | ||
1384 | ruleUpperBound returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] | ||
1385 | @init { | ||
1386 | enterRule(); | ||
1387 | } | ||
1388 | @after { | ||
1389 | leaveRule(); | ||
1390 | }: | ||
1391 | ( | ||
1392 | this_INT_0=RULE_INT | ||
1393 | { | ||
1394 | $current.merge(this_INT_0); | ||
1395 | } | ||
1396 | { | ||
1397 | newLeafNode(this_INT_0, grammarAccess.getUpperBoundAccess().getINTTerminalRuleCall_0()); | ||
1398 | } | ||
1399 | | | ||
1400 | kw='*' | ||
1401 | { | ||
1402 | $current.merge(kw); | ||
1403 | newLeafNode(kw, grammarAccess.getUpperBoundAccess().getAsteriskKeyword_1()); | ||
1404 | } | ||
1405 | ) | ||
1406 | ; | ||
1407 | |||
1408 | // Entry rule entryRuleQualifiedName | ||
1409 | entryRuleQualifiedName returns [String current=null]: | ||
1410 | { newCompositeNode(grammarAccess.getQualifiedNameRule()); } | ||
1411 | iv_ruleQualifiedName=ruleQualifiedName | ||
1412 | { $current=$iv_ruleQualifiedName.current.getText(); } | ||
1413 | EOF; | ||
1414 | |||
1415 | // Rule QualifiedName | ||
1416 | ruleQualifiedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] | ||
1417 | @init { | ||
1418 | enterRule(); | ||
1419 | } | ||
1420 | @after { | ||
1421 | leaveRule(); | ||
1422 | }: | ||
1423 | ( | ||
1424 | this_ID_0=RULE_ID | ||
1425 | { | ||
1426 | $current.merge(this_ID_0); | ||
1427 | } | ||
1428 | { | ||
1429 | newLeafNode(this_ID_0, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_0()); | ||
1430 | } | ||
1431 | ( | ||
1432 | kw='::' | ||
1433 | { | ||
1434 | $current.merge(kw); | ||
1435 | newLeafNode(kw, grammarAccess.getQualifiedNameAccess().getColonColonKeyword_1_0()); | ||
1436 | } | ||
1437 | this_ID_2=RULE_ID | ||
1438 | { | ||
1439 | $current.merge(this_ID_2); | ||
1440 | } | ||
1441 | { | ||
1442 | newLeafNode(this_ID_2, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_1_1()); | ||
1443 | } | ||
1444 | )* | ||
1445 | ) | ||
1446 | ; | ||
1447 | |||
1448 | // Rule LogicValue | ||
1449 | ruleLogicValue returns [Enumerator current=null] | ||
1450 | @init { | ||
1451 | enterRule(); | ||
1452 | } | ||
1453 | @after { | ||
1454 | leaveRule(); | ||
1455 | }: | ||
1456 | ( | ||
1457 | ( | ||
1458 | enumLiteral_0='true' | ||
1459 | { | ||
1460 | $current = grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); | ||
1461 | newLeafNode(enumLiteral_0, grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0()); | ||
1462 | } | ||
1463 | ) | ||
1464 | | | ||
1465 | ( | ||
1466 | enumLiteral_1='false' | ||
1467 | { | ||
1468 | $current = grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); | ||
1469 | newLeafNode(enumLiteral_1, grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1()); | ||
1470 | } | ||
1471 | ) | ||
1472 | | | ||
1473 | ( | ||
1474 | enumLiteral_2='unknown' | ||
1475 | { | ||
1476 | $current = grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2().getEnumLiteral().getInstance(); | ||
1477 | newLeafNode(enumLiteral_2, grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2()); | ||
1478 | } | ||
1479 | ) | ||
1480 | ) | ||
1481 | ; | ||
1482 | |||
1483 | // Rule ShortLogicValue | ||
1484 | ruleShortLogicValue returns [Enumerator current=null] | ||
1485 | @init { | ||
1486 | enterRule(); | ||
1487 | } | ||
1488 | @after { | ||
1489 | leaveRule(); | ||
1490 | }: | ||
1491 | ( | ||
1492 | ( | ||
1493 | enumLiteral_0='!' | ||
1494 | { | ||
1495 | $current = grammarAccess.getShortLogicValueAccess().getFALSEEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); | ||
1496 | newLeafNode(enumLiteral_0, grammarAccess.getShortLogicValueAccess().getFALSEEnumLiteralDeclaration_0()); | ||
1497 | } | ||
1498 | ) | ||
1499 | | | ||
1500 | ( | ||
1501 | enumLiteral_1='?' | ||
1502 | { | ||
1503 | $current = grammarAccess.getShortLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); | ||
1504 | newLeafNode(enumLiteral_1, grammarAccess.getShortLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_1()); | ||
1505 | } | ||
1506 | ) | ||
1507 | ) | ||
1508 | ; | ||
1509 | |||
1510 | RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*; | ||
1511 | |||
1512 | RULE_INT : ('0'..'9')+; | ||
1513 | |||
1514 | RULE_STRING : ('"' ('\\' .|~(('\\'|'"')))* '"'|'\'' ('\\' .|~(('\\'|'\'')))* '\''); | ||
1515 | |||
1516 | RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/'; | ||
1517 | |||
1518 | RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?; | ||
1519 | |||
1520 | RULE_WS : (' '|'\t'|'\r'|'\n')+; | ||
1521 | |||
1522 | RULE_ANY_OTHER : .; | ||