aboutsummaryrefslogtreecommitdiffstats
path: root/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalSolverLanguage.g
diff options
context:
space:
mode:
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalSolverLanguage.g')
-rw-r--r--Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalSolverLanguage.g4155
1 files changed, 2774 insertions, 1381 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalSolverLanguage.g b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalSolverLanguage.g
index 501e2e59..3fac9254 100644
--- a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalSolverLanguage.g
+++ b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalSolverLanguage.g
@@ -1,5 +1,5 @@
1/* 1/*
2 * generated by Xtext 2.18.0.M3 2 * generated by Xtext 2.21.0
3 */ 3 */
4grammar InternalSolverLanguage; 4grammar InternalSolverLanguage;
5 5
@@ -23,6 +23,7 @@ import org.eclipse.xtext.parser.*;
23import org.eclipse.xtext.parser.impl.*; 23import org.eclipse.xtext.parser.impl.*;
24import org.eclipse.emf.ecore.util.EcoreUtil; 24import org.eclipse.emf.ecore.util.EcoreUtil;
25import org.eclipse.emf.ecore.EObject; 25import org.eclipse.emf.ecore.EObject;
26import org.eclipse.emf.common.util.Enumerator;
26import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser; 27import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
27import org.eclipse.xtext.parser.antlr.XtextTokenStream; 28import org.eclipse.xtext.parser.antlr.XtextTokenStream;
28import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; 29import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
@@ -112,35 +113,242 @@ ruleStatement returns [EObject current=null]
112 leaveRule(); 113 leaveRule();
113}: 114}:
114 ( 115 (
116 (
117 {
118 newCompositeNode(grammarAccess.getStatementAccess().getAssertionOrDefinitionParserRuleCall_0_0());
119 }
120 this_AssertionOrDefinition_0=ruleAssertionOrDefinition
121 {
122 $current = $this_AssertionOrDefinition_0.current;
123 afterParserOrEnumRuleCall();
124 }
125 |
126 {
127 newCompositeNode(grammarAccess.getStatementAccess().getPredicateDefinitionParserRuleCall_0_1());
128 }
129 this_PredicateDefinition_1=rulePredicateDefinition
130 {
131 $current = $this_PredicateDefinition_1.current;
132 afterParserOrEnumRuleCall();
133 }
134 |
135 {
136 newCompositeNode(grammarAccess.getStatementAccess().getUnnamedErrorPrediateDefinitionParserRuleCall_0_2());
137 }
138 this_UnnamedErrorPrediateDefinition_2=ruleUnnamedErrorPrediateDefinition
139 {
140 $current = $this_UnnamedErrorPrediateDefinition_2.current;
141 afterParserOrEnumRuleCall();
142 }
143 |
144 {
145 newCompositeNode(grammarAccess.getStatementAccess().getDefaultDefinitionParserRuleCall_0_3());
146 }
147 this_DefaultDefinition_3=ruleDefaultDefinition
148 {
149 $current = $this_DefaultDefinition_3.current;
150 afterParserOrEnumRuleCall();
151 }
152 |
153 {
154 newCompositeNode(grammarAccess.getStatementAccess().getExternPredicateDefinitionParserRuleCall_0_4());
155 }
156 this_ExternPredicateDefinition_4=ruleExternPredicateDefinition
157 {
158 $current = $this_ExternPredicateDefinition_4.current;
159 afterParserOrEnumRuleCall();
160 }
161 |
162 {
163 newCompositeNode(grammarAccess.getStatementAccess().getMetricDefinitionParserRuleCall_0_5());
164 }
165 this_MetricDefinition_5=ruleMetricDefinition
166 {
167 $current = $this_MetricDefinition_5.current;
168 afterParserOrEnumRuleCall();
169 }
170 |
171 {
172 newCompositeNode(grammarAccess.getStatementAccess().getExternMetricDefinitionParserRuleCall_0_6());
173 }
174 this_ExternMetricDefinition_6=ruleExternMetricDefinition
175 {
176 $current = $this_ExternMetricDefinition_6.current;
177 afterParserOrEnumRuleCall();
178 }
179 |
180 {
181 newCompositeNode(grammarAccess.getStatementAccess().getClassDefinitionParserRuleCall_0_7());
182 }
183 this_ClassDefinition_7=ruleClassDefinition
184 {
185 $current = $this_ClassDefinition_7.current;
186 afterParserOrEnumRuleCall();
187 }
188 |
189 {
190 newCompositeNode(grammarAccess.getStatementAccess().getScopeDefinitionParserRuleCall_0_8());
191 }
192 this_ScopeDefinition_8=ruleScopeDefinition
193 {
194 $current = $this_ScopeDefinition_8.current;
195 afterParserOrEnumRuleCall();
196 }
197 |
198 {
199 newCompositeNode(grammarAccess.getStatementAccess().getObjectiveDefinitionParserRuleCall_0_9());
200 }
201 this_ObjectiveDefinition_9=ruleObjectiveDefinition
202 {
203 $current = $this_ObjectiveDefinition_9.current;
204 afterParserOrEnumRuleCall();
205 }
206 )
207 this_DOT_10=RULE_DOT
115 { 208 {
116 newCompositeNode(grammarAccess.getStatementAccess().getInterpretationParserRuleCall_0()); 209 newLeafNode(this_DOT_10, grammarAccess.getStatementAccess().getDOTTerminalRuleCall_1());
117 }
118 this_Interpretation_0=ruleInterpretation
119 {
120 $current = $this_Interpretation_0.current;
121 afterParserOrEnumRuleCall();
122 } 210 }
123 | 211 )
212;
213
214// Entry rule entryRuleAssertionOrDefinition
215entryRuleAssertionOrDefinition returns [EObject current=null]:
216 { newCompositeNode(grammarAccess.getAssertionOrDefinitionRule()); }
217 iv_ruleAssertionOrDefinition=ruleAssertionOrDefinition
218 { $current=$iv_ruleAssertionOrDefinition.current; }
219 EOF;
220
221// Rule AssertionOrDefinition
222ruleAssertionOrDefinition returns [EObject current=null]
223@init {
224 enterRule();
225}
226@after {
227 leaveRule();
228}:
229 (
124 { 230 {
125 newCompositeNode(grammarAccess.getStatementAccess().getPredicateParserRuleCall_1()); 231 newCompositeNode(grammarAccess.getAssertionOrDefinitionAccess().getExpressionParserRuleCall_0());
126 } 232 }
127 this_Predicate_1=rulePredicate 233 this_Expression_0=ruleExpression
128 { 234 {
129 $current = $this_Predicate_1.current; 235 $current = $this_Expression_0.current;
130 afterParserOrEnumRuleCall(); 236 afterParserOrEnumRuleCall();
131 } 237 }
238 (
239 (
240 (
241 {
242 $current = forceCreateModelElementAndSet(
243 grammarAccess.getAssertionOrDefinitionAccess().getAssertionBodyAction_1_0_0(),
244 $current);
245 }
246 )
247 (
248 otherlv_2=':'
249 {
250 newLeafNode(otherlv_2, grammarAccess.getAssertionOrDefinitionAccess().getColonKeyword_1_0_1_0());
251 }
252 (
253 (
254 {
255 newCompositeNode(grammarAccess.getAssertionOrDefinitionAccess().getRangeExpressionParserRuleCall_1_0_1_1_0());
256 }
257 lv_range_3_0=ruleExpression
258 {
259 if ($current==null) {
260 $current = createModelElementForParent(grammarAccess.getAssertionOrDefinitionRule());
261 }
262 set(
263 $current,
264 "range",
265 lv_range_3_0,
266 "org.eclipse.viatra.solver.language.SolverLanguage.Expression");
267 afterParserOrEnumRuleCall();
268 }
269 )
270 )
271 )?
272 )
273 |
274 (
275 (
276 {
277 $current = forceCreateModelElementAndSet(
278 grammarAccess.getAssertionOrDefinitionAccess().getPredicateDefinitionHeadAction_1_1_0(),
279 $current);
280 }
281 )
282 otherlv_5=':-'
283 {
284 newLeafNode(otherlv_5, grammarAccess.getAssertionOrDefinitionAccess().getColonHyphenMinusKeyword_1_1_1());
285 }
286 (
287 (
288 {
289 newCompositeNode(grammarAccess.getAssertionOrDefinitionAccess().getBodyExpressionParserRuleCall_1_1_2_0());
290 }
291 lv_body_6_0=ruleExpression
292 {
293 if ($current==null) {
294 $current = createModelElementForParent(grammarAccess.getAssertionOrDefinitionRule());
295 }
296 set(
297 $current,
298 "body",
299 lv_body_6_0,
300 "org.eclipse.viatra.solver.language.SolverLanguage.Expression");
301 afterParserOrEnumRuleCall();
302 }
303 )
304 )
305 )
306 |
307 (
308 (
309 {
310 $current = forceCreateModelElementAndSet(
311 grammarAccess.getAssertionOrDefinitionAccess().getMetricDefinitionHeadAction_1_2_0(),
312 $current);
313 }
314 )
315 otherlv_8='='
316 {
317 newLeafNode(otherlv_8, grammarAccess.getAssertionOrDefinitionAccess().getEqualsSignKeyword_1_2_1());
318 }
319 (
320 (
321 {
322 newCompositeNode(grammarAccess.getAssertionOrDefinitionAccess().getBodyExpressionParserRuleCall_1_2_2_0());
323 }
324 lv_body_9_0=ruleExpression
325 {
326 if ($current==null) {
327 $current = createModelElementForParent(grammarAccess.getAssertionOrDefinitionRule());
328 }
329 set(
330 $current,
331 "body",
332 lv_body_9_0,
333 "org.eclipse.viatra.solver.language.SolverLanguage.Expression");
334 afterParserOrEnumRuleCall();
335 }
336 )
337 )
338 )
339 )
132 ) 340 )
133; 341;
134 342
135// Entry rule entryRuleREALLiteral 343// Entry rule entryRulePredicateDefinition
136entryRuleREALLiteral returns [String current=null]: 344entryRulePredicateDefinition returns [EObject current=null]:
137 { newCompositeNode(grammarAccess.getREALLiteralRule()); } 345 { newCompositeNode(grammarAccess.getPredicateDefinitionRule()); }
138 iv_ruleREALLiteral=ruleREALLiteral 346 iv_rulePredicateDefinition=rulePredicateDefinition
139 { $current=$iv_ruleREALLiteral.current.getText(); } 347 { $current=$iv_rulePredicateDefinition.current; }
140 EOF; 348 EOF;
141 349
142// Rule REALLiteral 350// Rule PredicateDefinition
143ruleREALLiteral returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] 351rulePredicateDefinition returns [EObject current=null]
144@init { 352@init {
145 enterRule(); 353 enterRule();
146} 354}
@@ -149,43 +357,122 @@ ruleREALLiteral returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleTok
149}: 357}:
150 ( 358 (
151 ( 359 (
152 kw='-' 360 (
153 { 361 (
154 $current.merge(kw); 362 (
155 newLeafNode(kw, grammarAccess.getREALLiteralAccess().getHyphenMinusKeyword_0()); 363 lv_functional_0_0='functional'
156 } 364 {
157 )? 365 newLeafNode(lv_functional_0_0, grammarAccess.getPredicateDefinitionAccess().getFunctionalFunctionalKeyword_0_0_0_0());
158 this_INT_1=RULE_INT 366 }
159 { 367 {
160 $current.merge(this_INT_1); 368 if ($current==null) {
161 } 369 $current = createModelElement(grammarAccess.getPredicateDefinitionRule());
162 { 370 }
163 newLeafNode(this_INT_1, grammarAccess.getREALLiteralAccess().getINTTerminalRuleCall_1()); 371 setWithLastConsumed($current, "functional", true, "functional");
164 } 372 }
165 kw='.' 373 )
166 { 374 )
167 $current.merge(kw); 375 (
168 newLeafNode(kw, grammarAccess.getREALLiteralAccess().getFullStopKeyword_2()); 376 (
169 } 377 lv_error_1_0='error'
170 this_INT_3=RULE_INT 378 {
171 { 379 newLeafNode(lv_error_1_0, grammarAccess.getPredicateDefinitionAccess().getErrorErrorKeyword_0_0_1_0());
172 $current.merge(this_INT_3); 380 }
173 } 381 {
382 if ($current==null) {
383 $current = createModelElement(grammarAccess.getPredicateDefinitionRule());
384 }
385 setWithLastConsumed($current, "error", true, "error");
386 }
387 )
388 )?
389 )
390 |
391 (
392 (
393 (
394 lv_error_2_0='error'
395 {
396 newLeafNode(lv_error_2_0, grammarAccess.getPredicateDefinitionAccess().getErrorErrorKeyword_0_1_0_0());
397 }
398 {
399 if ($current==null) {
400 $current = createModelElement(grammarAccess.getPredicateDefinitionRule());
401 }
402 setWithLastConsumed($current, "error", true, "error");
403 }
404 )
405 )
406 (
407 (
408 lv_functional_3_0='functional'
409 {
410 newLeafNode(lv_functional_3_0, grammarAccess.getPredicateDefinitionAccess().getFunctionalFunctionalKeyword_0_1_1_0());
411 }
412 {
413 if ($current==null) {
414 $current = createModelElement(grammarAccess.getPredicateDefinitionRule());
415 }
416 setWithLastConsumed($current, "functional", true, "functional");
417 }
418 )
419 )?
420 )
421 )
422 (
423 (
424 {
425 newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getHeadCallParserRuleCall_1_0());
426 }
427 lv_head_4_0=ruleCall
428 {
429 if ($current==null) {
430 $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule());
431 }
432 set(
433 $current,
434 "head",
435 lv_head_4_0,
436 "org.eclipse.viatra.solver.language.SolverLanguage.Call");
437 afterParserOrEnumRuleCall();
438 }
439 )
440 )
441 otherlv_5=':-'
174 { 442 {
175 newLeafNode(this_INT_3, grammarAccess.getREALLiteralAccess().getINTTerminalRuleCall_3()); 443 newLeafNode(otherlv_5, grammarAccess.getPredicateDefinitionAccess().getColonHyphenMinusKeyword_2());
176 } 444 }
445 (
446 (
447 {
448 newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getBodyExpressionParserRuleCall_3_0());
449 }
450 lv_body_6_0=ruleExpression
451 {
452 if ($current==null) {
453 $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule());
454 }
455 set(
456 $current,
457 "body",
458 lv_body_6_0,
459 "org.eclipse.viatra.solver.language.SolverLanguage.Expression");
460 afterParserOrEnumRuleCall();
461 }
462 )
463 )
177 ) 464 )
178; 465;
179 466
180// Entry rule entryRuleINTLiteral 467// Entry rule entryRuleUnnamedErrorPrediateDefinition
181entryRuleINTLiteral returns [String current=null]: 468entryRuleUnnamedErrorPrediateDefinition returns [EObject current=null]:
182 { newCompositeNode(grammarAccess.getINTLiteralRule()); } 469 { newCompositeNode(grammarAccess.getUnnamedErrorPrediateDefinitionRule()); }
183 iv_ruleINTLiteral=ruleINTLiteral 470 iv_ruleUnnamedErrorPrediateDefinition=ruleUnnamedErrorPrediateDefinition
184 { $current=$iv_ruleINTLiteral.current.getText(); } 471 { $current=$iv_ruleUnnamedErrorPrediateDefinition.current; }
185 EOF; 472 EOF;
186 473
187// Rule INTLiteral 474// Rule UnnamedErrorPrediateDefinition
188ruleINTLiteral returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] 475ruleUnnamedErrorPrediateDefinition returns [EObject current=null]
189@init { 476@init {
190 enterRule(); 477 enterRule();
191} 478}
@@ -193,32 +480,64 @@ ruleINTLiteral returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToke
193 leaveRule(); 480 leaveRule();
194}: 481}:
195 ( 482 (
196 ( 483 otherlv_0='error'
197 kw='-'
198 {
199 $current.merge(kw);
200 newLeafNode(kw, grammarAccess.getINTLiteralAccess().getHyphenMinusKeyword_0());
201 }
202 )?
203 this_INT_1=RULE_INT
204 { 484 {
205 $current.merge(this_INT_1); 485 newLeafNode(otherlv_0, grammarAccess.getUnnamedErrorPrediateDefinitionAccess().getErrorKeyword_0());
206 } 486 }
487 (
488 (
489 {
490 newCompositeNode(grammarAccess.getUnnamedErrorPrediateDefinitionAccess().getArgumentListArgumentListParserRuleCall_1_0());
491 }
492 lv_argumentList_1_0=ruleArgumentList
493 {
494 if ($current==null) {
495 $current = createModelElementForParent(grammarAccess.getUnnamedErrorPrediateDefinitionRule());
496 }
497 set(
498 $current,
499 "argumentList",
500 lv_argumentList_1_0,
501 "org.eclipse.viatra.solver.language.SolverLanguage.ArgumentList");
502 afterParserOrEnumRuleCall();
503 }
504 )
505 )
506 otherlv_2=':-'
207 { 507 {
208 newLeafNode(this_INT_1, grammarAccess.getINTLiteralAccess().getINTTerminalRuleCall_1()); 508 newLeafNode(otherlv_2, grammarAccess.getUnnamedErrorPrediateDefinitionAccess().getColonHyphenMinusKeyword_2());
209 } 509 }
510 (
511 (
512 {
513 newCompositeNode(grammarAccess.getUnnamedErrorPrediateDefinitionAccess().getBodyExpressionParserRuleCall_3_0());
514 }
515 lv_body_3_0=ruleExpression
516 {
517 if ($current==null) {
518 $current = createModelElementForParent(grammarAccess.getUnnamedErrorPrediateDefinitionRule());
519 }
520 set(
521 $current,
522 "body",
523 lv_body_3_0,
524 "org.eclipse.viatra.solver.language.SolverLanguage.Expression");
525 afterParserOrEnumRuleCall();
526 }
527 )
528 )
210 ) 529 )
211; 530;
212 531
213// Entry rule entryRuleBooleanValue 532// Entry rule entryRuleDefaultDefinition
214entryRuleBooleanValue returns [EObject current=null]: 533entryRuleDefaultDefinition returns [EObject current=null]:
215 { newCompositeNode(grammarAccess.getBooleanValueRule()); } 534 { newCompositeNode(grammarAccess.getDefaultDefinitionRule()); }
216 iv_ruleBooleanValue=ruleBooleanValue 535 iv_ruleDefaultDefinition=ruleDefaultDefinition
217 { $current=$iv_ruleBooleanValue.current; } 536 { $current=$iv_ruleDefaultDefinition.current; }
218 EOF; 537 EOF;
219 538
220// Rule BooleanValue 539// Rule DefaultDefinition
221ruleBooleanValue returns [EObject current=null] 540ruleDefaultDefinition returns [EObject current=null]
222@init { 541@init {
223 enterRule(); 542 enterRule();
224} 543}
@@ -226,45 +545,64 @@ ruleBooleanValue returns [EObject current=null]
226 leaveRule(); 545 leaveRule();
227}: 546}:
228 ( 547 (
548 otherlv_0='default'
549 {
550 newLeafNode(otherlv_0, grammarAccess.getDefaultDefinitionAccess().getDefaultKeyword_0());
551 }
229 ( 552 (
230 ( 553 (
231 { 554 {
232 $current = forceCreateModelElement( 555 newCompositeNode(grammarAccess.getDefaultDefinitionAccess().getHeadCallParserRuleCall_1_0());
233 grammarAccess.getBooleanValueAccess().getBooleanTrueAction_0_0(), 556 }
234 $current); 557 lv_head_1_0=ruleCall
558 {
559 if ($current==null) {
560 $current = createModelElementForParent(grammarAccess.getDefaultDefinitionRule());
561 }
562 set(
563 $current,
564 "head",
565 lv_head_1_0,
566 "org.eclipse.viatra.solver.language.SolverLanguage.Call");
567 afterParserOrEnumRuleCall();
235 } 568 }
236 ) 569 )
237 otherlv_1='true'
238 {
239 newLeafNode(otherlv_1, grammarAccess.getBooleanValueAccess().getTrueKeyword_0_1());
240 }
241 ) 570 )
242 | 571 otherlv_2=':'
572 {
573 newLeafNode(otherlv_2, grammarAccess.getDefaultDefinitionAccess().getColonKeyword_2());
574 }
243 ( 575 (
244 otherlv_2='false'
245 {
246 newLeafNode(otherlv_2, grammarAccess.getBooleanValueAccess().getFalseKeyword_1_0());
247 }
248 ( 576 (
249 { 577 {
250 $current = forceCreateModelElement( 578 newCompositeNode(grammarAccess.getDefaultDefinitionAccess().getRangeExpressionParserRuleCall_3_0());
251 grammarAccess.getBooleanValueAccess().getBooleanFalseAction_1_1(), 579 }
252 $current); 580 lv_range_3_0=ruleExpression
581 {
582 if ($current==null) {
583 $current = createModelElementForParent(grammarAccess.getDefaultDefinitionRule());
584 }
585 set(
586 $current,
587 "range",
588 lv_range_3_0,
589 "org.eclipse.viatra.solver.language.SolverLanguage.Expression");
590 afterParserOrEnumRuleCall();
253 } 591 }
254 ) 592 )
255 ) 593 )
256 ) 594 )
257; 595;
258 596
259// Entry rule entryRuleTruthValue 597// Entry rule entryRuleExternPredicateDefinition
260entryRuleTruthValue returns [EObject current=null]: 598entryRuleExternPredicateDefinition returns [EObject current=null]:
261 { newCompositeNode(grammarAccess.getTruthValueRule()); } 599 { newCompositeNode(grammarAccess.getExternPredicateDefinitionRule()); }
262 iv_ruleTruthValue=ruleTruthValue 600 iv_ruleExternPredicateDefinition=ruleExternPredicateDefinition
263 { $current=$iv_ruleTruthValue.current; } 601 { $current=$iv_ruleExternPredicateDefinition.current; }
264 EOF; 602 EOF;
265 603
266// Rule TruthValue 604// Rule ExternPredicateDefinition
267ruleTruthValue returns [EObject current=null] 605ruleExternPredicateDefinition returns [EObject current=null]
268@init { 606@init {
269 enterRule(); 607 enterRule();
270} 608}
@@ -272,73 +610,125 @@ ruleTruthValue returns [EObject current=null]
272 leaveRule(); 610 leaveRule();
273}: 611}:
274 ( 612 (
613 otherlv_0='extern'
614 {
615 newLeafNode(otherlv_0, grammarAccess.getExternPredicateDefinitionAccess().getExternKeyword_0());
616 }
275 ( 617 (
276 ( 618 (
277 { 619 {
278 $current = forceCreateModelElement( 620 newCompositeNode(grammarAccess.getExternPredicateDefinitionAccess().getHeadCallParserRuleCall_1_0());
279 grammarAccess.getTruthValueAccess().getTrueAction_0_0(), 621 }
280 $current); 622 lv_head_1_0=ruleCall
623 {
624 if ($current==null) {
625 $current = createModelElementForParent(grammarAccess.getExternPredicateDefinitionRule());
626 }
627 set(
628 $current,
629 "head",
630 lv_head_1_0,
631 "org.eclipse.viatra.solver.language.SolverLanguage.Call");
632 afterParserOrEnumRuleCall();
281 } 633 }
282 ) 634 )
283 otherlv_1='true'
284 {
285 newLeafNode(otherlv_1, grammarAccess.getTruthValueAccess().getTrueKeyword_0_1());
286 }
287 ) 635 )
288 | 636 otherlv_2='.'
637 {
638 newLeafNode(otherlv_2, grammarAccess.getExternPredicateDefinitionAccess().getFullStopKeyword_2());
639 }
640 )
641;
642
643// Entry rule entryRuleMetricDefinition
644entryRuleMetricDefinition returns [EObject current=null]:
645 { newCompositeNode(grammarAccess.getMetricDefinitionRule()); }
646 iv_ruleMetricDefinition=ruleMetricDefinition
647 { $current=$iv_ruleMetricDefinition.current; }
648 EOF;
649
650// Rule MetricDefinition
651ruleMetricDefinition returns [EObject current=null]
652@init {
653 enterRule();
654}
655@after {
656 leaveRule();
657}:
658 (
289 ( 659 (
290 ( 660 (
291 { 661 {
292 $current = forceCreateModelElement( 662 newCompositeNode(grammarAccess.getMetricDefinitionAccess().getTypeMetricTypeEnumRuleCall_0_0());
293 grammarAccess.getTruthValueAccess().getFalseAction_1_0(), 663 }
294 $current); 664 lv_type_0_0=ruleMetricType
665 {
666 if ($current==null) {
667 $current = createModelElementForParent(grammarAccess.getMetricDefinitionRule());
668 }
669 set(
670 $current,
671 "type",
672 lv_type_0_0,
673 "org.eclipse.viatra.solver.language.SolverLanguage.MetricType");
674 afterParserOrEnumRuleCall();
295 } 675 }
296 ) 676 )
297 otherlv_3='false'
298 {
299 newLeafNode(otherlv_3, grammarAccess.getTruthValueAccess().getFalseKeyword_1_1());
300 }
301 ) 677 )
302 |
303 ( 678 (
304 ( 679 (
305 { 680 {
306 $current = forceCreateModelElement( 681 newCompositeNode(grammarAccess.getMetricDefinitionAccess().getHeadExpressionParserRuleCall_1_0());
307 grammarAccess.getTruthValueAccess().getUnknownAction_2_0(), 682 }
308 $current); 683 lv_head_1_0=ruleExpression
684 {
685 if ($current==null) {
686 $current = createModelElementForParent(grammarAccess.getMetricDefinitionRule());
687 }
688 set(
689 $current,
690 "head",
691 lv_head_1_0,
692 "org.eclipse.viatra.solver.language.SolverLanguage.Expression");
693 afterParserOrEnumRuleCall();
309 } 694 }
310 ) 695 )
311 otherlv_5='unknown'
312 {
313 newLeafNode(otherlv_5, grammarAccess.getTruthValueAccess().getUnknownKeyword_2_1());
314 }
315 ) 696 )
316 | 697 otherlv_2='='
698 {
699 newLeafNode(otherlv_2, grammarAccess.getMetricDefinitionAccess().getEqualsSignKeyword_2());
700 }
317 ( 701 (
318 ( 702 (
319 { 703 {
320 $current = forceCreateModelElement( 704 newCompositeNode(grammarAccess.getMetricDefinitionAccess().getBodyExpressionParserRuleCall_3_0());
321 grammarAccess.getTruthValueAccess().getErrorAction_3_0(), 705 }
322 $current); 706 lv_body_3_0=ruleExpression
707 {
708 if ($current==null) {
709 $current = createModelElementForParent(grammarAccess.getMetricDefinitionRule());
710 }
711 set(
712 $current,
713 "body",
714 lv_body_3_0,
715 "org.eclipse.viatra.solver.language.SolverLanguage.Expression");
716 afterParserOrEnumRuleCall();
323 } 717 }
324 ) 718 )
325 otherlv_7='error'
326 {
327 newLeafNode(otherlv_7, grammarAccess.getTruthValueAccess().getErrorKeyword_3_1());
328 }
329 ) 719 )
330 ) 720 )
331; 721;
332 722
333// Entry rule entryRuleInterpretation 723// Entry rule entryRuleExternMetricDefinition
334entryRuleInterpretation returns [EObject current=null]: 724entryRuleExternMetricDefinition returns [EObject current=null]:
335 { newCompositeNode(grammarAccess.getInterpretationRule()); } 725 { newCompositeNode(grammarAccess.getExternMetricDefinitionRule()); }
336 iv_ruleInterpretation=ruleInterpretation 726 iv_ruleExternMetricDefinition=ruleExternMetricDefinition
337 { $current=$iv_ruleInterpretation.current; } 727 { $current=$iv_ruleExternMetricDefinition.current; }
338 EOF; 728 EOF;
339 729
340// Rule Interpretation 730// Rule ExternMetricDefinition
341ruleInterpretation returns [EObject current=null] 731ruleExternMetricDefinition returns [EObject current=null]
342@init { 732@init {
343 enterRule(); 733 enterRule();
344} 734}
@@ -346,44 +736,96 @@ ruleInterpretation returns [EObject current=null]
346 leaveRule(); 736 leaveRule();
347}: 737}:
348 ( 738 (
739 otherlv_0='extern'
349 { 740 {
350 newCompositeNode(grammarAccess.getInterpretationAccess().getBasicInterpretationParserRuleCall_0()); 741 newLeafNode(otherlv_0, grammarAccess.getExternMetricDefinitionAccess().getExternKeyword_0());
351 }
352 this_BasicInterpretation_0=ruleBasicInterpretation
353 {
354 $current = $this_BasicInterpretation_0.current;
355 afterParserOrEnumRuleCall();
356 } 742 }
357 | 743 (
744 (
745 {
746 newCompositeNode(grammarAccess.getExternMetricDefinitionAccess().getTypeMetricTypeEnumRuleCall_1_0());
747 }
748 lv_type_1_0=ruleMetricType
749 {
750 if ($current==null) {
751 $current = createModelElementForParent(grammarAccess.getExternMetricDefinitionRule());
752 }
753 set(
754 $current,
755 "type",
756 lv_type_1_0,
757 "org.eclipse.viatra.solver.language.SolverLanguage.MetricType");
758 afterParserOrEnumRuleCall();
759 }
760 )
761 )
762 (
763 (
764 {
765 newCompositeNode(grammarAccess.getExternMetricDefinitionAccess().getHeadCallParserRuleCall_2_0());
766 }
767 lv_head_2_0=ruleCall
768 {
769 if ($current==null) {
770 $current = createModelElementForParent(grammarAccess.getExternMetricDefinitionRule());
771 }
772 set(
773 $current,
774 "head",
775 lv_head_2_0,
776 "org.eclipse.viatra.solver.language.SolverLanguage.Call");
777 afterParserOrEnumRuleCall();
778 }
779 )
780 )
781 )
782;
783
784// Entry rule entryRuleExpression
785entryRuleExpression returns [EObject current=null]:
786 { newCompositeNode(grammarAccess.getExpressionRule()); }
787 iv_ruleExpression=ruleExpression
788 { $current=$iv_ruleExpression.current; }
789 EOF;
790
791// Rule Expression
792ruleExpression returns [EObject current=null]
793@init {
794 enterRule();
795}
796@after {
797 leaveRule();
798}:
799 (
358 { 800 {
359 newCompositeNode(grammarAccess.getInterpretationAccess().getDefaultInterpretationParserRuleCall_1()); 801 newCompositeNode(grammarAccess.getExpressionAccess().getIfElseParserRuleCall_0());
360 } 802 }
361 this_DefaultInterpretation_1=ruleDefaultInterpretation 803 this_IfElse_0=ruleIfElse
362 { 804 {
363 $current = $this_DefaultInterpretation_1.current; 805 $current = $this_IfElse_0.current;
364 afterParserOrEnumRuleCall(); 806 afterParserOrEnumRuleCall();
365 } 807 }
366 | 808 |
367 { 809 {
368 newCompositeNode(grammarAccess.getInterpretationAccess().getCDInterpretationParserRuleCall_2()); 810 newCompositeNode(grammarAccess.getExpressionAccess().getDisjunctiveExpressionParserRuleCall_1());
369 } 811 }
370 this_CDInterpretation_2=ruleCDInterpretation 812 this_DisjunctiveExpression_1=ruleDisjunctiveExpression
371 { 813 {
372 $current = $this_CDInterpretation_2.current; 814 $current = $this_DisjunctiveExpression_1.current;
373 afterParserOrEnumRuleCall(); 815 afterParserOrEnumRuleCall();
374 } 816 }
375 ) 817 )
376; 818;
377 819
378// Entry rule entryRuleBasicInterpretation 820// Entry rule entryRuleIfElse
379entryRuleBasicInterpretation returns [EObject current=null]: 821entryRuleIfElse returns [EObject current=null]:
380 { newCompositeNode(grammarAccess.getBasicInterpretationRule()); } 822 { newCompositeNode(grammarAccess.getIfElseRule()); }
381 iv_ruleBasicInterpretation=ruleBasicInterpretation 823 iv_ruleIfElse=ruleIfElse
382 { $current=$iv_ruleBasicInterpretation.current; } 824 { $current=$iv_ruleIfElse.current; }
383 EOF; 825 EOF;
384 826
385// Rule BasicInterpretation 827// Rule IfElse
386ruleBasicInterpretation returns [EObject current=null] 828ruleIfElse returns [EObject current=null]
387@init { 829@init {
388 enterRule(); 830 enterRule();
389} 831}
@@ -391,100 +833,260 @@ ruleBasicInterpretation returns [EObject current=null]
391 leaveRule(); 833 leaveRule();
392}: 834}:
393 ( 835 (
836 otherlv_0='if'
837 {
838 newLeafNode(otherlv_0, grammarAccess.getIfElseAccess().getIfKeyword_0());
839 }
394 ( 840 (
395 ( 841 (
396 { 842 {
397 newCompositeNode(grammarAccess.getBasicInterpretationAccess().getSymbolSymbolParserRuleCall_0_0()); 843 newCompositeNode(grammarAccess.getIfElseAccess().getConditionExpressionParserRuleCall_1_0());
398 } 844 }
399 lv_symbol_0_0=ruleSymbol 845 lv_condition_1_0=ruleExpression
400 { 846 {
401 if ($current==null) { 847 if ($current==null) {
402 $current = createModelElementForParent(grammarAccess.getBasicInterpretationRule()); 848 $current = createModelElementForParent(grammarAccess.getIfElseRule());
403 } 849 }
404 set( 850 set(
405 $current, 851 $current,
406 "symbol", 852 "condition",
407 lv_symbol_0_0, 853 lv_condition_1_0,
408 "org.eclipse.viatra.solver.language.SolverLanguage.Symbol"); 854 "org.eclipse.viatra.solver.language.SolverLanguage.Expression");
409 afterParserOrEnumRuleCall(); 855 afterParserOrEnumRuleCall();
410 } 856 }
411 ) 857 )
412 ) 858 )
859 otherlv_2='then'
860 {
861 newLeafNode(otherlv_2, grammarAccess.getIfElseAccess().getThenKeyword_2());
862 }
413 ( 863 (
414 otherlv_1='('
415 {
416 newLeafNode(otherlv_1, grammarAccess.getBasicInterpretationAccess().getLeftParenthesisKeyword_1_0());
417 }
418 ( 864 (
865 {
866 newCompositeNode(grammarAccess.getIfElseAccess().getThenExpressionParserRuleCall_3_0());
867 }
868 lv_then_3_0=ruleExpression
869 {
870 if ($current==null) {
871 $current = createModelElementForParent(grammarAccess.getIfElseRule());
872 }
873 set(
874 $current,
875 "then",
876 lv_then_3_0,
877 "org.eclipse.viatra.solver.language.SolverLanguage.Expression");
878 afterParserOrEnumRuleCall();
879 }
880 )
881 )
882 otherlv_4='else'
883 {
884 newLeafNode(otherlv_4, grammarAccess.getIfElseAccess().getElseKeyword_4());
885 }
886 (
887 (
888 {
889 newCompositeNode(grammarAccess.getIfElseAccess().getElseExpressionParserRuleCall_5_0());
890 }
891 lv_else_5_0=ruleExpression
892 {
893 if ($current==null) {
894 $current = createModelElementForParent(grammarAccess.getIfElseRule());
895 }
896 set(
897 $current,
898 "else",
899 lv_else_5_0,
900 "org.eclipse.viatra.solver.language.SolverLanguage.Expression");
901 afterParserOrEnumRuleCall();
902 }
903 )
904 )
905 )
906;
907
908// Entry rule entryRuleDisjunctiveExpression
909entryRuleDisjunctiveExpression returns [EObject current=null]:
910 { newCompositeNode(grammarAccess.getDisjunctiveExpressionRule()); }
911 iv_ruleDisjunctiveExpression=ruleDisjunctiveExpression
912 { $current=$iv_ruleDisjunctiveExpression.current; }
913 EOF;
914
915// Rule DisjunctiveExpression
916ruleDisjunctiveExpression returns [EObject current=null]
917@init {
918 enterRule();
919}
920@after {
921 leaveRule();
922}:
923 (
924 {
925 newCompositeNode(grammarAccess.getDisjunctiveExpressionAccess().getConjunctiveExpressionParserRuleCall_0());
926 }
927 this_ConjunctiveExpression_0=ruleConjunctiveExpression
928 {
929 $current = $this_ConjunctiveExpression_0.current;
930 afterParserOrEnumRuleCall();
931 }
932 (
933 (
934 (
935 {
936 $current = forceCreateModelElementAndAdd(
937 grammarAccess.getDisjunctiveExpressionAccess().getDisjunctionChildrenAction_1_0_0(),
938 $current);
939 }
940 )
941 (
942 otherlv_2=';'
943 {
944 newLeafNode(otherlv_2, grammarAccess.getDisjunctiveExpressionAccess().getSemicolonKeyword_1_0_1_0());
945 }
946 (
947 (
948 {
949 newCompositeNode(grammarAccess.getDisjunctiveExpressionAccess().getChildrenConjunctiveExpressionParserRuleCall_1_0_1_1_0());
950 }
951 lv_children_3_0=ruleConjunctiveExpression
952 {
953 if ($current==null) {
954 $current = createModelElementForParent(grammarAccess.getDisjunctiveExpressionRule());
955 }
956 add(
957 $current,
958 "children",
959 lv_children_3_0,
960 "org.eclipse.viatra.solver.language.SolverLanguage.ConjunctiveExpression");
961 afterParserOrEnumRuleCall();
962 }
963 )
964 )
965 )+
966 )
967 |
968 (
969 (
970 {
971 $current = forceCreateModelElementAndSet(
972 grammarAccess.getDisjunctiveExpressionAccess().getCaseConditionAction_1_1_0(),
973 $current);
974 }
975 )
976 otherlv_5='->'
977 {
978 newLeafNode(otherlv_5, grammarAccess.getDisjunctiveExpressionAccess().getHyphenMinusGreaterThanSignKeyword_1_1_1());
979 }
419 ( 980 (
420 ( 981 (
421 { 982 {
422 newCompositeNode(grammarAccess.getBasicInterpretationAccess().getObjectsComplexObjectParserRuleCall_1_1_0_0()); 983 newCompositeNode(grammarAccess.getDisjunctiveExpressionAccess().getBodyConjunctiveExpressionParserRuleCall_1_1_2_0());
423 } 984 }
424 lv_objects_2_0=ruleComplexObject 985 lv_body_6_0=ruleConjunctiveExpression
425 { 986 {
426 if ($current==null) { 987 if ($current==null) {
427 $current = createModelElementForParent(grammarAccess.getBasicInterpretationRule()); 988 $current = createModelElementForParent(grammarAccess.getDisjunctiveExpressionRule());
428 } 989 }
429 add( 990 set(
430 $current, 991 $current,
431 "objects", 992 "body",
432 lv_objects_2_0, 993 lv_body_6_0,
433 "org.eclipse.viatra.solver.language.SolverLanguage.ComplexObject"); 994 "org.eclipse.viatra.solver.language.SolverLanguage.ConjunctiveExpression");
434 afterParserOrEnumRuleCall(); 995 afterParserOrEnumRuleCall();
435 } 996 }
436 ) 997 )
437 ) 998 )
438 ( 999 (
439 otherlv_3=','
440 { 1000 {
441 newLeafNode(otherlv_3, grammarAccess.getBasicInterpretationAccess().getCommaKeyword_1_1_1_0()); 1001 $current = forceCreateModelElementAndAdd(
1002 grammarAccess.getDisjunctiveExpressionAccess().getSwitchCasesAction_1_1_3(),
1003 $current);
1004 }
1005 )
1006 (
1007 otherlv_8=';'
1008 {
1009 newLeafNode(otherlv_8, grammarAccess.getDisjunctiveExpressionAccess().getSemicolonKeyword_1_1_4_0());
442 } 1010 }
443 ( 1011 (
444 ( 1012 (
445 { 1013 {
446 newCompositeNode(grammarAccess.getBasicInterpretationAccess().getObjectsComplexObjectParserRuleCall_1_1_1_1_0()); 1014 newCompositeNode(grammarAccess.getDisjunctiveExpressionAccess().getCasesCaseParserRuleCall_1_1_4_1_0());
447 } 1015 }
448 lv_objects_4_0=ruleComplexObject 1016 lv_cases_9_0=ruleCase
449 { 1017 {
450 if ($current==null) { 1018 if ($current==null) {
451 $current = createModelElementForParent(grammarAccess.getBasicInterpretationRule()); 1019 $current = createModelElementForParent(grammarAccess.getDisjunctiveExpressionRule());
452 } 1020 }
453 add( 1021 add(
454 $current, 1022 $current,
455 "objects", 1023 "cases",
456 lv_objects_4_0, 1024 lv_cases_9_0,
457 "org.eclipse.viatra.solver.language.SolverLanguage.ComplexObject"); 1025 "org.eclipse.viatra.solver.language.SolverLanguage.Case");
458 afterParserOrEnumRuleCall(); 1026 afterParserOrEnumRuleCall();
459 } 1027 }
460 ) 1028 )
461 ) 1029 )
462 )* 1030 )*
463 )? 1031 )
464 otherlv_5=')'
465 {
466 newLeafNode(otherlv_5, grammarAccess.getBasicInterpretationAccess().getRightParenthesisKeyword_1_2());
467 }
468 )? 1032 )?
469 otherlv_6=':' 1033 )
1034;
1035
1036// Entry rule entryRuleCase
1037entryRuleCase returns [EObject current=null]:
1038 { newCompositeNode(grammarAccess.getCaseRule()); }
1039 iv_ruleCase=ruleCase
1040 { $current=$iv_ruleCase.current; }
1041 EOF;
1042
1043// Rule Case
1044ruleCase returns [EObject current=null]
1045@init {
1046 enterRule();
1047}
1048@after {
1049 leaveRule();
1050}:
1051 (
1052 (
1053 (
1054 {
1055 newCompositeNode(grammarAccess.getCaseAccess().getConditionConjunctiveExpressionParserRuleCall_0_0());
1056 }
1057 lv_condition_0_0=ruleConjunctiveExpression
1058 {
1059 if ($current==null) {
1060 $current = createModelElementForParent(grammarAccess.getCaseRule());
1061 }
1062 set(
1063 $current,
1064 "condition",
1065 lv_condition_0_0,
1066 "org.eclipse.viatra.solver.language.SolverLanguage.ConjunctiveExpression");
1067 afterParserOrEnumRuleCall();
1068 }
1069 )
1070 )
1071 otherlv_1='->'
470 { 1072 {
471 newLeafNode(otherlv_6, grammarAccess.getBasicInterpretationAccess().getColonKeyword_2()); 1073 newLeafNode(otherlv_1, grammarAccess.getCaseAccess().getHyphenMinusGreaterThanSignKeyword_1());
472 } 1074 }
473 ( 1075 (
474 ( 1076 (
475 { 1077 {
476 newCompositeNode(grammarAccess.getBasicInterpretationAccess().getValueTruthValueParserRuleCall_3_0()); 1078 newCompositeNode(grammarAccess.getCaseAccess().getBodyConjunctiveExpressionParserRuleCall_2_0());
477 } 1079 }
478 lv_value_7_0=ruleTruthValue 1080 lv_body_2_0=ruleConjunctiveExpression
479 { 1081 {
480 if ($current==null) { 1082 if ($current==null) {
481 $current = createModelElementForParent(grammarAccess.getBasicInterpretationRule()); 1083 $current = createModelElementForParent(grammarAccess.getCaseRule());
482 } 1084 }
483 set( 1085 set(
484 $current, 1086 $current,
485 "value", 1087 "body",
486 lv_value_7_0, 1088 lv_body_2_0,
487 "org.eclipse.viatra.solver.language.SolverLanguage.TruthValue"); 1089 "org.eclipse.viatra.solver.language.SolverLanguage.ConjunctiveExpression");
488 afterParserOrEnumRuleCall(); 1090 afterParserOrEnumRuleCall();
489 } 1091 }
490 ) 1092 )
@@ -492,15 +1094,15 @@ ruleBasicInterpretation returns [EObject current=null]
492 ) 1094 )
493; 1095;
494 1096
495// Entry rule entryRuleSymbol 1097// Entry rule entryRuleConjunctiveExpression
496entryRuleSymbol returns [EObject current=null]: 1098entryRuleConjunctiveExpression returns [EObject current=null]:
497 { newCompositeNode(grammarAccess.getSymbolRule()); } 1099 { newCompositeNode(grammarAccess.getConjunctiveExpressionRule()); }
498 iv_ruleSymbol=ruleSymbol 1100 iv_ruleConjunctiveExpression=ruleConjunctiveExpression
499 { $current=$iv_ruleSymbol.current; } 1101 { $current=$iv_ruleConjunctiveExpression.current; }
500 EOF; 1102 EOF;
501 1103
502// Rule Symbol 1104// Rule ConjunctiveExpression
503ruleSymbol returns [EObject current=null] 1105ruleConjunctiveExpression returns [EObject current=null]
504@init { 1106@init {
505 enterRule(); 1107 enterRule();
506} 1108}
@@ -509,43 +1111,59 @@ ruleSymbol returns [EObject current=null]
509}: 1111}:
510 ( 1112 (
511 { 1113 {
512 newCompositeNode(grammarAccess.getSymbolAccess().getModelSymbolParserRuleCall_0()); 1114 newCompositeNode(grammarAccess.getConjunctiveExpressionAccess().getComparisonExpressionParserRuleCall_0());
513 } 1115 }
514 this_ModelSymbol_0=ruleModelSymbol 1116 this_ComparisonExpression_0=ruleComparisonExpression
515 { 1117 {
516 $current = $this_ModelSymbol_0.current; 1118 $current = $this_ComparisonExpression_0.current;
517 afterParserOrEnumRuleCall();
518 }
519 |
520 {
521 newCompositeNode(grammarAccess.getSymbolAccess().getPartialitySymbolParserRuleCall_1());
522 }
523 this_PartialitySymbol_1=rulePartialitySymbol
524 {
525 $current = $this_PartialitySymbol_1.current;
526 afterParserOrEnumRuleCall();
527 }
528 |
529 {
530 newCompositeNode(grammarAccess.getSymbolAccess().getDataSymbolParserRuleCall_2());
531 }
532 this_DataSymbol_2=ruleDataSymbol
533 {
534 $current = $this_DataSymbol_2.current;
535 afterParserOrEnumRuleCall(); 1119 afterParserOrEnumRuleCall();
536 } 1120 }
1121 (
1122 (
1123 {
1124 $current = forceCreateModelElementAndAdd(
1125 grammarAccess.getConjunctiveExpressionAccess().getConjunctionChildrenAction_1_0(),
1126 $current);
1127 }
1128 )
1129 (
1130 otherlv_2=','
1131 {
1132 newLeafNode(otherlv_2, grammarAccess.getConjunctiveExpressionAccess().getCommaKeyword_1_1_0());
1133 }
1134 (
1135 (
1136 {
1137 newCompositeNode(grammarAccess.getConjunctiveExpressionAccess().getChildrenComparisonExpressionParserRuleCall_1_1_1_0());
1138 }
1139 lv_children_3_0=ruleComparisonExpression
1140 {
1141 if ($current==null) {
1142 $current = createModelElementForParent(grammarAccess.getConjunctiveExpressionRule());
1143 }
1144 add(
1145 $current,
1146 "children",
1147 lv_children_3_0,
1148 "org.eclipse.viatra.solver.language.SolverLanguage.ComparisonExpression");
1149 afterParserOrEnumRuleCall();
1150 }
1151 )
1152 )
1153 )+
1154 )?
537 ) 1155 )
538; 1156;
539 1157
540// Entry rule entryRuleModelSymbol 1158// Entry rule entryRuleComparisonExpression
541entryRuleModelSymbol returns [EObject current=null]: 1159entryRuleComparisonExpression returns [EObject current=null]:
542 { newCompositeNode(grammarAccess.getModelSymbolRule()); } 1160 { newCompositeNode(grammarAccess.getComparisonExpressionRule()); }
543 iv_ruleModelSymbol=ruleModelSymbol 1161 iv_ruleComparisonExpression=ruleComparisonExpression
544 { $current=$iv_ruleModelSymbol.current; } 1162 { $current=$iv_ruleComparisonExpression.current; }
545 EOF; 1163 EOF;
546 1164
547// Rule ModelSymbol 1165// Rule ComparisonExpression
548ruleModelSymbol returns [EObject current=null] 1166ruleComparisonExpression returns [EObject current=null]
549@init { 1167@init {
550 enterRule(); 1168 enterRule();
551} 1169}
@@ -553,34 +1171,73 @@ ruleModelSymbol returns [EObject current=null]
553 leaveRule(); 1171 leaveRule();
554}: 1172}:
555 ( 1173 (
1174 {
1175 newCompositeNode(grammarAccess.getComparisonExpressionAccess().getAdditiveExpressionParserRuleCall_0());
1176 }
1177 this_AdditiveExpression_0=ruleAdditiveExpression
1178 {
1179 $current = $this_AdditiveExpression_0.current;
1180 afterParserOrEnumRuleCall();
1181 }
556 ( 1182 (
557 lv_name_0_0=RULE_ID 1183 (
558 { 1184 {
559 newLeafNode(lv_name_0_0, grammarAccess.getModelSymbolAccess().getNameIDTerminalRuleCall_0()); 1185 $current = forceCreateModelElementAndSet(
560 } 1186 grammarAccess.getComparisonExpressionAccess().getComparisonLeftAction_1_0(),
561 { 1187 $current);
562 if ($current==null) {
563 $current = createModelElement(grammarAccess.getModelSymbolRule());
564 } 1188 }
565 setWithLastConsumed( 1189 )
566 $current, 1190 (
567 "name", 1191 (
568 lv_name_0_0, 1192 {
569 "org.eclipse.xtext.common.Terminals.ID"); 1193 newCompositeNode(grammarAccess.getComparisonExpressionAccess().getOpComparisonOperatorEnumRuleCall_1_1_0());
570 } 1194 }
571 ) 1195 lv_op_2_0=ruleComparisonOperator
1196 {
1197 if ($current==null) {
1198 $current = createModelElementForParent(grammarAccess.getComparisonExpressionRule());
1199 }
1200 set(
1201 $current,
1202 "op",
1203 lv_op_2_0,
1204 "org.eclipse.viatra.solver.language.SolverLanguage.ComparisonOperator");
1205 afterParserOrEnumRuleCall();
1206 }
1207 )
1208 )
1209 (
1210 (
1211 {
1212 newCompositeNode(grammarAccess.getComparisonExpressionAccess().getRightAdditiveExpressionParserRuleCall_1_2_0());
1213 }
1214 lv_right_3_0=ruleAdditiveExpression
1215 {
1216 if ($current==null) {
1217 $current = createModelElementForParent(grammarAccess.getComparisonExpressionRule());
1218 }
1219 set(
1220 $current,
1221 "right",
1222 lv_right_3_0,
1223 "org.eclipse.viatra.solver.language.SolverLanguage.AdditiveExpression");
1224 afterParserOrEnumRuleCall();
1225 }
1226 )
1227 )
1228 )?
572 ) 1229 )
573; 1230;
574 1231
575// Entry rule entryRulePartialitySymbol 1232// Entry rule entryRuleAdditiveExpression
576entryRulePartialitySymbol returns [EObject current=null]: 1233entryRuleAdditiveExpression returns [EObject current=null]:
577 { newCompositeNode(grammarAccess.getPartialitySymbolRule()); } 1234 { newCompositeNode(grammarAccess.getAdditiveExpressionRule()); }
578 iv_rulePartialitySymbol=rulePartialitySymbol 1235 iv_ruleAdditiveExpression=ruleAdditiveExpression
579 { $current=$iv_rulePartialitySymbol.current; } 1236 { $current=$iv_ruleAdditiveExpression.current; }
580 EOF; 1237 EOF;
581 1238
582// Rule PartialitySymbol 1239// Rule AdditiveExpression
583rulePartialitySymbol returns [EObject current=null] 1240ruleAdditiveExpression returns [EObject current=null]
584@init { 1241@init {
585 enterRule(); 1242 enterRule();
586} 1243}
@@ -589,34 +1246,146 @@ rulePartialitySymbol returns [EObject current=null]
589}: 1246}:
590 ( 1247 (
591 { 1248 {
592 newCompositeNode(grammarAccess.getPartialitySymbolAccess().getExistSymbolParserRuleCall_0()); 1249 newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getMultiplicativeExpressionParserRuleCall_0());
593 } 1250 }
594 this_ExistSymbol_0=ruleExistSymbol 1251 this_MultiplicativeExpression_0=ruleMultiplicativeExpression
595 { 1252 {
596 $current = $this_ExistSymbol_0.current; 1253 $current = $this_MultiplicativeExpression_0.current;
597 afterParserOrEnumRuleCall(); 1254 afterParserOrEnumRuleCall();
598 } 1255 }
599 | 1256 (
1257 (
1258 {
1259 $current = forceCreateModelElementAndSet(
1260 grammarAccess.getAdditiveExpressionAccess().getBinaryExpressionLeftAction_1_0(),
1261 $current);
1262 }
1263 )
1264 (
1265 (
1266 {
1267 newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getOpAdditiveBinaryOperatorEnumRuleCall_1_1_0());
1268 }
1269 lv_op_2_0=ruleAdditiveBinaryOperator
1270 {
1271 if ($current==null) {
1272 $current = createModelElementForParent(grammarAccess.getAdditiveExpressionRule());
1273 }
1274 set(
1275 $current,
1276 "op",
1277 lv_op_2_0,
1278 "org.eclipse.viatra.solver.language.SolverLanguage.AdditiveBinaryOperator");
1279 afterParserOrEnumRuleCall();
1280 }
1281 )
1282 )
1283 (
1284 (
1285 {
1286 newCompositeNode(grammarAccess.getAdditiveExpressionAccess().getRightMultiplicativeExpressionParserRuleCall_1_2_0());
1287 }
1288 lv_right_3_0=ruleMultiplicativeExpression
1289 {
1290 if ($current==null) {
1291 $current = createModelElementForParent(grammarAccess.getAdditiveExpressionRule());
1292 }
1293 set(
1294 $current,
1295 "right",
1296 lv_right_3_0,
1297 "org.eclipse.viatra.solver.language.SolverLanguage.MultiplicativeExpression");
1298 afterParserOrEnumRuleCall();
1299 }
1300 )
1301 )
1302 )*
1303 )
1304;
1305
1306// Entry rule entryRuleMultiplicativeExpression
1307entryRuleMultiplicativeExpression returns [EObject current=null]:
1308 { newCompositeNode(grammarAccess.getMultiplicativeExpressionRule()); }
1309 iv_ruleMultiplicativeExpression=ruleMultiplicativeExpression
1310 { $current=$iv_ruleMultiplicativeExpression.current; }
1311 EOF;
1312
1313// Rule MultiplicativeExpression
1314ruleMultiplicativeExpression returns [EObject current=null]
1315@init {
1316 enterRule();
1317}
1318@after {
1319 leaveRule();
1320}:
1321 (
600 { 1322 {
601 newCompositeNode(grammarAccess.getPartialitySymbolAccess().getEqualsSymbolParserRuleCall_1()); 1323 newCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getExponentialExpressionParserRuleCall_0());
602 } 1324 }
603 this_EqualsSymbol_1=ruleEqualsSymbol 1325 this_ExponentialExpression_0=ruleExponentialExpression
604 { 1326 {
605 $current = $this_EqualsSymbol_1.current; 1327 $current = $this_ExponentialExpression_0.current;
606 afterParserOrEnumRuleCall(); 1328 afterParserOrEnumRuleCall();
607 } 1329 }
1330 (
1331 (
1332 {
1333 $current = forceCreateModelElementAndSet(
1334 grammarAccess.getMultiplicativeExpressionAccess().getBinaryExpressionLeftAction_1_0(),
1335 $current);
1336 }
1337 )
1338 (
1339 (
1340 {
1341 newCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getOpMultiplicativeBinaryOperatorEnumRuleCall_1_1_0());
1342 }
1343 lv_op_2_0=ruleMultiplicativeBinaryOperator
1344 {
1345 if ($current==null) {
1346 $current = createModelElementForParent(grammarAccess.getMultiplicativeExpressionRule());
1347 }
1348 set(
1349 $current,
1350 "op",
1351 lv_op_2_0,
1352 "org.eclipse.viatra.solver.language.SolverLanguage.MultiplicativeBinaryOperator");
1353 afterParserOrEnumRuleCall();
1354 }
1355 )
1356 )
1357 (
1358 (
1359 {
1360 newCompositeNode(grammarAccess.getMultiplicativeExpressionAccess().getRightExponentialExpressionParserRuleCall_1_2_0());
1361 }
1362 lv_right_3_0=ruleExponentialExpression
1363 {
1364 if ($current==null) {
1365 $current = createModelElementForParent(grammarAccess.getMultiplicativeExpressionRule());
1366 }
1367 set(
1368 $current,
1369 "right",
1370 lv_right_3_0,
1371 "org.eclipse.viatra.solver.language.SolverLanguage.ExponentialExpression");
1372 afterParserOrEnumRuleCall();
1373 }
1374 )
1375 )
1376 )*
608 ) 1377 )
609; 1378;
610 1379
611// Entry rule entryRuleExistSymbol 1380// Entry rule entryRuleExponentialExpression
612entryRuleExistSymbol returns [EObject current=null]: 1381entryRuleExponentialExpression returns [EObject current=null]:
613 { newCompositeNode(grammarAccess.getExistSymbolRule()); } 1382 { newCompositeNode(grammarAccess.getExponentialExpressionRule()); }
614 iv_ruleExistSymbol=ruleExistSymbol 1383 iv_ruleExponentialExpression=ruleExponentialExpression
615 { $current=$iv_ruleExistSymbol.current; } 1384 { $current=$iv_ruleExponentialExpression.current; }
616 EOF; 1385 EOF;
617 1386
618// Rule ExistSymbol 1387// Rule ExponentialExpression
619ruleExistSymbol returns [EObject current=null] 1388ruleExponentialExpression returns [EObject current=null]
620@init { 1389@init {
621 enterRule(); 1390 enterRule();
622} 1391}
@@ -624,29 +1393,73 @@ ruleExistSymbol returns [EObject current=null]
624 leaveRule(); 1393 leaveRule();
625}: 1394}:
626 ( 1395 (
627 otherlv_0='exists'
628 { 1396 {
629 newLeafNode(otherlv_0, grammarAccess.getExistSymbolAccess().getExistsKeyword_0()); 1397 newCompositeNode(grammarAccess.getExponentialExpressionAccess().getUnaryExpressionParserRuleCall_0());
1398 }
1399 this_UnaryExpression_0=ruleUnaryExpression
1400 {
1401 $current = $this_UnaryExpression_0.current;
1402 afterParserOrEnumRuleCall();
630 } 1403 }
631 ( 1404 (
632 { 1405 (
633 $current = forceCreateModelElement( 1406 {
634 grammarAccess.getExistSymbolAccess().getExistSymbolAction_1(), 1407 $current = forceCreateModelElementAndSet(
635 $current); 1408 grammarAccess.getExponentialExpressionAccess().getBinaryExpressionLeftAction_1_0(),
636 } 1409 $current);
637 ) 1410 }
1411 )
1412 (
1413 (
1414 {
1415 newCompositeNode(grammarAccess.getExponentialExpressionAccess().getOpExponentialOpEnumRuleCall_1_1_0());
1416 }
1417 lv_op_2_0=ruleExponentialOp
1418 {
1419 if ($current==null) {
1420 $current = createModelElementForParent(grammarAccess.getExponentialExpressionRule());
1421 }
1422 set(
1423 $current,
1424 "op",
1425 lv_op_2_0,
1426 "org.eclipse.viatra.solver.language.SolverLanguage.ExponentialOp");
1427 afterParserOrEnumRuleCall();
1428 }
1429 )
1430 )
1431 (
1432 (
1433 {
1434 newCompositeNode(grammarAccess.getExponentialExpressionAccess().getRightExponentialExpressionParserRuleCall_1_2_0());
1435 }
1436 lv_right_3_0=ruleExponentialExpression
1437 {
1438 if ($current==null) {
1439 $current = createModelElementForParent(grammarAccess.getExponentialExpressionRule());
1440 }
1441 set(
1442 $current,
1443 "right",
1444 lv_right_3_0,
1445 "org.eclipse.viatra.solver.language.SolverLanguage.ExponentialExpression");
1446 afterParserOrEnumRuleCall();
1447 }
1448 )
1449 )
1450 )?
638 ) 1451 )
639; 1452;
640 1453
641// Entry rule entryRuleEqualsSymbol 1454// Entry rule entryRuleUnaryExpression
642entryRuleEqualsSymbol returns [EObject current=null]: 1455entryRuleUnaryExpression returns [EObject current=null]:
643 { newCompositeNode(grammarAccess.getEqualsSymbolRule()); } 1456 { newCompositeNode(grammarAccess.getUnaryExpressionRule()); }
644 iv_ruleEqualsSymbol=ruleEqualsSymbol 1457 iv_ruleUnaryExpression=ruleUnaryExpression
645 { $current=$iv_ruleEqualsSymbol.current; } 1458 { $current=$iv_ruleUnaryExpression.current; }
646 EOF; 1459 EOF;
647 1460
648// Rule EqualsSymbol 1461// Rule UnaryExpression
649ruleEqualsSymbol returns [EObject current=null] 1462ruleUnaryExpression returns [EObject current=null]
650@init { 1463@init {
651 enterRule(); 1464 enterRule();
652} 1465}
@@ -654,29 +1467,74 @@ ruleEqualsSymbol returns [EObject current=null]
654 leaveRule(); 1467 leaveRule();
655}: 1468}:
656 ( 1469 (
657 otherlv_0='equals'
658 { 1470 {
659 newLeafNode(otherlv_0, grammarAccess.getEqualsSymbolAccess().getEqualsKeyword_0()); 1471 newCompositeNode(grammarAccess.getUnaryExpressionAccess().getAggregationExpressionParserRuleCall_0());
660 } 1472 }
1473 this_AggregationExpression_0=ruleAggregationExpression
1474 {
1475 $current = $this_AggregationExpression_0.current;
1476 afterParserOrEnumRuleCall();
1477 }
1478 |
661 ( 1479 (
662 { 1480 (
663 $current = forceCreateModelElement( 1481 {
664 grammarAccess.getEqualsSymbolAccess().getEqualsSymbolAction_1(), 1482 $current = forceCreateModelElement(
665 $current); 1483 grammarAccess.getUnaryExpressionAccess().getUnaryExpressionAction_1_0(),
666 } 1484 $current);
1485 }
1486 )
1487 (
1488 (
1489 {
1490 newCompositeNode(grammarAccess.getUnaryExpressionAccess().getOpUnaryOpEnumRuleCall_1_1_0());
1491 }
1492 lv_op_2_0=ruleUnaryOp
1493 {
1494 if ($current==null) {
1495 $current = createModelElementForParent(grammarAccess.getUnaryExpressionRule());
1496 }
1497 set(
1498 $current,
1499 "op",
1500 lv_op_2_0,
1501 "org.eclipse.viatra.solver.language.SolverLanguage.UnaryOp");
1502 afterParserOrEnumRuleCall();
1503 }
1504 )
1505 )
1506 (
1507 (
1508 {
1509 newCompositeNode(grammarAccess.getUnaryExpressionAccess().getBodyAggregationExpressionParserRuleCall_1_2_0());
1510 }
1511 lv_body_3_0=ruleAggregationExpression
1512 {
1513 if ($current==null) {
1514 $current = createModelElementForParent(grammarAccess.getUnaryExpressionRule());
1515 }
1516 set(
1517 $current,
1518 "body",
1519 lv_body_3_0,
1520 "org.eclipse.viatra.solver.language.SolverLanguage.AggregationExpression");
1521 afterParserOrEnumRuleCall();
1522 }
1523 )
1524 )
667 ) 1525 )
668 ) 1526 )
669; 1527;
670 1528
671// Entry rule entryRuleDataSymbol 1529// Entry rule entryRuleAggregationExpression
672entryRuleDataSymbol returns [EObject current=null]: 1530entryRuleAggregationExpression returns [EObject current=null]:
673 { newCompositeNode(grammarAccess.getDataSymbolRule()); } 1531 { newCompositeNode(grammarAccess.getAggregationExpressionRule()); }
674 iv_ruleDataSymbol=ruleDataSymbol 1532 iv_ruleAggregationExpression=ruleAggregationExpression
675 { $current=$iv_ruleDataSymbol.current; } 1533 { $current=$iv_ruleAggregationExpression.current; }
676 EOF; 1534 EOF;
677 1535
678// Rule DataSymbol 1536// Rule AggregationExpression
679ruleDataSymbol returns [EObject current=null] 1537ruleAggregationExpression returns [EObject current=null]
680@init { 1538@init {
681 enterRule(); 1539 enterRule();
682} 1540}
@@ -685,52 +1543,93 @@ ruleDataSymbol returns [EObject current=null]
685}: 1543}:
686 ( 1544 (
687 { 1545 {
688 newCompositeNode(grammarAccess.getDataSymbolAccess().getBooleanSymbolParserRuleCall_0()); 1546 newCompositeNode(grammarAccess.getAggregationExpressionAccess().getAtomicExpressionParserRuleCall_0());
689 } 1547 }
690 this_BooleanSymbol_0=ruleBooleanSymbol 1548 this_AtomicExpression_0=ruleAtomicExpression
691 { 1549 {
692 $current = $this_BooleanSymbol_0.current; 1550 $current = $this_AtomicExpression_0.current;
693 afterParserOrEnumRuleCall(); 1551 afterParserOrEnumRuleCall();
694 } 1552 }
695 | 1553 |
696 { 1554 {
697 newCompositeNode(grammarAccess.getDataSymbolAccess().getIntegerSymbolParserRuleCall_1()); 1555 newCompositeNode(grammarAccess.getAggregationExpressionAccess().getCountParserRuleCall_1());
698 } 1556 }
699 this_IntegerSymbol_1=ruleIntegerSymbol 1557 this_Count_1=ruleCount
700 { 1558 {
701 $current = $this_IntegerSymbol_1.current; 1559 $current = $this_Count_1.current;
702 afterParserOrEnumRuleCall(); 1560 afterParserOrEnumRuleCall();
703 } 1561 }
704 | 1562 |
705 { 1563 {
706 newCompositeNode(grammarAccess.getDataSymbolAccess().getRealSymbolParserRuleCall_2()); 1564 newCompositeNode(grammarAccess.getAggregationExpressionAccess().getAggregationParserRuleCall_2());
707 } 1565 }
708 this_RealSymbol_2=ruleRealSymbol 1566 this_Aggregation_2=ruleAggregation
709 { 1567 {
710 $current = $this_RealSymbol_2.current; 1568 $current = $this_Aggregation_2.current;
711 afterParserOrEnumRuleCall(); 1569 afterParserOrEnumRuleCall();
712 } 1570 }
713 | 1571 )
1572;
1573
1574// Entry rule entryRuleCount
1575entryRuleCount returns [EObject current=null]:
1576 { newCompositeNode(grammarAccess.getCountRule()); }
1577 iv_ruleCount=ruleCount
1578 { $current=$iv_ruleCount.current; }
1579 EOF;
1580
1581// Rule Count
1582ruleCount returns [EObject current=null]
1583@init {
1584 enterRule();
1585}
1586@after {
1587 leaveRule();
1588}:
1589 (
1590 otherlv_0='count'
714 { 1591 {
715 newCompositeNode(grammarAccess.getDataSymbolAccess().getStringSymbolParserRuleCall_3()); 1592 newLeafNode(otherlv_0, grammarAccess.getCountAccess().getCountKeyword_0());
716 } 1593 }
717 this_StringSymbol_3=ruleStringSymbol 1594 otherlv_1='{'
718 { 1595 {
719 $current = $this_StringSymbol_3.current; 1596 newLeafNode(otherlv_1, grammarAccess.getCountAccess().getLeftCurlyBracketKeyword_1());
720 afterParserOrEnumRuleCall(); 1597 }
1598 (
1599 (
1600 {
1601 newCompositeNode(grammarAccess.getCountAccess().getBodyExpressionParserRuleCall_2_0());
1602 }
1603 lv_body_2_0=ruleExpression
1604 {
1605 if ($current==null) {
1606 $current = createModelElementForParent(grammarAccess.getCountRule());
1607 }
1608 set(
1609 $current,
1610 "body",
1611 lv_body_2_0,
1612 "org.eclipse.viatra.solver.language.SolverLanguage.Expression");
1613 afterParserOrEnumRuleCall();
1614 }
1615 )
1616 )
1617 otherlv_3='}'
1618 {
1619 newLeafNode(otherlv_3, grammarAccess.getCountAccess().getRightCurlyBracketKeyword_3());
721 } 1620 }
722 ) 1621 )
723; 1622;
724 1623
725// Entry rule entryRuleBooleanSymbol 1624// Entry rule entryRuleAggregation
726entryRuleBooleanSymbol returns [EObject current=null]: 1625entryRuleAggregation returns [EObject current=null]:
727 { newCompositeNode(grammarAccess.getBooleanSymbolRule()); } 1626 { newCompositeNode(grammarAccess.getAggregationRule()); }
728 iv_ruleBooleanSymbol=ruleBooleanSymbol 1627 iv_ruleAggregation=ruleAggregation
729 { $current=$iv_ruleBooleanSymbol.current; } 1628 { $current=$iv_ruleAggregation.current; }
730 EOF; 1629 EOF;
731 1630
732// Rule BooleanSymbol 1631// Rule Aggregation
733ruleBooleanSymbol returns [EObject current=null] 1632ruleAggregation returns [EObject current=null]
734@init { 1633@init {
735 enterRule(); 1634 enterRule();
736} 1635}
@@ -738,29 +1637,87 @@ ruleBooleanSymbol returns [EObject current=null]
738 leaveRule(); 1637 leaveRule();
739}: 1638}:
740 ( 1639 (
741 otherlv_0='bool' 1640 (
1641 (
1642 {
1643 newCompositeNode(grammarAccess.getAggregationAccess().getOpAggregationOpEnumRuleCall_0_0());
1644 }
1645 lv_op_0_0=ruleAggregationOp
1646 {
1647 if ($current==null) {
1648 $current = createModelElementForParent(grammarAccess.getAggregationRule());
1649 }
1650 set(
1651 $current,
1652 "op",
1653 lv_op_0_0,
1654 "org.eclipse.viatra.solver.language.SolverLanguage.AggregationOp");
1655 afterParserOrEnumRuleCall();
1656 }
1657 )
1658 )
1659 otherlv_1='{'
742 { 1660 {
743 newLeafNode(otherlv_0, grammarAccess.getBooleanSymbolAccess().getBoolKeyword_0()); 1661 newLeafNode(otherlv_1, grammarAccess.getAggregationAccess().getLeftCurlyBracketKeyword_1());
744 } 1662 }
745 ( 1663 (
746 { 1664 (
747 $current = forceCreateModelElement( 1665 {
748 grammarAccess.getBooleanSymbolAccess().getBooleanSymbolAction_1(), 1666 newCompositeNode(grammarAccess.getAggregationAccess().getBodyExpressionParserRuleCall_2_0());
749 $current); 1667 }
750 } 1668 lv_body_2_0=ruleExpression
1669 {
1670 if ($current==null) {
1671 $current = createModelElementForParent(grammarAccess.getAggregationRule());
1672 }
1673 set(
1674 $current,
1675 "body",
1676 lv_body_2_0,
1677 "org.eclipse.viatra.solver.language.SolverLanguage.Expression");
1678 afterParserOrEnumRuleCall();
1679 }
1680 )
1681 )
1682 otherlv_3='|'
1683 {
1684 newLeafNode(otherlv_3, grammarAccess.getAggregationAccess().getVerticalLineKeyword_3());
1685 }
1686 (
1687 (
1688 {
1689 newCompositeNode(grammarAccess.getAggregationAccess().getConditionExpressionParserRuleCall_4_0());
1690 }
1691 lv_condition_4_0=ruleExpression
1692 {
1693 if ($current==null) {
1694 $current = createModelElementForParent(grammarAccess.getAggregationRule());
1695 }
1696 set(
1697 $current,
1698 "condition",
1699 lv_condition_4_0,
1700 "org.eclipse.viatra.solver.language.SolverLanguage.Expression");
1701 afterParserOrEnumRuleCall();
1702 }
1703 )
751 ) 1704 )
1705 otherlv_5='}'
1706 {
1707 newLeafNode(otherlv_5, grammarAccess.getAggregationAccess().getRightCurlyBracketKeyword_5());
1708 }
752 ) 1709 )
753; 1710;
754 1711
755// Entry rule entryRuleIntegerSymbol 1712// Entry rule entryRuleAtomicExpression
756entryRuleIntegerSymbol returns [EObject current=null]: 1713entryRuleAtomicExpression returns [EObject current=null]:
757 { newCompositeNode(grammarAccess.getIntegerSymbolRule()); } 1714 { newCompositeNode(grammarAccess.getAtomicExpressionRule()); }
758 iv_ruleIntegerSymbol=ruleIntegerSymbol 1715 iv_ruleAtomicExpression=ruleAtomicExpression
759 { $current=$iv_ruleIntegerSymbol.current; } 1716 { $current=$iv_ruleAtomicExpression.current; }
760 EOF; 1717 EOF;
761 1718
762// Rule IntegerSymbol 1719// Rule AtomicExpression
763ruleIntegerSymbol returns [EObject current=null] 1720ruleAtomicExpression returns [EObject current=null]
764@init { 1721@init {
765 enterRule(); 1722 enterRule();
766} 1723}
@@ -768,29 +1725,94 @@ ruleIntegerSymbol returns [EObject current=null]
768 leaveRule(); 1725 leaveRule();
769}: 1726}:
770 ( 1727 (
771 otherlv_0='int' 1728 (
1729 {
1730 newCompositeNode(grammarAccess.getAtomicExpressionAccess().getReferenceParserRuleCall_0_0());
1731 }
1732 this_Reference_0=ruleReference
1733 {
1734 $current = $this_Reference_0.current;
1735 afterParserOrEnumRuleCall();
1736 }
1737 (
1738 (
1739 {
1740 $current = forceCreateModelElementAndSet(
1741 grammarAccess.getAtomicExpressionAccess().getCallFunctorAction_0_1_0(),
1742 $current);
1743 }
1744 )
1745 (
1746 ('(')=>
1747 (
1748 {
1749 newCompositeNode(grammarAccess.getAtomicExpressionAccess().getArgumentListArgumentListParserRuleCall_0_1_1_0());
1750 }
1751 lv_argumentList_2_0=ruleArgumentList
1752 {
1753 if ($current==null) {
1754 $current = createModelElementForParent(grammarAccess.getAtomicExpressionRule());
1755 }
1756 set(
1757 $current,
1758 "argumentList",
1759 lv_argumentList_2_0,
1760 "org.eclipse.viatra.solver.language.SolverLanguage.ArgumentList");
1761 afterParserOrEnumRuleCall();
1762 }
1763 )
1764 )
1765 )?
1766 )
1767 |
1768 {
1769 newCompositeNode(grammarAccess.getAtomicExpressionAccess().getIntervalParserRuleCall_1());
1770 }
1771 this_Interval_3=ruleInterval
772 { 1772 {
773 newLeafNode(otherlv_0, grammarAccess.getIntegerSymbolAccess().getIntKeyword_0()); 1773 $current = $this_Interval_3.current;
1774 afterParserOrEnumRuleCall();
774 } 1775 }
1776 |
1777 {
1778 newCompositeNode(grammarAccess.getAtomicExpressionAccess().getLiteralParserRuleCall_2());
1779 }
1780 this_Literal_4=ruleLiteral
1781 {
1782 $current = $this_Literal_4.current;
1783 afterParserOrEnumRuleCall();
1784 }
1785 |
775 ( 1786 (
1787 otherlv_5='('
776 { 1788 {
777 $current = forceCreateModelElement( 1789 newLeafNode(otherlv_5, grammarAccess.getAtomicExpressionAccess().getLeftParenthesisKeyword_3_0());
778 grammarAccess.getIntegerSymbolAccess().getIntegerSymbolAction_1(), 1790 }
779 $current); 1791 {
1792 newCompositeNode(grammarAccess.getAtomicExpressionAccess().getExpressionParserRuleCall_3_1());
1793 }
1794 this_Expression_6=ruleExpression
1795 {
1796 $current = $this_Expression_6.current;
1797 afterParserOrEnumRuleCall();
1798 }
1799 otherlv_7=')'
1800 {
1801 newLeafNode(otherlv_7, grammarAccess.getAtomicExpressionAccess().getRightParenthesisKeyword_3_2());
780 } 1802 }
781 ) 1803 )
782 ) 1804 )
783; 1805;
784 1806
785// Entry rule entryRuleRealSymbol 1807// Entry rule entryRuleCall
786entryRuleRealSymbol returns [EObject current=null]: 1808entryRuleCall returns [EObject current=null]:
787 { newCompositeNode(grammarAccess.getRealSymbolRule()); } 1809 { newCompositeNode(grammarAccess.getCallRule()); }
788 iv_ruleRealSymbol=ruleRealSymbol 1810 iv_ruleCall=ruleCall
789 { $current=$iv_ruleRealSymbol.current; } 1811 { $current=$iv_ruleCall.current; }
790 EOF; 1812 EOF;
791 1813
792// Rule RealSymbol 1814// Rule Call
793ruleRealSymbol returns [EObject current=null] 1815ruleCall returns [EObject current=null]
794@init { 1816@init {
795 enterRule(); 1817 enterRule();
796} 1818}
@@ -798,29 +1820,95 @@ ruleRealSymbol returns [EObject current=null]
798 leaveRule(); 1820 leaveRule();
799}: 1821}:
800 ( 1822 (
801 otherlv_0='real'
802 {
803 newLeafNode(otherlv_0, grammarAccess.getRealSymbolAccess().getRealKeyword_0());
804 }
805 ( 1823 (
806 { 1824 (
807 $current = forceCreateModelElement( 1825 {
808 grammarAccess.getRealSymbolAccess().getRealSymbolAction_1(), 1826 newCompositeNode(grammarAccess.getCallAccess().getFunctorReferenceParserRuleCall_0_0());
809 $current); 1827 }
810 } 1828 lv_functor_0_0=ruleReference
1829 {
1830 if ($current==null) {
1831 $current = createModelElementForParent(grammarAccess.getCallRule());
1832 }
1833 set(
1834 $current,
1835 "functor",
1836 lv_functor_0_0,
1837 "org.eclipse.viatra.solver.language.SolverLanguage.Reference");
1838 afterParserOrEnumRuleCall();
1839 }
1840 )
1841 )
1842 (
1843 (
1844 (
1845 lv_transitiveClosure_1_0=RULE_STAR
1846 {
1847 newLeafNode(lv_transitiveClosure_1_0, grammarAccess.getCallAccess().getTransitiveClosureSTARTerminalRuleCall_1_0_0());
1848 }
1849 {
1850 if ($current==null) {
1851 $current = createModelElement(grammarAccess.getCallRule());
1852 }
1853 setWithLastConsumed(
1854 $current,
1855 "transitiveClosure",
1856 true,
1857 "org.eclipse.viatra.solver.language.SolverLanguage.STAR");
1858 }
1859 )
1860 )
1861 |
1862 (
1863 (
1864 lv_reflexiveTransitiveClosure_2_0=RULE_PLUS
1865 {
1866 newLeafNode(lv_reflexiveTransitiveClosure_2_0, grammarAccess.getCallAccess().getReflexiveTransitiveClosurePLUSTerminalRuleCall_1_1_0());
1867 }
1868 {
1869 if ($current==null) {
1870 $current = createModelElement(grammarAccess.getCallRule());
1871 }
1872 setWithLastConsumed(
1873 $current,
1874 "reflexiveTransitiveClosure",
1875 true,
1876 "org.eclipse.viatra.solver.language.SolverLanguage.PLUS");
1877 }
1878 )
1879 )
1880 )?
1881 (
1882 (
1883 {
1884 newCompositeNode(grammarAccess.getCallAccess().getArgumentListArgumentListParserRuleCall_2_0());
1885 }
1886 lv_argumentList_3_0=ruleArgumentList
1887 {
1888 if ($current==null) {
1889 $current = createModelElementForParent(grammarAccess.getCallRule());
1890 }
1891 set(
1892 $current,
1893 "argumentList",
1894 lv_argumentList_3_0,
1895 "org.eclipse.viatra.solver.language.SolverLanguage.ArgumentList");
1896 afterParserOrEnumRuleCall();
1897 }
1898 )
811 ) 1899 )
812 ) 1900 )
813; 1901;
814 1902
815// Entry rule entryRuleStringSymbol 1903// Entry rule entryRuleArgumentList
816entryRuleStringSymbol returns [EObject current=null]: 1904entryRuleArgumentList returns [EObject current=null]:
817 { newCompositeNode(grammarAccess.getStringSymbolRule()); } 1905 { newCompositeNode(grammarAccess.getArgumentListRule()); }
818 iv_ruleStringSymbol=ruleStringSymbol 1906 iv_ruleArgumentList=ruleArgumentList
819 { $current=$iv_ruleStringSymbol.current; } 1907 { $current=$iv_ruleArgumentList.current; }
820 EOF; 1908 EOF;
821 1909
822// Rule StringSymbol 1910// Rule ArgumentList
823ruleStringSymbol returns [EObject current=null] 1911ruleArgumentList returns [EObject current=null]
824@init { 1912@init {
825 enterRule(); 1913 enterRule();
826} 1914}
@@ -828,29 +1916,79 @@ ruleStringSymbol returns [EObject current=null]
828 leaveRule(); 1916 leaveRule();
829}: 1917}:
830 ( 1918 (
831 otherlv_0='string'
832 {
833 newLeafNode(otherlv_0, grammarAccess.getStringSymbolAccess().getStringKeyword_0());
834 }
835 ( 1919 (
836 { 1920 {
837 $current = forceCreateModelElement( 1921 $current = forceCreateModelElement(
838 grammarAccess.getStringSymbolAccess().getStringSymbolAction_1(), 1922 grammarAccess.getArgumentListAccess().getArgumentListAction_0(),
839 $current); 1923 $current);
840 } 1924 }
841 ) 1925 )
1926 otherlv_1='('
1927 {
1928 newLeafNode(otherlv_1, grammarAccess.getArgumentListAccess().getLeftParenthesisKeyword_1());
1929 }
1930 (
1931 (
1932 (
1933 {
1934 newCompositeNode(grammarAccess.getArgumentListAccess().getArgumentsArgumentParserRuleCall_2_0_0());
1935 }
1936 lv_arguments_2_0=ruleArgument
1937 {
1938 if ($current==null) {
1939 $current = createModelElementForParent(grammarAccess.getArgumentListRule());
1940 }
1941 add(
1942 $current,
1943 "arguments",
1944 lv_arguments_2_0,
1945 "org.eclipse.viatra.solver.language.SolverLanguage.Argument");
1946 afterParserOrEnumRuleCall();
1947 }
1948 )
1949 )
1950 (
1951 otherlv_3=','
1952 {
1953 newLeafNode(otherlv_3, grammarAccess.getArgumentListAccess().getCommaKeyword_2_1_0());
1954 }
1955 (
1956 (
1957 {
1958 newCompositeNode(grammarAccess.getArgumentListAccess().getArgumentsArgumentParserRuleCall_2_1_1_0());
1959 }
1960 lv_arguments_4_0=ruleArgument
1961 {
1962 if ($current==null) {
1963 $current = createModelElementForParent(grammarAccess.getArgumentListRule());
1964 }
1965 add(
1966 $current,
1967 "arguments",
1968 lv_arguments_4_0,
1969 "org.eclipse.viatra.solver.language.SolverLanguage.Argument");
1970 afterParserOrEnumRuleCall();
1971 }
1972 )
1973 )
1974 )*
1975 )?
1976 otherlv_5=')'
1977 {
1978 newLeafNode(otherlv_5, grammarAccess.getArgumentListAccess().getRightParenthesisKeyword_3());
1979 }
842 ) 1980 )
843; 1981;
844 1982
845// Entry rule entryRuleComplexObject 1983// Entry rule entryRuleArgument
846entryRuleComplexObject returns [EObject current=null]: 1984entryRuleArgument returns [EObject current=null]:
847 { newCompositeNode(grammarAccess.getComplexObjectRule()); } 1985 { newCompositeNode(grammarAccess.getArgumentRule()); }
848 iv_ruleComplexObject=ruleComplexObject 1986 iv_ruleArgument=ruleArgument
849 { $current=$iv_ruleComplexObject.current; } 1987 { $current=$iv_ruleArgument.current; }
850 EOF; 1988 EOF;
851 1989
852// Rule ComplexObject 1990// Rule Argument
853ruleComplexObject returns [EObject current=null] 1991ruleArgument returns [EObject current=null]
854@init { 1992@init {
855 enterRule(); 1993 enterRule();
856} 1994}
@@ -859,43 +1997,52 @@ ruleComplexObject returns [EObject current=null]
859}: 1997}:
860 ( 1998 (
861 { 1999 {
862 newCompositeNode(grammarAccess.getComplexObjectAccess().getObjectParserRuleCall_0()); 2000 newCompositeNode(grammarAccess.getArgumentAccess().getExpressionArgumentParserRuleCall_0());
863 } 2001 }
864 this_Object_0=ruleObject 2002 this_ExpressionArgument_0=ruleExpressionArgument
865 { 2003 {
866 $current = $this_Object_0.current; 2004 $current = $this_ExpressionArgument_0.current;
867 afterParserOrEnumRuleCall(); 2005 afterParserOrEnumRuleCall();
868 } 2006 }
869 | 2007 |
870 { 2008 {
871 newCompositeNode(grammarAccess.getComplexObjectAccess().getAllInstancesParserRuleCall_1()); 2009 newCompositeNode(grammarAccess.getArgumentAccess().getStarArgumentParserRuleCall_1());
872 } 2010 }
873 this_AllInstances_1=ruleAllInstances 2011 this_StarArgument_1=ruleStarArgument
874 { 2012 {
875 $current = $this_AllInstances_1.current; 2013 $current = $this_StarArgument_1.current;
876 afterParserOrEnumRuleCall(); 2014 afterParserOrEnumRuleCall();
877 } 2015 }
878 | 2016 |
879 { 2017 {
880 newCompositeNode(grammarAccess.getComplexObjectAccess().getAllObjectsParserRuleCall_2()); 2018 newCompositeNode(grammarAccess.getArgumentAccess().getTypedArgumentParserRuleCall_2());
881 } 2019 }
882 this_AllObjects_2=ruleAllObjects 2020 this_TypedArgument_2=ruleTypedArgument
883 { 2021 {
884 $current = $this_AllObjects_2.current; 2022 $current = $this_TypedArgument_2.current;
2023 afterParserOrEnumRuleCall();
2024 }
2025 |
2026 {
2027 newCompositeNode(grammarAccess.getArgumentAccess().getTypedStarArgumentParserRuleCall_3());
2028 }
2029 this_TypedStarArgument_3=ruleTypedStarArgument
2030 {
2031 $current = $this_TypedStarArgument_3.current;
885 afterParserOrEnumRuleCall(); 2032 afterParserOrEnumRuleCall();
886 } 2033 }
887 ) 2034 )
888; 2035;
889 2036
890// Entry rule entryRuleObject 2037// Entry rule entryRuleExpressionArgument
891entryRuleObject returns [EObject current=null]: 2038entryRuleExpressionArgument returns [EObject current=null]:
892 { newCompositeNode(grammarAccess.getObjectRule()); } 2039 { newCompositeNode(grammarAccess.getExpressionArgumentRule()); }
893 iv_ruleObject=ruleObject 2040 iv_ruleExpressionArgument=ruleExpressionArgument
894 { $current=$iv_ruleObject.current; } 2041 { $current=$iv_ruleExpressionArgument.current; }
895 EOF; 2042 EOF;
896 2043
897// Rule Object 2044// Rule ExpressionArgument
898ruleObject returns [EObject current=null] 2045ruleExpressionArgument returns [EObject current=null]
899@init { 2046@init {
900 enterRule(); 2047 enterRule();
901} 2048}
@@ -903,44 +2050,35 @@ ruleObject returns [EObject current=null]
903 leaveRule(); 2050 leaveRule();
904}: 2051}:
905 ( 2052 (
906 { 2053 (
907 newCompositeNode(grammarAccess.getObjectAccess().getNamedObjectParserRuleCall_0()); 2054 {
908 } 2055 newCompositeNode(grammarAccess.getExpressionArgumentAccess().getBodyComparisonExpressionParserRuleCall_0());
909 this_NamedObject_0=ruleNamedObject 2056 }
910 { 2057 lv_body_0_0=ruleComparisonExpression
911 $current = $this_NamedObject_0.current; 2058 {
912 afterParserOrEnumRuleCall(); 2059 if ($current==null) {
913 } 2060 $current = createModelElementForParent(grammarAccess.getExpressionArgumentRule());
914 | 2061 }
915 { 2062 set(
916 newCompositeNode(grammarAccess.getObjectAccess().getUnnamedObjectParserRuleCall_1()); 2063 $current,
917 } 2064 "body",
918 this_UnnamedObject_1=ruleUnnamedObject 2065 lv_body_0_0,
919 { 2066 "org.eclipse.viatra.solver.language.SolverLanguage.ComparisonExpression");
920 $current = $this_UnnamedObject_1.current; 2067 afterParserOrEnumRuleCall();
921 afterParserOrEnumRuleCall(); 2068 }
922 } 2069 )
923 |
924 {
925 newCompositeNode(grammarAccess.getObjectAccess().getDataObjectParserRuleCall_2());
926 }
927 this_DataObject_2=ruleDataObject
928 {
929 $current = $this_DataObject_2.current;
930 afterParserOrEnumRuleCall();
931 }
932 ) 2070 )
933; 2071;
934 2072
935// Entry rule entryRuleNamedObject 2073// Entry rule entryRuleStarArgument
936entryRuleNamedObject returns [EObject current=null]: 2074entryRuleStarArgument returns [EObject current=null]:
937 { newCompositeNode(grammarAccess.getNamedObjectRule()); } 2075 { newCompositeNode(grammarAccess.getStarArgumentRule()); }
938 iv_ruleNamedObject=ruleNamedObject 2076 iv_ruleStarArgument=ruleStarArgument
939 { $current=$iv_ruleNamedObject.current; } 2077 { $current=$iv_ruleStarArgument.current; }
940 EOF; 2078 EOF;
941 2079
942// Rule NamedObject 2080// Rule StarArgument
943ruleNamedObject returns [EObject current=null] 2081ruleStarArgument returns [EObject current=null]
944@init { 2082@init {
945 enterRule(); 2083 enterRule();
946} 2084}
@@ -948,44 +2086,119 @@ ruleNamedObject returns [EObject current=null]
948 leaveRule(); 2086 leaveRule();
949}: 2087}:
950 ( 2088 (
951 otherlv_0='\'' 2089 (
2090 {
2091 $current = forceCreateModelElement(
2092 grammarAccess.getStarArgumentAccess().getStarArgumentAction_0(),
2093 $current);
2094 }
2095 )
2096 otherlv_1='*'
952 { 2097 {
953 newLeafNode(otherlv_0, grammarAccess.getNamedObjectAccess().getApostropheKeyword_0()); 2098 newLeafNode(otherlv_1, grammarAccess.getStarArgumentAccess().getAsteriskKeyword_1());
954 } 2099 }
2100 )
2101;
2102
2103// Entry rule entryRuleTypedArgument
2104entryRuleTypedArgument returns [EObject current=null]:
2105 { newCompositeNode(grammarAccess.getTypedArgumentRule()); }
2106 iv_ruleTypedArgument=ruleTypedArgument
2107 { $current=$iv_ruleTypedArgument.current; }
2108 EOF;
2109
2110// Rule TypedArgument
2111ruleTypedArgument returns [EObject current=null]
2112@init {
2113 enterRule();
2114}
2115@after {
2116 leaveRule();
2117}:
2118 (
955 ( 2119 (
956 ( 2120 (
957 lv_name_1_0=RULE_ID
958 { 2121 {
959 newLeafNode(lv_name_1_0, grammarAccess.getNamedObjectAccess().getNameIDTerminalRuleCall_1_0()); 2122 if ($current==null) {
2123 $current = createModelElement(grammarAccess.getTypedArgumentRule());
2124 }
960 } 2125 }
961 { 2126 {
2127 newCompositeNode(grammarAccess.getTypedArgumentAccess().getTypeNamedElementCrossReference_0_0());
2128 }
2129 ruleQualifiedName
2130 {
2131 afterParserOrEnumRuleCall();
2132 }
2133 )
2134 )
2135 (
2136 (
2137 {
962 if ($current==null) { 2138 if ($current==null) {
963 $current = createModelElement(grammarAccess.getNamedObjectRule()); 2139 $current = createModelElement(grammarAccess.getTypedArgumentRule());
964 } 2140 }
965 setWithLastConsumed( 2141 }
966 $current, 2142 {
967 "name", 2143 newCompositeNode(grammarAccess.getTypedArgumentAccess().getVariableNamedElementCrossReference_1_0());
968 lv_name_1_0, 2144 }
969 "org.eclipse.xtext.common.Terminals.ID"); 2145 ruleQualifiedName
2146 {
2147 afterParserOrEnumRuleCall();
970 } 2148 }
971 ) 2149 )
972 ) 2150 )
973 otherlv_2='\'' 2151 )
2152;
2153
2154// Entry rule entryRuleTypedStarArgument
2155entryRuleTypedStarArgument returns [EObject current=null]:
2156 { newCompositeNode(grammarAccess.getTypedStarArgumentRule()); }
2157 iv_ruleTypedStarArgument=ruleTypedStarArgument
2158 { $current=$iv_ruleTypedStarArgument.current; }
2159 EOF;
2160
2161// Rule TypedStarArgument
2162ruleTypedStarArgument returns [EObject current=null]
2163@init {
2164 enterRule();
2165}
2166@after {
2167 leaveRule();
2168}:
2169 (
2170 (
2171 (
2172 {
2173 if ($current==null) {
2174 $current = createModelElement(grammarAccess.getTypedStarArgumentRule());
2175 }
2176 }
2177 {
2178 newCompositeNode(grammarAccess.getTypedStarArgumentAccess().getTypeNamedElementCrossReference_0_0());
2179 }
2180 ruleQualifiedName
2181 {
2182 afterParserOrEnumRuleCall();
2183 }
2184 )
2185 )
2186 otherlv_1='*'
974 { 2187 {
975 newLeafNode(otherlv_2, grammarAccess.getNamedObjectAccess().getApostropheKeyword_2()); 2188 newLeafNode(otherlv_1, grammarAccess.getTypedStarArgumentAccess().getAsteriskKeyword_1());
976 } 2189 }
977 ) 2190 )
978; 2191;
979 2192
980// Entry rule entryRuleUnnamedObject 2193// Entry rule entryRuleReference
981entryRuleUnnamedObject returns [EObject current=null]: 2194entryRuleReference returns [EObject current=null]:
982 { newCompositeNode(grammarAccess.getUnnamedObjectRule()); } 2195 { newCompositeNode(grammarAccess.getReferenceRule()); }
983 iv_ruleUnnamedObject=ruleUnnamedObject 2196 iv_ruleReference=ruleReference
984 { $current=$iv_ruleUnnamedObject.current; } 2197 { $current=$iv_ruleReference.current; }
985 EOF; 2198 EOF;
986 2199
987// Rule UnnamedObject 2200// Rule Reference
988ruleUnnamedObject returns [EObject current=null] 2201ruleReference returns [EObject current=null]
989@init { 2202@init {
990 enterRule(); 2203 enterRule();
991} 2204}
@@ -994,33 +2207,31 @@ ruleUnnamedObject returns [EObject current=null]
994}: 2207}:
995 ( 2208 (
996 ( 2209 (
997 lv_name_0_0=RULE_ID
998 {
999 newLeafNode(lv_name_0_0, grammarAccess.getUnnamedObjectAccess().getNameIDTerminalRuleCall_0());
1000 }
1001 { 2210 {
1002 if ($current==null) { 2211 if ($current==null) {
1003 $current = createModelElement(grammarAccess.getUnnamedObjectRule()); 2212 $current = createModelElement(grammarAccess.getReferenceRule());
1004 } 2213 }
1005 setWithLastConsumed( 2214 }
1006 $current, 2215 {
1007 "name", 2216 newCompositeNode(grammarAccess.getReferenceAccess().getReferredNamedElementCrossReference_0());
1008 lv_name_0_0, 2217 }
1009 "org.eclipse.xtext.common.Terminals.ID"); 2218 ruleQualifiedName
2219 {
2220 afterParserOrEnumRuleCall();
1010 } 2221 }
1011 ) 2222 )
1012 ) 2223 )
1013; 2224;
1014 2225
1015// Entry rule entryRuleDataObject 2226// Entry rule entryRuleInterval
1016entryRuleDataObject returns [EObject current=null]: 2227entryRuleInterval returns [EObject current=null]:
1017 { newCompositeNode(grammarAccess.getDataObjectRule()); } 2228 { newCompositeNode(grammarAccess.getIntervalRule()); }
1018 iv_ruleDataObject=ruleDataObject 2229 iv_ruleInterval=ruleInterval
1019 { $current=$iv_ruleDataObject.current; } 2230 { $current=$iv_ruleInterval.current; }
1020 EOF; 2231 EOF;
1021 2232
1022// Rule DataObject 2233// Rule Interval
1023ruleDataObject returns [EObject current=null] 2234ruleInterval returns [EObject current=null]
1024@init { 2235@init {
1025 enterRule(); 2236 enterRule();
1026} 2237}
@@ -1028,53 +2239,131 @@ ruleDataObject returns [EObject current=null]
1028 leaveRule(); 2239 leaveRule();
1029}: 2240}:
1030 ( 2241 (
2242 otherlv_0='['
2243 {
2244 newLeafNode(otherlv_0, grammarAccess.getIntervalAccess().getLeftSquareBracketKeyword_0());
2245 }
2246 (
2247 (
2248 {
2249 newCompositeNode(grammarAccess.getIntervalAccess().getLowerBoundExpressionParserRuleCall_1_0());
2250 }
2251 lv_lowerBound_1_0=ruleExpression
2252 {
2253 if ($current==null) {
2254 $current = createModelElementForParent(grammarAccess.getIntervalRule());
2255 }
2256 set(
2257 $current,
2258 "lowerBound",
2259 lv_lowerBound_1_0,
2260 "org.eclipse.viatra.solver.language.SolverLanguage.Expression");
2261 afterParserOrEnumRuleCall();
2262 }
2263 )
2264 )
2265 otherlv_2='..'
1031 { 2266 {
1032 newCompositeNode(grammarAccess.getDataObjectAccess().getBooleanObjectParserRuleCall_0()); 2267 newLeafNode(otherlv_2, grammarAccess.getIntervalAccess().getFullStopFullStopKeyword_2());
1033 } 2268 }
1034 this_BooleanObject_0=ruleBooleanObject 2269 (
2270 (
2271 {
2272 newCompositeNode(grammarAccess.getIntervalAccess().getUpperBoundExpressionParserRuleCall_3_0());
2273 }
2274 lv_upperBound_3_0=ruleExpression
2275 {
2276 if ($current==null) {
2277 $current = createModelElementForParent(grammarAccess.getIntervalRule());
2278 }
2279 set(
2280 $current,
2281 "upperBound",
2282 lv_upperBound_3_0,
2283 "org.eclipse.viatra.solver.language.SolverLanguage.Expression");
2284 afterParserOrEnumRuleCall();
2285 }
2286 )
2287 )
2288 otherlv_4=']'
1035 { 2289 {
1036 $current = $this_BooleanObject_0.current; 2290 newLeafNode(otherlv_4, grammarAccess.getIntervalAccess().getRightSquareBracketKeyword_4());
2291 }
2292 )
2293;
2294
2295// Entry rule entryRuleLiteral
2296entryRuleLiteral returns [EObject current=null]:
2297 { newCompositeNode(grammarAccess.getLiteralRule()); }
2298 iv_ruleLiteral=ruleLiteral
2299 { $current=$iv_ruleLiteral.current; }
2300 EOF;
2301
2302// Rule Literal
2303ruleLiteral returns [EObject current=null]
2304@init {
2305 enterRule();
2306}
2307@after {
2308 leaveRule();
2309}:
2310 (
2311 {
2312 newCompositeNode(grammarAccess.getLiteralAccess().getLogicLiteralParserRuleCall_0());
2313 }
2314 this_LogicLiteral_0=ruleLogicLiteral
2315 {
2316 $current = $this_LogicLiteral_0.current;
2317 afterParserOrEnumRuleCall();
2318 }
2319 |
2320 {
2321 newCompositeNode(grammarAccess.getLiteralAccess().getNumericLiteralParserRuleCall_1());
2322 }
2323 this_NumericLiteral_1=ruleNumericLiteral
2324 {
2325 $current = $this_NumericLiteral_1.current;
1037 afterParserOrEnumRuleCall(); 2326 afterParserOrEnumRuleCall();
1038 } 2327 }
1039 | 2328 |
1040 { 2329 {
1041 newCompositeNode(grammarAccess.getDataObjectAccess().getIntObjectParserRuleCall_1()); 2330 newCompositeNode(grammarAccess.getLiteralAccess().getInfinityLiteralParserRuleCall_2());
1042 } 2331 }
1043 this_IntObject_1=ruleIntObject 2332 this_InfinityLiteral_2=ruleInfinityLiteral
1044 { 2333 {
1045 $current = $this_IntObject_1.current; 2334 $current = $this_InfinityLiteral_2.current;
1046 afterParserOrEnumRuleCall(); 2335 afterParserOrEnumRuleCall();
1047 } 2336 }
1048 | 2337 |
1049 { 2338 {
1050 newCompositeNode(grammarAccess.getDataObjectAccess().getRealObjectParserRuleCall_2()); 2339 newCompositeNode(grammarAccess.getLiteralAccess().getEmptyIntervalLiteralParserRuleCall_3());
1051 } 2340 }
1052 this_RealObject_2=ruleRealObject 2341 this_EmptyIntervalLiteral_3=ruleEmptyIntervalLiteral
1053 { 2342 {
1054 $current = $this_RealObject_2.current; 2343 $current = $this_EmptyIntervalLiteral_3.current;
1055 afterParserOrEnumRuleCall(); 2344 afterParserOrEnumRuleCall();
1056 } 2345 }
1057 | 2346 |
1058 { 2347 {
1059 newCompositeNode(grammarAccess.getDataObjectAccess().getStringObjectParserRuleCall_3()); 2348 newCompositeNode(grammarAccess.getLiteralAccess().getStringLiteralParserRuleCall_4());
1060 } 2349 }
1061 this_StringObject_3=ruleStringObject 2350 this_StringLiteral_4=ruleStringLiteral
1062 { 2351 {
1063 $current = $this_StringObject_3.current; 2352 $current = $this_StringLiteral_4.current;
1064 afterParserOrEnumRuleCall(); 2353 afterParserOrEnumRuleCall();
1065 } 2354 }
1066 ) 2355 )
1067; 2356;
1068 2357
1069// Entry rule entryRuleBooleanObject 2358// Entry rule entryRuleLogicLiteral
1070entryRuleBooleanObject returns [EObject current=null]: 2359entryRuleLogicLiteral returns [EObject current=null]:
1071 { newCompositeNode(grammarAccess.getBooleanObjectRule()); } 2360 { newCompositeNode(grammarAccess.getLogicLiteralRule()); }
1072 iv_ruleBooleanObject=ruleBooleanObject 2361 iv_ruleLogicLiteral=ruleLogicLiteral
1073 { $current=$iv_ruleBooleanObject.current; } 2362 { $current=$iv_ruleLogicLiteral.current; }
1074 EOF; 2363 EOF;
1075 2364
1076// Rule BooleanObject 2365// Rule LogicLiteral
1077ruleBooleanObject returns [EObject current=null] 2366ruleLogicLiteral returns [EObject current=null]
1078@init { 2367@init {
1079 enterRule(); 2368 enterRule();
1080} 2369}
@@ -1084,33 +2373,33 @@ ruleBooleanObject returns [EObject current=null]
1084 ( 2373 (
1085 ( 2374 (
1086 { 2375 {
1087 newCompositeNode(grammarAccess.getBooleanObjectAccess().getValueBooleanValueParserRuleCall_0()); 2376 newCompositeNode(grammarAccess.getLogicLiteralAccess().getValueLogicValueEnumRuleCall_0());
1088 } 2377 }
1089 lv_value_0_0=ruleBooleanValue 2378 lv_value_0_0=ruleLogicValue
1090 { 2379 {
1091 if ($current==null) { 2380 if ($current==null) {
1092 $current = createModelElementForParent(grammarAccess.getBooleanObjectRule()); 2381 $current = createModelElementForParent(grammarAccess.getLogicLiteralRule());
1093 } 2382 }
1094 set( 2383 set(
1095 $current, 2384 $current,
1096 "value", 2385 "value",
1097 lv_value_0_0, 2386 lv_value_0_0,
1098 "org.eclipse.viatra.solver.language.SolverLanguage.BooleanValue"); 2387 "org.eclipse.viatra.solver.language.SolverLanguage.LogicValue");
1099 afterParserOrEnumRuleCall(); 2388 afterParserOrEnumRuleCall();
1100 } 2389 }
1101 ) 2390 )
1102 ) 2391 )
1103; 2392;
1104 2393
1105// Entry rule entryRuleIntObject 2394// Entry rule entryRuleNumericLiteral
1106entryRuleIntObject returns [EObject current=null]: 2395entryRuleNumericLiteral returns [EObject current=null]:
1107 { newCompositeNode(grammarAccess.getIntObjectRule()); } 2396 { newCompositeNode(grammarAccess.getNumericLiteralRule()); }
1108 iv_ruleIntObject=ruleIntObject 2397 iv_ruleNumericLiteral=ruleNumericLiteral
1109 { $current=$iv_ruleIntObject.current; } 2398 { $current=$iv_ruleNumericLiteral.current; }
1110 EOF; 2399 EOF;
1111 2400
1112// Rule IntObject 2401// Rule NumericLiteral
1113ruleIntObject returns [EObject current=null] 2402ruleNumericLiteral returns [EObject current=null]
1114@init { 2403@init {
1115 enterRule(); 2404 enterRule();
1116} 2405}
@@ -1120,33 +2409,33 @@ ruleIntObject returns [EObject current=null]
1120 ( 2409 (
1121 ( 2410 (
1122 { 2411 {
1123 newCompositeNode(grammarAccess.getIntObjectAccess().getValueINTLiteralParserRuleCall_0()); 2412 newCompositeNode(grammarAccess.getNumericLiteralAccess().getValueRealParserRuleCall_0());
1124 } 2413 }
1125 lv_value_0_0=ruleINTLiteral 2414 lv_value_0_0=ruleReal
1126 { 2415 {
1127 if ($current==null) { 2416 if ($current==null) {
1128 $current = createModelElementForParent(grammarAccess.getIntObjectRule()); 2417 $current = createModelElementForParent(grammarAccess.getNumericLiteralRule());
1129 } 2418 }
1130 set( 2419 set(
1131 $current, 2420 $current,
1132 "value", 2421 "value",
1133 lv_value_0_0, 2422 lv_value_0_0,
1134 "org.eclipse.viatra.solver.language.SolverLanguage.INTLiteral"); 2423 "org.eclipse.viatra.solver.language.SolverLanguage.Real");
1135 afterParserOrEnumRuleCall(); 2424 afterParserOrEnumRuleCall();
1136 } 2425 }
1137 ) 2426 )
1138 ) 2427 )
1139; 2428;
1140 2429
1141// Entry rule entryRuleRealObject 2430// Entry rule entryRuleInfinityLiteral
1142entryRuleRealObject returns [EObject current=null]: 2431entryRuleInfinityLiteral returns [EObject current=null]:
1143 { newCompositeNode(grammarAccess.getRealObjectRule()); } 2432 { newCompositeNode(grammarAccess.getInfinityLiteralRule()); }
1144 iv_ruleRealObject=ruleRealObject 2433 iv_ruleInfinityLiteral=ruleInfinityLiteral
1145 { $current=$iv_ruleRealObject.current; } 2434 { $current=$iv_ruleInfinityLiteral.current; }
1146 EOF; 2435 EOF;
1147 2436
1148// Rule RealObject 2437// Rule InfinityLiteral
1149ruleRealObject returns [EObject current=null] 2438ruleInfinityLiteral returns [EObject current=null]
1150@init { 2439@init {
1151 enterRule(); 2440 enterRule();
1152} 2441}
@@ -1156,33 +2445,57 @@ ruleRealObject returns [EObject current=null]
1156 ( 2445 (
1157 ( 2446 (
1158 { 2447 {
1159 newCompositeNode(grammarAccess.getRealObjectAccess().getValueREALLiteralParserRuleCall_0()); 2448 $current = forceCreateModelElement(
2449 grammarAccess.getInfinityLiteralAccess().getInfinityLiteralAction_0(),
2450 $current);
1160 } 2451 }
1161 lv_value_0_0=ruleREALLiteral 2452 )
2453 otherlv_1='inf'
2454 {
2455 newLeafNode(otherlv_1, grammarAccess.getInfinityLiteralAccess().getInfKeyword_1());
2456 }
2457 )
2458;
2459
2460// Entry rule entryRuleEmptyIntervalLiteral
2461entryRuleEmptyIntervalLiteral returns [EObject current=null]:
2462 { newCompositeNode(grammarAccess.getEmptyIntervalLiteralRule()); }
2463 iv_ruleEmptyIntervalLiteral=ruleEmptyIntervalLiteral
2464 { $current=$iv_ruleEmptyIntervalLiteral.current; }
2465 EOF;
2466
2467// Rule EmptyIntervalLiteral
2468ruleEmptyIntervalLiteral returns [EObject current=null]
2469@init {
2470 enterRule();
2471}
2472@after {
2473 leaveRule();
2474}:
2475 (
2476 (
1162 { 2477 {
1163 if ($current==null) { 2478 $current = forceCreateModelElement(
1164 $current = createModelElementForParent(grammarAccess.getRealObjectRule()); 2479 grammarAccess.getEmptyIntervalLiteralAccess().getEmptyIntervalLiteralAction_0(),
1165 } 2480 $current);
1166 set(
1167 $current,
1168 "value",
1169 lv_value_0_0,
1170 "org.eclipse.viatra.solver.language.SolverLanguage.REALLiteral");
1171 afterParserOrEnumRuleCall();
1172 } 2481 }
1173 ) 2482 )
2483 otherlv_1='empty'
2484 {
2485 newLeafNode(otherlv_1, grammarAccess.getEmptyIntervalLiteralAccess().getEmptyKeyword_1());
2486 }
1174 ) 2487 )
1175; 2488;
1176 2489
1177// Entry rule entryRuleStringObject 2490// Entry rule entryRuleStringLiteral
1178entryRuleStringObject returns [EObject current=null]: 2491entryRuleStringLiteral returns [EObject current=null]:
1179 { newCompositeNode(grammarAccess.getStringObjectRule()); } 2492 { newCompositeNode(grammarAccess.getStringLiteralRule()); }
1180 iv_ruleStringObject=ruleStringObject 2493 iv_ruleStringLiteral=ruleStringLiteral
1181 { $current=$iv_ruleStringObject.current; } 2494 { $current=$iv_ruleStringLiteral.current; }
1182 EOF; 2495 EOF;
1183 2496
1184// Rule StringObject 2497// Rule StringLiteral
1185ruleStringObject returns [EObject current=null] 2498ruleStringLiteral returns [EObject current=null]
1186@init { 2499@init {
1187 enterRule(); 2500 enterRule();
1188} 2501}
@@ -1193,11 +2506,11 @@ ruleStringObject returns [EObject current=null]
1193 ( 2506 (
1194 lv_value_0_0=RULE_STRING 2507 lv_value_0_0=RULE_STRING
1195 { 2508 {
1196 newLeafNode(lv_value_0_0, grammarAccess.getStringObjectAccess().getValueSTRINGTerminalRuleCall_0()); 2509 newLeafNode(lv_value_0_0, grammarAccess.getStringLiteralAccess().getValueSTRINGTerminalRuleCall_0());
1197 } 2510 }
1198 { 2511 {
1199 if ($current==null) { 2512 if ($current==null) {
1200 $current = createModelElement(grammarAccess.getStringObjectRule()); 2513 $current = createModelElement(grammarAccess.getStringLiteralRule());
1201 } 2514 }
1202 setWithLastConsumed( 2515 setWithLastConsumed(
1203 $current, 2516 $current,
@@ -1209,15 +2522,15 @@ ruleStringObject returns [EObject current=null]
1209 ) 2522 )
1210; 2523;
1211 2524
1212// Entry rule entryRulePredicate 2525// Entry rule entryRuleClassDefinition
1213entryRulePredicate returns [EObject current=null]: 2526entryRuleClassDefinition returns [EObject current=null]:
1214 { newCompositeNode(grammarAccess.getPredicateRule()); } 2527 { newCompositeNode(grammarAccess.getClassDefinitionRule()); }
1215 iv_rulePredicate=rulePredicate 2528 iv_ruleClassDefinition=ruleClassDefinition
1216 { $current=$iv_rulePredicate.current; } 2529 { $current=$iv_ruleClassDefinition.current; }
1217 EOF; 2530 EOF;
1218 2531
1219// Rule Predicate 2532// Rule ClassDefinition
1220rulePredicate returns [EObject current=null] 2533ruleClassDefinition returns [EObject current=null]
1221@init { 2534@init {
1222 enterRule(); 2535 enterRule();
1223} 2536}
@@ -1227,166 +2540,123 @@ rulePredicate returns [EObject current=null]
1227 ( 2540 (
1228 ( 2541 (
1229 ( 2542 (
1230 lv_isError_0_0='error' 2543 lv_abstract_0_0='abstract'
1231 { 2544 {
1232 newLeafNode(lv_isError_0_0, grammarAccess.getPredicateAccess().getIsErrorErrorKeyword_0_0()); 2545 newLeafNode(lv_abstract_0_0, grammarAccess.getClassDefinitionAccess().getAbstractAbstractKeyword_0_0());
1233 } 2546 }
1234 { 2547 {
1235 if ($current==null) { 2548 if ($current==null) {
1236 $current = createModelElement(grammarAccess.getPredicateRule()); 2549 $current = createModelElement(grammarAccess.getClassDefinitionRule());
1237 } 2550 }
1238 setWithLastConsumed($current, "isError", true, "error"); 2551 setWithLastConsumed($current, "abstract", true, "abstract");
1239 } 2552 }
1240 ) 2553 )
1241 )? 2554 )?
2555 otherlv_1='class'
2556 {
2557 newLeafNode(otherlv_1, grammarAccess.getClassDefinitionAccess().getClassKeyword_1());
2558 }
1242 ( 2559 (
1243 ( 2560 (
2561 lv_name_2_0=RULE_ID
1244 { 2562 {
1245 newCompositeNode(grammarAccess.getPredicateAccess().getSymbolModelSymbolParserRuleCall_1_0()); 2563 newLeafNode(lv_name_2_0, grammarAccess.getClassDefinitionAccess().getNameIDTerminalRuleCall_2_0());
1246 } 2564 }
1247 lv_symbol_1_0=ruleModelSymbol
1248 { 2565 {
1249 if ($current==null) { 2566 if ($current==null) {
1250 $current = createModelElementForParent(grammarAccess.getPredicateRule()); 2567 $current = createModelElement(grammarAccess.getClassDefinitionRule());
1251 } 2568 }
1252 set( 2569 setWithLastConsumed(
1253 $current, 2570 $current,
1254 "symbol", 2571 "name",
1255 lv_symbol_1_0, 2572 lv_name_2_0,
1256 "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol"); 2573 "org.eclipse.xtext.common.Terminals.ID");
1257 afterParserOrEnumRuleCall();
1258 } 2574 }
1259 ) 2575 )
1260 ) 2576 )
1261 ( 2577 (
1262 otherlv_2='(' 2578 otherlv_3='extends'
1263 { 2579 {
1264 newLeafNode(otherlv_2, grammarAccess.getPredicateAccess().getLeftParenthesisKeyword_2_0()); 2580 newLeafNode(otherlv_3, grammarAccess.getClassDefinitionAccess().getExtendsKeyword_3_0());
1265 } 2581 }
1266 ( 2582 (
1267 ( 2583 (
1268 ( 2584 {
1269 { 2585 if ($current==null) {
1270 newCompositeNode(grammarAccess.getPredicateAccess().getParametersParameterParserRuleCall_2_1_0_0()); 2586 $current = createModelElement(grammarAccess.getClassDefinitionRule());
1271 }
1272 lv_parameters_3_0=ruleParameter
1273 {
1274 if ($current==null) {
1275 $current = createModelElementForParent(grammarAccess.getPredicateRule());
1276 }
1277 add(
1278 $current,
1279 "parameters",
1280 lv_parameters_3_0,
1281 "org.eclipse.viatra.solver.language.SolverLanguage.Parameter");
1282 afterParserOrEnumRuleCall();
1283 } 2587 }
1284 ) 2588 }
1285 )
1286 (
1287 otherlv_4=','
1288 { 2589 {
1289 newLeafNode(otherlv_4, grammarAccess.getPredicateAccess().getCommaKeyword_2_1_1_0()); 2590 newCompositeNode(grammarAccess.getClassDefinitionAccess().getSuperclassesNamedElementCrossReference_3_1_0());
1290 } 2591 }
1291 ( 2592 ruleQualifiedName
1292 ( 2593 {
1293 { 2594 afterParserOrEnumRuleCall();
1294 newCompositeNode(grammarAccess.getPredicateAccess().getParametersParameterParserRuleCall_2_1_1_1_0()); 2595 }
1295 } 2596 )
1296 lv_parameters_5_0=ruleParameter 2597 )
1297 {
1298 if ($current==null) {
1299 $current = createModelElementForParent(grammarAccess.getPredicateRule());
1300 }
1301 add(
1302 $current,
1303 "parameters",
1304 lv_parameters_5_0,
1305 "org.eclipse.viatra.solver.language.SolverLanguage.Parameter");
1306 afterParserOrEnumRuleCall();
1307 }
1308 )
1309 )
1310 )*
1311 )?
1312 otherlv_6=')'
1313 {
1314 newLeafNode(otherlv_6, grammarAccess.getPredicateAccess().getRightParenthesisKeyword_2_2());
1315 }
1316 )?
1317 otherlv_7=':-'
1318 {
1319 newLeafNode(otherlv_7, grammarAccess.getPredicateAccess().getColonHyphenMinusKeyword_3());
1320 }
1321 (
1322 otherlv_8='false'
1323 {
1324 newLeafNode(otherlv_8, grammarAccess.getPredicateAccess().getFalseKeyword_4_0());
1325 }
1326 |
1327 ( 2598 (
2599 otherlv_5=','
2600 {
2601 newLeafNode(otherlv_5, grammarAccess.getClassDefinitionAccess().getCommaKeyword_3_2_0());
2602 }
1328 ( 2603 (
1329 ( 2604 (
1330 { 2605 {
1331 newCompositeNode(grammarAccess.getPredicateAccess().getBodiesPatternBodyParserRuleCall_4_1_0_0());
1332 }
1333 lv_bodies_9_0=rulePatternBody
1334 {
1335 if ($current==null) { 2606 if ($current==null) {
1336 $current = createModelElementForParent(grammarAccess.getPredicateRule()); 2607 $current = createModelElement(grammarAccess.getClassDefinitionRule());
1337 } 2608 }
1338 add( 2609 }
1339 $current, 2610 {
1340 "bodies", 2611 newCompositeNode(grammarAccess.getClassDefinitionAccess().getSuperclassesNamedElementCrossReference_3_2_1_0());
1341 lv_bodies_9_0, 2612 }
1342 "org.eclipse.viatra.solver.language.SolverLanguage.PatternBody"); 2613 ruleQualifiedName
2614 {
1343 afterParserOrEnumRuleCall(); 2615 afterParserOrEnumRuleCall();
1344 } 2616 }
1345 ) 2617 )
1346 ) 2618 )
1347 ( 2619 )*
1348 otherlv_10='|' 2620 )?
1349 { 2621 otherlv_7='{'
1350 newLeafNode(otherlv_10, grammarAccess.getPredicateAccess().getVerticalLineKeyword_4_1_1_0()); 2622 {
2623 newLeafNode(otherlv_7, grammarAccess.getClassDefinitionAccess().getLeftCurlyBracketKeyword_4());
2624 }
2625 (
2626 (
2627 {
2628 newCompositeNode(grammarAccess.getClassDefinitionAccess().getMembersMemberDefinitionParserRuleCall_5_0());
2629 }
2630 lv_members_8_0=ruleMemberDefinition
2631 {
2632 if ($current==null) {
2633 $current = createModelElementForParent(grammarAccess.getClassDefinitionRule());
1351 } 2634 }
1352 ( 2635 add(
1353 ( 2636 $current,
1354 { 2637 "members",
1355 newCompositeNode(grammarAccess.getPredicateAccess().getBodiesPatternBodyParserRuleCall_4_1_1_1_0()); 2638 lv_members_8_0,
1356 } 2639 "org.eclipse.viatra.solver.language.SolverLanguage.MemberDefinition");
1357 lv_bodies_11_0=rulePatternBody 2640 afterParserOrEnumRuleCall();
1358 { 2641 }
1359 if ($current==null) {
1360 $current = createModelElementForParent(grammarAccess.getPredicateRule());
1361 }
1362 add(
1363 $current,
1364 "bodies",
1365 lv_bodies_11_0,
1366 "org.eclipse.viatra.solver.language.SolverLanguage.PatternBody");
1367 afterParserOrEnumRuleCall();
1368 }
1369 )
1370 )
1371 )*
1372 ) 2642 )
1373 ) 2643 )*
1374 otherlv_12='.' 2644 otherlv_9='}'
1375 { 2645 {
1376 newLeafNode(otherlv_12, grammarAccess.getPredicateAccess().getFullStopKeyword_5()); 2646 newLeafNode(otherlv_9, grammarAccess.getClassDefinitionAccess().getRightCurlyBracketKeyword_6());
1377 } 2647 }
1378 ) 2648 )
1379; 2649;
1380 2650
1381// Entry rule entryRuleParameter 2651// Entry rule entryRuleMemberDefinition
1382entryRuleParameter returns [EObject current=null]: 2652entryRuleMemberDefinition returns [EObject current=null]:
1383 { newCompositeNode(grammarAccess.getParameterRule()); } 2653 { newCompositeNode(grammarAccess.getMemberDefinitionRule()); }
1384 iv_ruleParameter=ruleParameter 2654 iv_ruleMemberDefinition=ruleMemberDefinition
1385 { $current=$iv_ruleParameter.current; } 2655 { $current=$iv_ruleMemberDefinition.current; }
1386 EOF; 2656 EOF;
1387 2657
1388// Rule Parameter 2658// Rule MemberDefinition
1389ruleParameter returns [EObject current=null] 2659ruleMemberDefinition returns [EObject current=null]
1390@init { 2660@init {
1391 enterRule(); 2661 enterRule();
1392} 2662}
@@ -1396,60 +2666,156 @@ ruleParameter returns [EObject current=null]
1396 ( 2666 (
1397 ( 2667 (
1398 ( 2668 (
2669 lv_containment_0_0='contains'
2670 {
2671 newLeafNode(lv_containment_0_0, grammarAccess.getMemberDefinitionAccess().getContainmentContainsKeyword_0_0());
2672 }
1399 { 2673 {
1400 newCompositeNode(grammarAccess.getParameterAccess().getVariableVariableParserRuleCall_0_0()); 2674 if ($current==null) {
2675 $current = createModelElement(grammarAccess.getMemberDefinitionRule());
2676 }
2677 setWithLastConsumed($current, "containment", true, "contains");
1401 } 2678 }
1402 lv_variable_0_0=ruleVariable 2679 )
2680 )?
2681 (
2682 (
1403 { 2683 {
1404 if ($current==null) { 2684 if ($current==null) {
1405 $current = createModelElementForParent(grammarAccess.getParameterRule()); 2685 $current = createModelElement(grammarAccess.getMemberDefinitionRule());
2686 }
2687 }
2688 {
2689 newCompositeNode(grammarAccess.getMemberDefinitionAccess().getTypeNamedElementCrossReference_1_0());
2690 }
2691 ruleQualifiedName
2692 {
2693 afterParserOrEnumRuleCall();
2694 }
2695 )
2696 )
2697 (
2698 (
2699 {
2700 newCompositeNode(grammarAccess.getMemberDefinitionAccess().getMultiplicityMultiplicityParserRuleCall_2_0());
2701 }
2702 lv_multiplicity_2_0=ruleMultiplicity
2703 {
2704 if ($current==null) {
2705 $current = createModelElementForParent(grammarAccess.getMemberDefinitionRule());
1406 } 2706 }
1407 set( 2707 set(
1408 $current, 2708 $current,
1409 "variable", 2709 "multiplicity",
1410 lv_variable_0_0, 2710 lv_multiplicity_2_0,
1411 "org.eclipse.viatra.solver.language.SolverLanguage.Variable"); 2711 "org.eclipse.viatra.solver.language.SolverLanguage.Multiplicity");
1412 afterParserOrEnumRuleCall(); 2712 afterParserOrEnumRuleCall();
1413 } 2713 }
1414 ) 2714 )
2715 )?
2716 (
2717 (
2718 lv_name_3_0=RULE_ID
2719 {
2720 newLeafNode(lv_name_3_0, grammarAccess.getMemberDefinitionAccess().getNameIDTerminalRuleCall_3_0());
2721 }
2722 {
2723 if ($current==null) {
2724 $current = createModelElement(grammarAccess.getMemberDefinitionRule());
2725 }
2726 setWithLastConsumed(
2727 $current,
2728 "name",
2729 lv_name_3_0,
2730 "org.eclipse.xtext.common.Terminals.ID");
2731 }
2732 )
1415 ) 2733 )
1416 ( 2734 (
1417 otherlv_1=':' 2735 otherlv_4='opposite'
1418 { 2736 {
1419 newLeafNode(otherlv_1, grammarAccess.getParameterAccess().getColonKeyword_1_0()); 2737 newLeafNode(otherlv_4, grammarAccess.getMemberDefinitionAccess().getOppositeKeyword_4_0());
1420 } 2738 }
1421 ( 2739 (
1422 ( 2740 (
1423 { 2741 {
1424 newCompositeNode(grammarAccess.getParameterAccess().getTypeSymbolParserRuleCall_1_1_0());
1425 }
1426 lv_type_2_0=ruleSymbol
1427 {
1428 if ($current==null) { 2742 if ($current==null) {
1429 $current = createModelElementForParent(grammarAccess.getParameterRule()); 2743 $current = createModelElement(grammarAccess.getMemberDefinitionRule());
1430 } 2744 }
1431 set( 2745 }
1432 $current, 2746 {
1433 "type", 2747 newCompositeNode(grammarAccess.getMemberDefinitionAccess().getOppositeNamedElementCrossReference_4_1_0());
1434 lv_type_2_0, 2748 }
1435 "org.eclipse.viatra.solver.language.SolverLanguage.Symbol"); 2749 ruleQualifiedName
2750 {
1436 afterParserOrEnumRuleCall(); 2751 afterParserOrEnumRuleCall();
1437 } 2752 }
1438 ) 2753 )
1439 ) 2754 )
1440 )? 2755 )?
2756 (
2757 otherlv_6=';'
2758 {
2759 newLeafNode(otherlv_6, grammarAccess.getMemberDefinitionAccess().getSemicolonKeyword_5());
2760 }
2761 )?
1441 ) 2762 )
1442; 2763;
1443 2764
1444// Entry rule entryRulePatternBody 2765// Entry rule entryRuleMultiplicity
1445entryRulePatternBody returns [EObject current=null]: 2766entryRuleMultiplicity returns [EObject current=null]:
1446 { newCompositeNode(grammarAccess.getPatternBodyRule()); } 2767 { newCompositeNode(grammarAccess.getMultiplicityRule()); }
1447 iv_rulePatternBody=rulePatternBody 2768 iv_ruleMultiplicity=ruleMultiplicity
1448 { $current=$iv_rulePatternBody.current; } 2769 { $current=$iv_ruleMultiplicity.current; }
1449 EOF; 2770 EOF;
1450 2771
1451// Rule PatternBody 2772// Rule Multiplicity
1452rulePatternBody returns [EObject current=null] 2773ruleMultiplicity returns [EObject current=null]
2774@init {
2775 enterRule();
2776}
2777@after {
2778 leaveRule();
2779}:
2780 (
2781 {
2782 newCompositeNode(grammarAccess.getMultiplicityAccess().getManyMultiplicityParserRuleCall_0());
2783 }
2784 this_ManyMultiplicity_0=ruleManyMultiplicity
2785 {
2786 $current = $this_ManyMultiplicity_0.current;
2787 afterParserOrEnumRuleCall();
2788 }
2789 |
2790 {
2791 newCompositeNode(grammarAccess.getMultiplicityAccess().getExactMultiplicityParserRuleCall_1());
2792 }
2793 this_ExactMultiplicity_1=ruleExactMultiplicity
2794 {
2795 $current = $this_ExactMultiplicity_1.current;
2796 afterParserOrEnumRuleCall();
2797 }
2798 |
2799 {
2800 newCompositeNode(grammarAccess.getMultiplicityAccess().getBoundedMultiplicityParserRuleCall_2());
2801 }
2802 this_BoundedMultiplicity_2=ruleBoundedMultiplicity
2803 {
2804 $current = $this_BoundedMultiplicity_2.current;
2805 afterParserOrEnumRuleCall();
2806 }
2807 )
2808;
2809
2810// Entry rule entryRuleManyMultiplicity
2811entryRuleManyMultiplicity returns [EObject current=null]:
2812 { newCompositeNode(grammarAccess.getManyMultiplicityRule()); }
2813 iv_ruleManyMultiplicity=ruleManyMultiplicity
2814 { $current=$iv_ruleManyMultiplicity.current; }
2815 EOF;
2816
2817// Rule ManyMultiplicity
2818ruleManyMultiplicity returns [EObject current=null]
1453@init { 2819@init {
1454 enterRule(); 2820 enterRule();
1455} 2821}
@@ -1460,48 +2826,76 @@ rulePatternBody returns [EObject current=null]
1460 ( 2826 (
1461 { 2827 {
1462 $current = forceCreateModelElement( 2828 $current = forceCreateModelElement(
1463 grammarAccess.getPatternBodyAccess().getPatternBodyAction_0(), 2829 grammarAccess.getManyMultiplicityAccess().getManyMultiplicityAction_0(),
1464 $current); 2830 $current);
1465 } 2831 }
1466 ) 2832 )
2833 otherlv_1='['
2834 {
2835 newLeafNode(otherlv_1, grammarAccess.getManyMultiplicityAccess().getLeftSquareBracketKeyword_1());
2836 }
2837 otherlv_2=']'
2838 {
2839 newLeafNode(otherlv_2, grammarAccess.getManyMultiplicityAccess().getRightSquareBracketKeyword_2());
2840 }
2841 )
2842;
2843
2844// Entry rule entryRuleExactMultiplicity
2845entryRuleExactMultiplicity returns [EObject current=null]:
2846 { newCompositeNode(grammarAccess.getExactMultiplicityRule()); }
2847 iv_ruleExactMultiplicity=ruleExactMultiplicity
2848 { $current=$iv_ruleExactMultiplicity.current; }
2849 EOF;
2850
2851// Rule ExactMultiplicity
2852ruleExactMultiplicity returns [EObject current=null]
2853@init {
2854 enterRule();
2855}
2856@after {
2857 leaveRule();
2858}:
2859 (
2860 otherlv_0='['
2861 {
2862 newLeafNode(otherlv_0, grammarAccess.getExactMultiplicityAccess().getLeftSquareBracketKeyword_0());
2863 }
1467 ( 2864 (
1468 otherlv_1='true'
1469 {
1470 newLeafNode(otherlv_1, grammarAccess.getPatternBodyAccess().getTrueKeyword_1_0());
1471 }
1472 |
1473 ( 2865 (
1474 ( 2866 {
1475 { 2867 newCompositeNode(grammarAccess.getExactMultiplicityAccess().getMultiplicityUpperMultiplictyParserRuleCall_1_0());
1476 newCompositeNode(grammarAccess.getPatternBodyAccess().getConstraintsConstraintParserRuleCall_1_1_0()); 2868 }
1477 } 2869 lv_multiplicity_1_0=ruleUpperMultiplicty
1478 lv_constraints_2_0=ruleConstraint 2870 {
1479 { 2871 if ($current==null) {
1480 if ($current==null) { 2872 $current = createModelElementForParent(grammarAccess.getExactMultiplicityRule());
1481 $current = createModelElementForParent(grammarAccess.getPatternBodyRule());
1482 }
1483 add(
1484 $current,
1485 "constraints",
1486 lv_constraints_2_0,
1487 "org.eclipse.viatra.solver.language.SolverLanguage.Constraint");
1488 afterParserOrEnumRuleCall();
1489 } 2873 }
1490 ) 2874 set(
1491 )* 2875 $current,
2876 "multiplicity",
2877 lv_multiplicity_1_0,
2878 "org.eclipse.viatra.solver.language.SolverLanguage.UpperMultiplicty");
2879 afterParserOrEnumRuleCall();
2880 }
2881 )
1492 ) 2882 )
2883 otherlv_2=']'
2884 {
2885 newLeafNode(otherlv_2, grammarAccess.getExactMultiplicityAccess().getRightSquareBracketKeyword_2());
2886 }
1493 ) 2887 )
1494; 2888;
1495 2889
1496// Entry rule entryRulePolarity 2890// Entry rule entryRuleBoundedMultiplicity
1497entryRulePolarity returns [EObject current=null]: 2891entryRuleBoundedMultiplicity returns [EObject current=null]:
1498 { newCompositeNode(grammarAccess.getPolarityRule()); } 2892 { newCompositeNode(grammarAccess.getBoundedMultiplicityRule()); }
1499 iv_rulePolarity=rulePolarity 2893 iv_ruleBoundedMultiplicity=ruleBoundedMultiplicity
1500 { $current=$iv_rulePolarity.current; } 2894 { $current=$iv_ruleBoundedMultiplicity.current; }
1501 EOF; 2895 EOF;
1502 2896
1503// Rule Polarity 2897// Rule BoundedMultiplicity
1504rulePolarity returns [EObject current=null] 2898ruleBoundedMultiplicity returns [EObject current=null]
1505@init { 2899@init {
1506 enterRule(); 2900 enterRule();
1507} 2901}
@@ -1509,45 +2903,173 @@ rulePolarity returns [EObject current=null]
1509 leaveRule(); 2903 leaveRule();
1510}: 2904}:
1511 ( 2905 (
2906 otherlv_0='['
2907 {
2908 newLeafNode(otherlv_0, grammarAccess.getBoundedMultiplicityAccess().getLeftSquareBracketKeyword_0());
2909 }
1512 ( 2910 (
1513 ( 2911 (
2912 lv_lowerBound_1_0=RULE_INT
1514 { 2913 {
1515 $current = forceCreateModelElement( 2914 newLeafNode(lv_lowerBound_1_0, grammarAccess.getBoundedMultiplicityAccess().getLowerBoundINTTerminalRuleCall_1_0());
1516 grammarAccess.getPolarityAccess().getPositiveAction_0_0(), 2915 }
1517 $current); 2916 {
2917 if ($current==null) {
2918 $current = createModelElement(grammarAccess.getBoundedMultiplicityRule());
2919 }
2920 setWithLastConsumed(
2921 $current,
2922 "lowerBound",
2923 lv_lowerBound_1_0,
2924 "org.eclipse.xtext.common.Terminals.INT");
1518 } 2925 }
1519 ) 2926 )
1520 otherlv_1='+'
1521 {
1522 newLeafNode(otherlv_1, grammarAccess.getPolarityAccess().getPlusSignKeyword_0_1());
1523 }
1524 ) 2927 )
2928 otherlv_2='..'
2929 {
2930 newLeafNode(otherlv_2, grammarAccess.getBoundedMultiplicityAccess().getFullStopFullStopKeyword_2());
2931 }
2932 (
2933 (
2934 {
2935 newCompositeNode(grammarAccess.getBoundedMultiplicityAccess().getUpperBoundUpperMultiplictyParserRuleCall_3_0());
2936 }
2937 lv_upperBound_3_0=ruleUpperMultiplicty
2938 {
2939 if ($current==null) {
2940 $current = createModelElementForParent(grammarAccess.getBoundedMultiplicityRule());
2941 }
2942 set(
2943 $current,
2944 "upperBound",
2945 lv_upperBound_3_0,
2946 "org.eclipse.viatra.solver.language.SolverLanguage.UpperMultiplicty");
2947 afterParserOrEnumRuleCall();
2948 }
2949 )
2950 )
2951 otherlv_4=']'
2952 {
2953 newLeafNode(otherlv_4, grammarAccess.getBoundedMultiplicityAccess().getRightSquareBracketKeyword_4());
2954 }
2955 )
2956;
2957
2958// Entry rule entryRuleScopeDefinition
2959entryRuleScopeDefinition returns [EObject current=null]:
2960 { newCompositeNode(grammarAccess.getScopeDefinitionRule()); }
2961 iv_ruleScopeDefinition=ruleScopeDefinition
2962 { $current=$iv_ruleScopeDefinition.current; }
2963 EOF;
2964
2965// Rule ScopeDefinition
2966ruleScopeDefinition returns [EObject current=null]
2967@init {
2968 enterRule();
2969}
2970@after {
2971 leaveRule();
2972}:
2973 (
2974 {
2975 newCompositeNode(grammarAccess.getScopeDefinitionAccess().getExactScopeDefinitionParserRuleCall_0());
2976 }
2977 this_ExactScopeDefinition_0=ruleExactScopeDefinition
2978 {
2979 $current = $this_ExactScopeDefinition_0.current;
2980 afterParserOrEnumRuleCall();
2981 }
2982 |
2983 {
2984 newCompositeNode(grammarAccess.getScopeDefinitionAccess().getBoundedScopeDefinitionParserRuleCall_1());
2985 }
2986 this_BoundedScopeDefinition_1=ruleBoundedScopeDefinition
2987 {
2988 $current = $this_BoundedScopeDefinition_1.current;
2989 afterParserOrEnumRuleCall();
2990 }
1525 | 2991 |
2992 {
2993 newCompositeNode(grammarAccess.getScopeDefinitionAccess().getLowerBoundedScopeDefinitionParserRuleCall_2());
2994 }
2995 this_LowerBoundedScopeDefinition_2=ruleLowerBoundedScopeDefinition
2996 {
2997 $current = $this_LowerBoundedScopeDefinition_2.current;
2998 afterParserOrEnumRuleCall();
2999 }
3000 )
3001;
3002
3003// Entry rule entryRuleExactScopeDefinition
3004entryRuleExactScopeDefinition returns [EObject current=null]:
3005 { newCompositeNode(grammarAccess.getExactScopeDefinitionRule()); }
3006 iv_ruleExactScopeDefinition=ruleExactScopeDefinition
3007 { $current=$iv_ruleExactScopeDefinition.current; }
3008 EOF;
3009
3010// Rule ExactScopeDefinition
3011ruleExactScopeDefinition returns [EObject current=null]
3012@init {
3013 enterRule();
3014}
3015@after {
3016 leaveRule();
3017}:
3018 (
3019 otherlv_0='scope'
3020 {
3021 newLeafNode(otherlv_0, grammarAccess.getExactScopeDefinitionAccess().getScopeKeyword_0());
3022 }
1526 ( 3023 (
1527 ( 3024 (
1528 { 3025 {
1529 $current = forceCreateModelElement( 3026 if ($current==null) {
1530 grammarAccess.getPolarityAccess().getNegativeAction_1_0(), 3027 $current = createModelElement(grammarAccess.getExactScopeDefinitionRule());
1531 $current); 3028 }
3029 }
3030 {
3031 newCompositeNode(grammarAccess.getExactScopeDefinitionAccess().getTypeNamedElementCrossReference_1_0());
3032 }
3033 ruleQualifiedName
3034 {
3035 afterParserOrEnumRuleCall();
3036 }
3037 )
3038 )
3039 otherlv_2='=='
3040 {
3041 newLeafNode(otherlv_2, grammarAccess.getExactScopeDefinitionAccess().getEqualsSignEqualsSignKeyword_2());
3042 }
3043 (
3044 (
3045 lv_exactScope_3_0=RULE_INT
3046 {
3047 newLeafNode(lv_exactScope_3_0, grammarAccess.getExactScopeDefinitionAccess().getExactScopeINTTerminalRuleCall_3_0());
3048 }
3049 {
3050 if ($current==null) {
3051 $current = createModelElement(grammarAccess.getExactScopeDefinitionRule());
3052 }
3053 setWithLastConsumed(
3054 $current,
3055 "exactScope",
3056 lv_exactScope_3_0,
3057 "org.eclipse.xtext.common.Terminals.INT");
1532 } 3058 }
1533 ) 3059 )
1534 otherlv_3='-'
1535 {
1536 newLeafNode(otherlv_3, grammarAccess.getPolarityAccess().getHyphenMinusKeyword_1_1());
1537 }
1538 ) 3060 )
1539 ) 3061 )
1540; 3062;
1541 3063
1542// Entry rule entryRuleConstraint 3064// Entry rule entryRuleBoundedScopeDefinition
1543entryRuleConstraint returns [EObject current=null]: 3065entryRuleBoundedScopeDefinition returns [EObject current=null]:
1544 { newCompositeNode(grammarAccess.getConstraintRule()); } 3066 { newCompositeNode(grammarAccess.getBoundedScopeDefinitionRule()); }
1545 iv_ruleConstraint=ruleConstraint 3067 iv_ruleBoundedScopeDefinition=ruleBoundedScopeDefinition
1546 { $current=$iv_ruleConstraint.current; } 3068 { $current=$iv_ruleBoundedScopeDefinition.current; }
1547 EOF; 3069 EOF;
1548 3070
1549// Rule Constraint 3071// Rule BoundedScopeDefinition
1550ruleConstraint returns [EObject current=null] 3072ruleBoundedScopeDefinition returns [EObject current=null]
1551@init { 3073@init {
1552 enterRule(); 3074 enterRule();
1553} 3075}
@@ -1555,186 +3077,267 @@ ruleConstraint returns [EObject current=null]
1555 leaveRule(); 3077 leaveRule();
1556}: 3078}:
1557 ( 3079 (
3080 otherlv_0='scope'
3081 {
3082 newLeafNode(otherlv_0, grammarAccess.getBoundedScopeDefinitionAccess().getScopeKeyword_0());
3083 }
1558 ( 3084 (
1559 ( 3085 (
1560 ( 3086 (
3087 (
3088 (
3089 lv_lowerBound_1_0=RULE_INT
3090 {
3091 newLeafNode(lv_lowerBound_1_0, grammarAccess.getBoundedScopeDefinitionAccess().getLowerBoundINTTerminalRuleCall_1_0_0_0_0());
3092 }
3093 {
3094 if ($current==null) {
3095 $current = createModelElement(grammarAccess.getBoundedScopeDefinitionRule());
3096 }
3097 setWithLastConsumed(
3098 $current,
3099 "lowerBound",
3100 lv_lowerBound_1_0,
3101 "org.eclipse.xtext.common.Terminals.INT");
3102 }
3103 )
3104 )
3105 otherlv_2='<='
1561 { 3106 {
1562 newCompositeNode(grammarAccess.getConstraintAccess().getPolarityPolarityParserRuleCall_0_0_0()); 3107 newLeafNode(otherlv_2, grammarAccess.getBoundedScopeDefinitionAccess().getLessThanSignEqualsSignKeyword_1_0_0_1());
1563 } 3108 }
1564 lv_polarity_0_0=rulePolarity 3109 )?
1565 { 3110 (
1566 if ($current==null) { 3111 (
1567 $current = createModelElementForParent(grammarAccess.getConstraintRule()); 3112 {
3113 if ($current==null) {
3114 $current = createModelElement(grammarAccess.getBoundedScopeDefinitionRule());
3115 }
1568 } 3116 }
1569 set( 3117 {
1570 $current, 3118 newCompositeNode(grammarAccess.getBoundedScopeDefinitionAccess().getTypeNamedElementCrossReference_1_0_1_0());
1571 "polarity", 3119 }
1572 lv_polarity_0_0, 3120 ruleQualifiedName
1573 "org.eclipse.viatra.solver.language.SolverLanguage.Polarity"); 3121 {
1574 afterParserOrEnumRuleCall(); 3122 afterParserOrEnumRuleCall();
1575 } 3123 }
3124 )
1576 ) 3125 )
1577 )? 3126 otherlv_4='<='
1578 ( 3127 {
3128 newLeafNode(otherlv_4, grammarAccess.getBoundedScopeDefinitionAccess().getLessThanSignEqualsSignKeyword_1_0_2());
3129 }
1579 ( 3130 (
1580 { 3131 (
1581 newCompositeNode(grammarAccess.getConstraintAccess().getSymbolModelSymbolParserRuleCall_0_1_0()); 3132 lv_upperBound_5_0=RULE_INT
1582 } 3133 {
1583 lv_symbol_1_0=ruleModelSymbol 3134 newLeafNode(lv_upperBound_5_0, grammarAccess.getBoundedScopeDefinitionAccess().getUpperBoundINTTerminalRuleCall_1_0_3_0());
1584 {
1585 if ($current==null) {
1586 $current = createModelElementForParent(grammarAccess.getConstraintRule());
1587 } 3135 }
1588 set( 3136 {
1589 $current, 3137 if ($current==null) {
1590 "symbol", 3138 $current = createModelElement(grammarAccess.getBoundedScopeDefinitionRule());
1591 lv_symbol_1_0, 3139 }
1592 "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol"); 3140 setWithLastConsumed(
1593 afterParserOrEnumRuleCall(); 3141 $current,
1594 } 3142 "upperBound",
3143 lv_upperBound_5_0,
3144 "org.eclipse.xtext.common.Terminals.INT");
3145 }
3146 )
1595 ) 3147 )
1596 ) 3148 )
3149 |
1597 ( 3150 (
1598 otherlv_2='('
1599 {
1600 newLeafNode(otherlv_2, grammarAccess.getConstraintAccess().getLeftParenthesisKeyword_0_2_0());
1601 }
1602 ( 3151 (
1603 ( 3152 (
3153 lv_upperBound_6_0=RULE_INT
1604 { 3154 {
1605 newCompositeNode(grammarAccess.getConstraintAccess().getParamsLiteralParserRuleCall_0_2_1_0()); 3155 newLeafNode(lv_upperBound_6_0, grammarAccess.getBoundedScopeDefinitionAccess().getUpperBoundINTTerminalRuleCall_1_1_0_0());
1606 } 3156 }
1607 lv_params_3_0=ruleLiteral
1608 { 3157 {
1609 if ($current==null) { 3158 if ($current==null) {
1610 $current = createModelElementForParent(grammarAccess.getConstraintRule()); 3159 $current = createModelElement(grammarAccess.getBoundedScopeDefinitionRule());
1611 } 3160 }
1612 add( 3161 setWithLastConsumed(
1613 $current, 3162 $current,
1614 "params", 3163 "upperBound",
1615 lv_params_3_0, 3164 lv_upperBound_6_0,
1616 "org.eclipse.viatra.solver.language.SolverLanguage.Literal"); 3165 "org.eclipse.xtext.common.Terminals.INT");
3166 }
3167 )
3168 )
3169 otherlv_7='>='
3170 {
3171 newLeafNode(otherlv_7, grammarAccess.getBoundedScopeDefinitionAccess().getGreaterThanSignEqualsSignKeyword_1_1_1());
3172 }
3173 (
3174 (
3175 {
3176 if ($current==null) {
3177 $current = createModelElement(grammarAccess.getBoundedScopeDefinitionRule());
3178 }
3179 }
3180 {
3181 newCompositeNode(grammarAccess.getBoundedScopeDefinitionAccess().getTypeNamedElementCrossReference_1_1_2_0());
3182 }
3183 ruleQualifiedName
3184 {
1617 afterParserOrEnumRuleCall(); 3185 afterParserOrEnumRuleCall();
1618 } 3186 }
1619 ) 3187 )
1620 )? 3188 )
1621 ( 3189 (
1622 otherlv_4=',' 3190 otherlv_9='>='
1623 { 3191 {
1624 newLeafNode(otherlv_4, grammarAccess.getConstraintAccess().getCommaKeyword_0_2_2_0()); 3192 newLeafNode(otherlv_9, grammarAccess.getBoundedScopeDefinitionAccess().getGreaterThanSignEqualsSignKeyword_1_1_3_0());
1625 } 3193 }
1626 ( 3194 (
1627 ( 3195 (
3196 lv_lowerBound_10_0=RULE_INT
1628 { 3197 {
1629 newCompositeNode(grammarAccess.getConstraintAccess().getParamsLiteralParserRuleCall_0_2_2_1_0()); 3198 newLeafNode(lv_lowerBound_10_0, grammarAccess.getBoundedScopeDefinitionAccess().getLowerBoundINTTerminalRuleCall_1_1_3_1_0());
1630 } 3199 }
1631 lv_params_5_0=ruleLiteral
1632 { 3200 {
1633 if ($current==null) { 3201 if ($current==null) {
1634 $current = createModelElementForParent(grammarAccess.getConstraintRule()); 3202 $current = createModelElement(grammarAccess.getBoundedScopeDefinitionRule());
1635 } 3203 }
1636 add( 3204 setWithLastConsumed(
1637 $current, 3205 $current,
1638 "params", 3206 "lowerBound",
1639 lv_params_5_0, 3207 lv_lowerBound_10_0,
1640 "org.eclipse.viatra.solver.language.SolverLanguage.Literal"); 3208 "org.eclipse.xtext.common.Terminals.INT");
1641 afterParserOrEnumRuleCall();
1642 } 3209 }
1643 ) 3210 )
1644 ) 3211 )
1645 )* 3212 )?
1646 otherlv_6=')' 3213 )
1647 {
1648 newLeafNode(otherlv_6, grammarAccess.getConstraintAccess().getRightParenthesisKeyword_0_2_3());
1649 }
1650 )?
1651 ) 3214 )
1652 | 3215 otherlv_11='.'
3216 {
3217 newLeafNode(otherlv_11, grammarAccess.getBoundedScopeDefinitionAccess().getFullStopKeyword_2());
3218 }
3219 )
3220;
3221
3222// Entry rule entryRuleLowerBoundedScopeDefinition
3223entryRuleLowerBoundedScopeDefinition returns [EObject current=null]:
3224 { newCompositeNode(grammarAccess.getLowerBoundedScopeDefinitionRule()); }
3225 iv_ruleLowerBoundedScopeDefinition=ruleLowerBoundedScopeDefinition
3226 { $current=$iv_ruleLowerBoundedScopeDefinition.current; }
3227 EOF;
3228
3229// Rule LowerBoundedScopeDefinition
3230ruleLowerBoundedScopeDefinition returns [EObject current=null]
3231@init {
3232 enterRule();
3233}
3234@after {
3235 leaveRule();
3236}:
3237 (
3238 otherlv_0='scope'
3239 {
3240 newLeafNode(otherlv_0, grammarAccess.getLowerBoundedScopeDefinitionAccess().getScopeKeyword_0());
3241 }
1653 ( 3242 (
1654 ( 3243 (
1655 ( 3244 (
1656 { 3245 (
1657 newCompositeNode(grammarAccess.getConstraintAccess().getClosureTypeClosureTypeParserRuleCall_1_0_0()); 3246 lv_lowerBound_1_0=RULE_INT
1658 } 3247 {
1659 lv_closureType_7_0=ruleClosureType 3248 newLeafNode(lv_lowerBound_1_0, grammarAccess.getLowerBoundedScopeDefinitionAccess().getLowerBoundINTTerminalRuleCall_1_0_0_0());
1660 {
1661 if ($current==null) {
1662 $current = createModelElementForParent(grammarAccess.getConstraintRule());
1663 } 3249 }
1664 set( 3250 {
1665 $current, 3251 if ($current==null) {
1666 "closureType", 3252 $current = createModelElement(grammarAccess.getLowerBoundedScopeDefinitionRule());
1667 lv_closureType_7_0, 3253 }
1668 "org.eclipse.viatra.solver.language.SolverLanguage.ClosureType"); 3254 setWithLastConsumed(
1669 afterParserOrEnumRuleCall(); 3255 $current,
1670 } 3256 "lowerBound",
3257 lv_lowerBound_1_0,
3258 "org.eclipse.xtext.common.Terminals.INT");
3259 }
3260 )
3261 )
3262 otherlv_2='<='
3263 {
3264 newLeafNode(otherlv_2, grammarAccess.getLowerBoundedScopeDefinitionAccess().getLessThanSignEqualsSignKeyword_1_0_1());
3265 }
3266 (
3267 (
3268 {
3269 if ($current==null) {
3270 $current = createModelElement(grammarAccess.getLowerBoundedScopeDefinitionRule());
3271 }
3272 }
3273 {
3274 newCompositeNode(grammarAccess.getLowerBoundedScopeDefinitionAccess().getTypeNamedElementCrossReference_1_0_2_0());
3275 }
3276 ruleQualifiedName
3277 {
3278 afterParserOrEnumRuleCall();
3279 }
3280 )
1671 ) 3281 )
1672 ) 3282 )
1673 otherlv_8='(' 3283 |
1674 {
1675 newLeafNode(otherlv_8, grammarAccess.getConstraintAccess().getLeftParenthesisKeyword_1_1());
1676 }
1677 ( 3284 (
1678 ( 3285 (
1679 { 3286 (
1680 newCompositeNode(grammarAccess.getConstraintAccess().getParamsLiteralParserRuleCall_1_2_0()); 3287 {
1681 } 3288 if ($current==null) {
1682 lv_params_9_0=ruleLiteral 3289 $current = createModelElement(grammarAccess.getLowerBoundedScopeDefinitionRule());
1683 { 3290 }
1684 if ($current==null) {
1685 $current = createModelElementForParent(grammarAccess.getConstraintRule());
1686 } 3291 }
1687 add( 3292 {
1688 $current, 3293 newCompositeNode(grammarAccess.getLowerBoundedScopeDefinitionAccess().getTypeNamedElementCrossReference_1_1_0_0());
1689 "params", 3294 }
1690 lv_params_9_0, 3295 ruleQualifiedName
1691 "org.eclipse.viatra.solver.language.SolverLanguage.Literal"); 3296 {
1692 afterParserOrEnumRuleCall(); 3297 afterParserOrEnumRuleCall();
1693 } 3298 }
3299 )
1694 ) 3300 )
1695 )? 3301 otherlv_5='>='
1696 (
1697 otherlv_10=','
1698 { 3302 {
1699 newLeafNode(otherlv_10, grammarAccess.getConstraintAccess().getCommaKeyword_1_3_0()); 3303 newLeafNode(otherlv_5, grammarAccess.getLowerBoundedScopeDefinitionAccess().getGreaterThanSignEqualsSignKeyword_1_1_1());
1700 } 3304 }
1701 ( 3305 (
1702 ( 3306 (
3307 lv_lowerBound_6_0=RULE_INT
1703 { 3308 {
1704 newCompositeNode(grammarAccess.getConstraintAccess().getParamsLiteralParserRuleCall_1_3_1_0()); 3309 newLeafNode(lv_lowerBound_6_0, grammarAccess.getLowerBoundedScopeDefinitionAccess().getLowerBoundINTTerminalRuleCall_1_1_2_0());
1705 } 3310 }
1706 lv_params_11_0=ruleLiteral
1707 { 3311 {
1708 if ($current==null) { 3312 if ($current==null) {
1709 $current = createModelElementForParent(grammarAccess.getConstraintRule()); 3313 $current = createModelElement(grammarAccess.getLowerBoundedScopeDefinitionRule());
1710 } 3314 }
1711 add( 3315 setWithLastConsumed(
1712 $current, 3316 $current,
1713 "params", 3317 "lowerBound",
1714 lv_params_11_0, 3318 lv_lowerBound_6_0,
1715 "org.eclipse.viatra.solver.language.SolverLanguage.Literal"); 3319 "org.eclipse.xtext.common.Terminals.INT");
1716 afterParserOrEnumRuleCall();
1717 } 3320 }
1718 ) 3321 )
1719 ) 3322 )
1720 )* 3323 )
1721 otherlv_12=')'
1722 {
1723 newLeafNode(otherlv_12, grammarAccess.getConstraintAccess().getRightParenthesisKeyword_1_4());
1724 }
1725 ) 3324 )
3325 otherlv_7='.'
3326 {
3327 newLeafNode(otherlv_7, grammarAccess.getLowerBoundedScopeDefinitionAccess().getFullStopKeyword_2());
3328 }
1726 ) 3329 )
1727; 3330;
1728 3331
1729// Entry rule entryRuleClosureType 3332// Entry rule entryRuleObjectiveDefinition
1730entryRuleClosureType returns [EObject current=null]: 3333entryRuleObjectiveDefinition returns [EObject current=null]:
1731 { newCompositeNode(grammarAccess.getClosureTypeRule()); } 3334 { newCompositeNode(grammarAccess.getObjectiveDefinitionRule()); }
1732 iv_ruleClosureType=ruleClosureType 3335 iv_ruleObjectiveDefinition=ruleObjectiveDefinition
1733 { $current=$iv_ruleClosureType.current; } 3336 { $current=$iv_ruleObjectiveDefinition.current; }
1734 EOF; 3337 EOF;
1735 3338
1736// Rule ClosureType 3339// Rule ObjectiveDefinition
1737ruleClosureType returns [EObject current=null] 3340ruleObjectiveDefinition returns [EObject current=null]
1738@init { 3341@init {
1739 enterRule(); 3342 enterRule();
1740} 3343}
@@ -1745,42 +3348,53 @@ ruleClosureType returns [EObject current=null]
1745 ( 3348 (
1746 ( 3349 (
1747 { 3350 {
1748 $current = forceCreateModelElement( 3351 newCompositeNode(grammarAccess.getObjectiveDefinitionAccess().getKindObjectiveKindEnumRuleCall_0_0());
1749 grammarAccess.getClosureTypeAccess().getReflexiveClosureAction_0_0(), 3352 }
1750 $current); 3353 lv_kind_0_0=ruleObjectiveKind
3354 {
3355 if ($current==null) {
3356 $current = createModelElementForParent(grammarAccess.getObjectiveDefinitionRule());
3357 }
3358 set(
3359 $current,
3360 "kind",
3361 lv_kind_0_0,
3362 "org.eclipse.viatra.solver.language.SolverLanguage.ObjectiveKind");
3363 afterParserOrEnumRuleCall();
1751 } 3364 }
1752 ) 3365 )
1753 otherlv_1='*'
1754 {
1755 newLeafNode(otherlv_1, grammarAccess.getClosureTypeAccess().getAsteriskKeyword_0_1());
1756 }
1757 ) 3366 )
1758 |
1759 ( 3367 (
1760 ( 3368 (
1761 { 3369 {
1762 $current = forceCreateModelElement( 3370 newCompositeNode(grammarAccess.getObjectiveDefinitionAccess().getObjectiveExpressionParserRuleCall_1_0());
1763 grammarAccess.getClosureTypeAccess().getIrreflexiveClosureAction_1_0(), 3371 }
1764 $current); 3372 lv_objective_1_0=ruleExpression
3373 {
3374 if ($current==null) {
3375 $current = createModelElementForParent(grammarAccess.getObjectiveDefinitionRule());
3376 }
3377 set(
3378 $current,
3379 "objective",
3380 lv_objective_1_0,
3381 "org.eclipse.viatra.solver.language.SolverLanguage.Expression");
3382 afterParserOrEnumRuleCall();
1765 } 3383 }
1766 ) 3384 )
1767 otherlv_3='+'
1768 {
1769 newLeafNode(otherlv_3, grammarAccess.getClosureTypeAccess().getPlusSignKeyword_1_1());
1770 }
1771 ) 3385 )
1772 ) 3386 )
1773; 3387;
1774 3388
1775// Entry rule entryRuleLiteral 3389// Entry rule entryRuleUpperMultiplicty
1776entryRuleLiteral returns [EObject current=null]: 3390entryRuleUpperMultiplicty returns [String current=null]:
1777 { newCompositeNode(grammarAccess.getLiteralRule()); } 3391 { newCompositeNode(grammarAccess.getUpperMultiplictyRule()); }
1778 iv_ruleLiteral=ruleLiteral 3392 iv_ruleUpperMultiplicty=ruleUpperMultiplicty
1779 { $current=$iv_ruleLiteral.current; } 3393 { $current=$iv_ruleUpperMultiplicty.current.getText(); }
1780 EOF; 3394 EOF;
1781 3395
1782// Rule Literal 3396// Rule UpperMultiplicty
1783ruleLiteral returns [EObject current=null] 3397ruleUpperMultiplicty returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
1784@init { 3398@init {
1785 enterRule(); 3399 enterRule();
1786} 3400}
@@ -1788,121 +3402,132 @@ ruleLiteral returns [EObject current=null]
1788 leaveRule(); 3402 leaveRule();
1789}: 3403}:
1790 ( 3404 (
3405 this_INT_0=RULE_INT
1791 { 3406 {
1792 newCompositeNode(grammarAccess.getLiteralAccess().getVariableParserRuleCall_0()); 3407 $current.merge(this_INT_0);
1793 } 3408 }
1794 this_Variable_0=ruleVariable
1795 { 3409 {
1796 $current = $this_Variable_0.current; 3410 newLeafNode(this_INT_0, grammarAccess.getUpperMultiplictyAccess().getINTTerminalRuleCall_0());
1797 afterParserOrEnumRuleCall();
1798 } 3411 }
1799 | 3412 |
3413 kw='*'
1800 { 3414 {
1801 newCompositeNode(grammarAccess.getLiteralAccess().getDataObjectParserRuleCall_1()); 3415 $current.merge(kw);
1802 } 3416 newLeafNode(kw, grammarAccess.getUpperMultiplictyAccess().getAsteriskKeyword_1());
1803 this_DataObject_1=ruleDataObject
1804 {
1805 $current = $this_DataObject_1.current;
1806 afterParserOrEnumRuleCall();
1807 }
1808 |
1809 {
1810 newCompositeNode(grammarAccess.getLiteralAccess().getNamedObjectParserRuleCall_2());
1811 }
1812 this_NamedObject_2=ruleNamedObject
1813 {
1814 $current = $this_NamedObject_2.current;
1815 afterParserOrEnumRuleCall();
1816 } 3417 }
1817 ) 3418 )
1818; 3419;
1819 3420
1820// Entry rule entryRuleVariable 3421// Entry rule entryRuleReal
1821entryRuleVariable returns [EObject current=null]: 3422entryRuleReal returns [String current=null]@init {
1822 { newCompositeNode(grammarAccess.getVariableRule()); } 3423 HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
1823 iv_ruleVariable=ruleVariable 3424}:
1824 { $current=$iv_ruleVariable.current; } 3425 { newCompositeNode(grammarAccess.getRealRule()); }
3426 iv_ruleReal=ruleReal
3427 { $current=$iv_ruleReal.current.getText(); }
1825 EOF; 3428 EOF;
3429finally {
3430 myHiddenTokenState.restore();
3431}
1826 3432
1827// Rule Variable 3433// Rule Real
1828ruleVariable returns [EObject current=null] 3434ruleReal returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
1829@init { 3435@init {
1830 enterRule(); 3436 enterRule();
3437 HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
1831} 3438}
1832@after { 3439@after {
1833 leaveRule(); 3440 leaveRule();
1834}: 3441}:
1835 ( 3442 (
3443 this_INT_0=RULE_INT
3444 {
3445 $current.merge(this_INT_0);
3446 }
3447 {
3448 newLeafNode(this_INT_0, grammarAccess.getRealAccess().getINTTerminalRuleCall_0());
3449 }
1836 ( 3450 (
1837 lv_name_0_0=RULE_ID 3451 kw='.'
1838 { 3452 {
1839 newLeafNode(lv_name_0_0, grammarAccess.getVariableAccess().getNameIDTerminalRuleCall_0()); 3453 $current.merge(kw);
3454 newLeafNode(kw, grammarAccess.getRealAccess().getFullStopKeyword_1_0());
1840 } 3455 }
3456 this_INT_2=RULE_INT
1841 { 3457 {
1842 if ($current==null) { 3458 $current.merge(this_INT_2);
1843 $current = createModelElement(grammarAccess.getVariableRule());
1844 }
1845 setWithLastConsumed(
1846 $current,
1847 "name",
1848 lv_name_0_0,
1849 "org.eclipse.xtext.common.Terminals.ID");
1850 } 3459 }
1851 ) 3460 {
3461 newLeafNode(this_INT_2, grammarAccess.getRealAccess().getINTTerminalRuleCall_1_1());
3462 }
3463 )?
1852 ) 3464 )
1853; 3465;
3466finally {
3467 myHiddenTokenState.restore();
3468}
1854 3469
1855// Entry rule entryRuleAllInstances 3470// Entry rule entryRuleQualifiedName
1856entryRuleAllInstances returns [EObject current=null]: 3471entryRuleQualifiedName returns [String current=null]@init {
1857 { newCompositeNode(grammarAccess.getAllInstancesRule()); } 3472 HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
1858 iv_ruleAllInstances=ruleAllInstances 3473}:
1859 { $current=$iv_ruleAllInstances.current; } 3474 { newCompositeNode(grammarAccess.getQualifiedNameRule()); }
3475 iv_ruleQualifiedName=ruleQualifiedName
3476 { $current=$iv_ruleQualifiedName.current.getText(); }
1860 EOF; 3477 EOF;
3478finally {
3479 myHiddenTokenState.restore();
3480}
1861 3481
1862// Rule AllInstances 3482// Rule QualifiedName
1863ruleAllInstances returns [EObject current=null] 3483ruleQualifiedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
1864@init { 3484@init {
1865 enterRule(); 3485 enterRule();
3486 HiddenTokens myHiddenTokenState = ((XtextTokenStream)input).setHiddenTokens();
1866} 3487}
1867@after { 3488@after {
1868 leaveRule(); 3489 leaveRule();
1869}: 3490}:
1870 ( 3491 (
1871 otherlv_0=':'
1872 {
1873 newLeafNode(otherlv_0, grammarAccess.getAllInstancesAccess().getColonKeyword_0());
1874 }
1875 ( 3492 (
3493 this_ID_0=RULE_ID
3494 {
3495 $current.merge(this_ID_0);
3496 }
3497 {
3498 newLeafNode(this_ID_0, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_0_0());
3499 }
1876 ( 3500 (
3501 kw='.'
1877 { 3502 {
1878 newCompositeNode(grammarAccess.getAllInstancesAccess().getSymbolSymbolParserRuleCall_1_0()); 3503 $current.merge(kw);
3504 newLeafNode(kw, grammarAccess.getQualifiedNameAccess().getFullStopKeyword_0_1_0());
1879 } 3505 }
1880 lv_symbol_1_0=ruleSymbol 3506 this_ID_2=RULE_ID
1881 { 3507 {
1882 if ($current==null) { 3508 $current.merge(this_ID_2);
1883 $current = createModelElementForParent(grammarAccess.getAllInstancesRule());
1884 }
1885 set(
1886 $current,
1887 "symbol",
1888 lv_symbol_1_0,
1889 "org.eclipse.viatra.solver.language.SolverLanguage.Symbol");
1890 afterParserOrEnumRuleCall();
1891 } 3509 }
1892 ) 3510 {
3511 newLeafNode(this_ID_2, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_0_1_1());
3512 }
3513 )*
1893 ) 3514 )
3515 |
3516 this_QUOTED_ID_3=RULE_QUOTED_ID
3517 {
3518 $current.merge(this_QUOTED_ID_3);
3519 }
3520 {
3521 newLeafNode(this_QUOTED_ID_3, grammarAccess.getQualifiedNameAccess().getQUOTED_IDTerminalRuleCall_1());
3522 }
1894 ) 3523 )
1895; 3524;
3525finally {
3526 myHiddenTokenState.restore();
3527}
1896 3528
1897// Entry rule entryRuleAllObjects 3529// Rule MetricType
1898entryRuleAllObjects returns [EObject current=null]: 3530ruleMetricType returns [Enumerator current=null]
1899 { newCompositeNode(grammarAccess.getAllObjectsRule()); }
1900 iv_ruleAllObjects=ruleAllObjects
1901 { $current=$iv_ruleAllObjects.current; }
1902 EOF;
1903
1904// Rule AllObjects
1905ruleAllObjects returns [EObject current=null]
1906@init { 3531@init {
1907 enterRule(); 3532 enterRule();
1908} 3533}
@@ -1911,28 +3536,25 @@ ruleAllObjects returns [EObject current=null]
1911}: 3536}:
1912 ( 3537 (
1913 ( 3538 (
3539 enumLiteral_0='int'
1914 { 3540 {
1915 $current = forceCreateModelElement( 3541 $current = grammarAccess.getMetricTypeAccess().getINTEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
1916 grammarAccess.getAllObjectsAccess().getAllObjectsAction_0(), 3542 newLeafNode(enumLiteral_0, grammarAccess.getMetricTypeAccess().getINTEnumLiteralDeclaration_0());
1917 $current); 3543 }
3544 )
3545 |
3546 (
3547 enumLiteral_1='real'
3548 {
3549 $current = grammarAccess.getMetricTypeAccess().getREALEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
3550 newLeafNode(enumLiteral_1, grammarAccess.getMetricTypeAccess().getREALEnumLiteralDeclaration_1());
1918 } 3551 }
1919 ) 3552 )
1920 otherlv_1='*'
1921 {
1922 newLeafNode(otherlv_1, grammarAccess.getAllObjectsAccess().getAsteriskKeyword_1());
1923 }
1924 ) 3553 )
1925; 3554;
1926 3555
1927// Entry rule entryRuleDefaultInterpretation 3556// Rule ComparisonOperator
1928entryRuleDefaultInterpretation returns [EObject current=null]: 3557ruleComparisonOperator returns [Enumerator current=null]
1929 { newCompositeNode(grammarAccess.getDefaultInterpretationRule()); }
1930 iv_ruleDefaultInterpretation=ruleDefaultInterpretation
1931 { $current=$iv_ruleDefaultInterpretation.current; }
1932 EOF;
1933
1934// Rule DefaultInterpretation
1935ruleDefaultInterpretation returns [EObject current=null]
1936@init { 3558@init {
1937 enterRule(); 3559 enterRule();
1938} 3560}
@@ -1940,41 +3562,66 @@ ruleDefaultInterpretation returns [EObject current=null]
1940 leaveRule(); 3562 leaveRule();
1941}: 3563}:
1942 ( 3564 (
1943 otherlv_0='default'
1944 {
1945 newLeafNode(otherlv_0, grammarAccess.getDefaultInterpretationAccess().getDefaultKeyword_0());
1946 }
1947 ( 3565 (
1948 ( 3566 enumLiteral_0='=='
1949 { 3567 {
1950 newCompositeNode(grammarAccess.getDefaultInterpretationAccess().getInterpretationBasicInterpretationParserRuleCall_1_0()); 3568 $current = grammarAccess.getComparisonOperatorAccess().getEQEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
1951 } 3569 newLeafNode(enumLiteral_0, grammarAccess.getComparisonOperatorAccess().getEQEnumLiteralDeclaration_0());
1952 lv_interpretation_1_0=ruleBasicInterpretation 3570 }
1953 { 3571 )
1954 if ($current==null) { 3572 |
1955 $current = createModelElementForParent(grammarAccess.getDefaultInterpretationRule()); 3573 (
1956 } 3574 enumLiteral_1='!='
1957 set( 3575 {
1958 $current, 3576 $current = grammarAccess.getComparisonOperatorAccess().getNOT_EQEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
1959 "interpretation", 3577 newLeafNode(enumLiteral_1, grammarAccess.getComparisonOperatorAccess().getNOT_EQEnumLiteralDeclaration_1());
1960 lv_interpretation_1_0, 3578 }
1961 "org.eclipse.viatra.solver.language.SolverLanguage.BasicInterpretation"); 3579 )
1962 afterParserOrEnumRuleCall(); 3580 |
1963 } 3581 (
1964 ) 3582 enumLiteral_2='<'
3583 {
3584 $current = grammarAccess.getComparisonOperatorAccess().getLESSEnumLiteralDeclaration_2().getEnumLiteral().getInstance();
3585 newLeafNode(enumLiteral_2, grammarAccess.getComparisonOperatorAccess().getLESSEnumLiteralDeclaration_2());
3586 }
3587 )
3588 |
3589 (
3590 enumLiteral_3='<='
3591 {
3592 $current = grammarAccess.getComparisonOperatorAccess().getLESS_EQEnumLiteralDeclaration_3().getEnumLiteral().getInstance();
3593 newLeafNode(enumLiteral_3, grammarAccess.getComparisonOperatorAccess().getLESS_EQEnumLiteralDeclaration_3());
3594 }
3595 )
3596 |
3597 (
3598 enumLiteral_4='>'
3599 {
3600 $current = grammarAccess.getComparisonOperatorAccess().getGREATEREnumLiteralDeclaration_4().getEnumLiteral().getInstance();
3601 newLeafNode(enumLiteral_4, grammarAccess.getComparisonOperatorAccess().getGREATEREnumLiteralDeclaration_4());
3602 }
3603 )
3604 |
3605 (
3606 enumLiteral_5='>='
3607 {
3608 $current = grammarAccess.getComparisonOperatorAccess().getGREATER_EQEnumLiteralDeclaration_5().getEnumLiteral().getInstance();
3609 newLeafNode(enumLiteral_5, grammarAccess.getComparisonOperatorAccess().getGREATER_EQEnumLiteralDeclaration_5());
3610 }
3611 )
3612 |
3613 (
3614 enumLiteral_6='in'
3615 {
3616 $current = grammarAccess.getComparisonOperatorAccess().getINEnumLiteralDeclaration_6().getEnumLiteral().getInstance();
3617 newLeafNode(enumLiteral_6, grammarAccess.getComparisonOperatorAccess().getINEnumLiteralDeclaration_6());
3618 }
1965 ) 3619 )
1966 ) 3620 )
1967; 3621;
1968 3622
1969// Entry rule entryRuleCDInterpretation 3623// Rule AdditiveBinaryOperator
1970entryRuleCDInterpretation returns [EObject current=null]: 3624ruleAdditiveBinaryOperator returns [Enumerator current=null]
1971 { newCompositeNode(grammarAccess.getCDInterpretationRule()); }
1972 iv_ruleCDInterpretation=ruleCDInterpretation
1973 { $current=$iv_ruleCDInterpretation.current; }
1974 EOF;
1975
1976// Rule CDInterpretation
1977ruleCDInterpretation returns [EObject current=null]
1978@init { 3625@init {
1979 enterRule(); 3626 enterRule();
1980} 3627}
@@ -1982,44 +3629,26 @@ ruleCDInterpretation returns [EObject current=null]
1982 leaveRule(); 3629 leaveRule();
1983}: 3630}:
1984 ( 3631 (
1985 { 3632 (
1986 newCompositeNode(grammarAccess.getCDInterpretationAccess().getClassInterpretationParserRuleCall_0()); 3633 enumLiteral_0='+'
1987 } 3634 {
1988 this_ClassInterpretation_0=ruleClassInterpretation 3635 $current = grammarAccess.getAdditiveBinaryOperatorAccess().getADDEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
1989 { 3636 newLeafNode(enumLiteral_0, grammarAccess.getAdditiveBinaryOperatorAccess().getADDEnumLiteralDeclaration_0());
1990 $current = $this_ClassInterpretation_0.current; 3637 }
1991 afterParserOrEnumRuleCall(); 3638 )
1992 }
1993 |
1994 {
1995 newCompositeNode(grammarAccess.getCDInterpretationAccess().getEnumInterpretationParserRuleCall_1());
1996 }
1997 this_EnumInterpretation_1=ruleEnumInterpretation
1998 {
1999 $current = $this_EnumInterpretation_1.current;
2000 afterParserOrEnumRuleCall();
2001 }
2002 | 3639 |
2003 { 3640 (
2004 newCompositeNode(grammarAccess.getCDInterpretationAccess().getGlobalRelationInterpretationParserRuleCall_2()); 3641 enumLiteral_1='-'
2005 } 3642 {
2006 this_GlobalRelationInterpretation_2=ruleGlobalRelationInterpretation 3643 $current = grammarAccess.getAdditiveBinaryOperatorAccess().getSUBEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
2007 { 3644 newLeafNode(enumLiteral_1, grammarAccess.getAdditiveBinaryOperatorAccess().getSUBEnumLiteralDeclaration_1());
2008 $current = $this_GlobalRelationInterpretation_2.current; 3645 }
2009 afterParserOrEnumRuleCall(); 3646 )
2010 }
2011 ) 3647 )
2012; 3648;
2013 3649
2014// Entry rule entryRuleClassInterpretation 3650// Rule MultiplicativeBinaryOperator
2015entryRuleClassInterpretation returns [EObject current=null]: 3651ruleMultiplicativeBinaryOperator returns [Enumerator current=null]
2016 { newCompositeNode(grammarAccess.getClassInterpretationRule()); }
2017 iv_ruleClassInterpretation=ruleClassInterpretation
2018 { $current=$iv_ruleClassInterpretation.current; }
2019 EOF;
2020
2021// Rule ClassInterpretation
2022ruleClassInterpretation returns [EObject current=null]
2023@init { 3652@init {
2024 enterRule(); 3653 enterRule();
2025} 3654}
@@ -2028,106 +3657,25 @@ ruleClassInterpretation returns [EObject current=null]
2028}: 3657}:
2029 ( 3658 (
2030 ( 3659 (
2031 ( 3660 enumLiteral_0='*'
2032 lv_abstract_0_0='abstract' 3661 {
2033 { 3662 $current = grammarAccess.getMultiplicativeBinaryOperatorAccess().getMULEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
2034 newLeafNode(lv_abstract_0_0, grammarAccess.getClassInterpretationAccess().getAbstractAbstractKeyword_0_0()); 3663 newLeafNode(enumLiteral_0, grammarAccess.getMultiplicativeBinaryOperatorAccess().getMULEnumLiteralDeclaration_0());
2035 } 3664 }
2036 {
2037 if ($current==null) {
2038 $current = createModelElement(grammarAccess.getClassInterpretationRule());
2039 }
2040 setWithLastConsumed($current, "abstract", true, "abstract");
2041 }
2042 )
2043 )?
2044 otherlv_1='class'
2045 {
2046 newLeafNode(otherlv_1, grammarAccess.getClassInterpretationAccess().getClassKeyword_1());
2047 }
2048 (
2049 (
2050 {
2051 newCompositeNode(grammarAccess.getClassInterpretationAccess().getSymbolModelSymbolParserRuleCall_2_0());
2052 }
2053 lv_symbol_2_0=ruleModelSymbol
2054 {
2055 if ($current==null) {
2056 $current = createModelElementForParent(grammarAccess.getClassInterpretationRule());
2057 }
2058 set(
2059 $current,
2060 "symbol",
2061 lv_symbol_2_0,
2062 "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol");
2063 afterParserOrEnumRuleCall();
2064 }
2065 )
2066 ) 3665 )
3666 |
2067 ( 3667 (
2068 otherlv_3='extends' 3668 enumLiteral_1='/'
2069 { 3669 {
2070 newLeafNode(otherlv_3, grammarAccess.getClassInterpretationAccess().getExtendsKeyword_3_0()); 3670 $current = grammarAccess.getMultiplicativeBinaryOperatorAccess().getDIVEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
3671 newLeafNode(enumLiteral_1, grammarAccess.getMultiplicativeBinaryOperatorAccess().getDIVEnumLiteralDeclaration_1());
2071 } 3672 }
2072 ( 3673 )
2073 (
2074 {
2075 newCompositeNode(grammarAccess.getClassInterpretationAccess().getSupertypesModelSymbolParserRuleCall_3_1_0());
2076 }
2077 lv_supertypes_4_0=ruleModelSymbol
2078 {
2079 if ($current==null) {
2080 $current = createModelElementForParent(grammarAccess.getClassInterpretationRule());
2081 }
2082 add(
2083 $current,
2084 "supertypes",
2085 lv_supertypes_4_0,
2086 "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol");
2087 afterParserOrEnumRuleCall();
2088 }
2089 )
2090 )+
2091 )?
2092 otherlv_5='{'
2093 {
2094 newLeafNode(otherlv_5, grammarAccess.getClassInterpretationAccess().getLeftCurlyBracketKeyword_4());
2095 }
2096 (
2097 (
2098 {
2099 newCompositeNode(grammarAccess.getClassInterpretationAccess().getFieltFieldRelationInterpretationParserRuleCall_5_0());
2100 }
2101 lv_fielt_6_0=ruleFieldRelationInterpretation
2102 {
2103 if ($current==null) {
2104 $current = createModelElementForParent(grammarAccess.getClassInterpretationRule());
2105 }
2106 add(
2107 $current,
2108 "fielt",
2109 lv_fielt_6_0,
2110 "org.eclipse.viatra.solver.language.SolverLanguage.FieldRelationInterpretation");
2111 afterParserOrEnumRuleCall();
2112 }
2113 )
2114 )*
2115 otherlv_7='}'
2116 {
2117 newLeafNode(otherlv_7, grammarAccess.getClassInterpretationAccess().getRightCurlyBracketKeyword_6());
2118 }
2119 ) 3674 )
2120; 3675;
2121 3676
2122// Entry rule entryRuleEnumInterpretation 3677// Rule ExponentialOp
2123entryRuleEnumInterpretation returns [EObject current=null]: 3678ruleExponentialOp returns [Enumerator current=null]
2124 { newCompositeNode(grammarAccess.getEnumInterpretationRule()); }
2125 iv_ruleEnumInterpretation=ruleEnumInterpretation
2126 { $current=$iv_ruleEnumInterpretation.current; }
2127 EOF;
2128
2129// Rule EnumInterpretation
2130ruleEnumInterpretation returns [EObject current=null]
2131@init { 3679@init {
2132 enterRule(); 3680 enterRule();
2133} 3681}
@@ -2135,68 +3683,16 @@ ruleEnumInterpretation returns [EObject current=null]
2135 leaveRule(); 3683 leaveRule();
2136}: 3684}:
2137 ( 3685 (
2138 otherlv_0='enum' 3686 enumLiteral_0='^'
2139 {
2140 newLeafNode(otherlv_0, grammarAccess.getEnumInterpretationAccess().getEnumKeyword_0());
2141 }
2142 (
2143 (
2144 {
2145 newCompositeNode(grammarAccess.getEnumInterpretationAccess().getSymbolModelSymbolParserRuleCall_1_0());
2146 }
2147 lv_Symbol_1_0=ruleModelSymbol
2148 {
2149 if ($current==null) {
2150 $current = createModelElementForParent(grammarAccess.getEnumInterpretationRule());
2151 }
2152 set(
2153 $current,
2154 "Symbol",
2155 lv_Symbol_1_0,
2156 "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol");
2157 afterParserOrEnumRuleCall();
2158 }
2159 )
2160 )
2161 otherlv_2='{'
2162 {
2163 newLeafNode(otherlv_2, grammarAccess.getEnumInterpretationAccess().getLeftCurlyBracketKeyword_2());
2164 }
2165 (
2166 (
2167 {
2168 newCompositeNode(grammarAccess.getEnumInterpretationAccess().getObjectsNamedObjectParserRuleCall_3_0());
2169 }
2170 lv_objects_3_0=ruleNamedObject
2171 {
2172 if ($current==null) {
2173 $current = createModelElementForParent(grammarAccess.getEnumInterpretationRule());
2174 }
2175 add(
2176 $current,
2177 "objects",
2178 lv_objects_3_0,
2179 "org.eclipse.viatra.solver.language.SolverLanguage.NamedObject");
2180 afterParserOrEnumRuleCall();
2181 }
2182 )
2183 )+
2184 otherlv_4='}'
2185 { 3687 {
2186 newLeafNode(otherlv_4, grammarAccess.getEnumInterpretationAccess().getRightCurlyBracketKeyword_4()); 3688 $current = grammarAccess.getExponentialOpAccess().getPOWEnumLiteralDeclaration().getEnumLiteral().getInstance();
3689 newLeafNode(enumLiteral_0, grammarAccess.getExponentialOpAccess().getPOWEnumLiteralDeclaration());
2187 } 3690 }
2188 ) 3691 )
2189; 3692;
2190 3693
2191// Entry rule entryRuleFieldRelationInterpretation 3694// Rule UnaryOp
2192entryRuleFieldRelationInterpretation returns [EObject current=null]: 3695ruleUnaryOp returns [Enumerator current=null]
2193 { newCompositeNode(grammarAccess.getFieldRelationInterpretationRule()); }
2194 iv_ruleFieldRelationInterpretation=ruleFieldRelationInterpretation
2195 { $current=$iv_ruleFieldRelationInterpretation.current; }
2196 EOF;
2197
2198// Rule FieldRelationInterpretation
2199ruleFieldRelationInterpretation returns [EObject current=null]
2200@init { 3696@init {
2201 enterRule(); 3697 enterRule();
2202} 3698}
@@ -2205,92 +3701,57 @@ ruleFieldRelationInterpretation returns [EObject current=null]
2205}: 3701}:
2206 ( 3702 (
2207 ( 3703 (
2208 ( 3704 enumLiteral_0='!'
2209 lv_containment_0_0='containment' 3705 {
2210 { 3706 $current = grammarAccess.getUnaryOpAccess().getNEGEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
2211 newLeafNode(lv_containment_0_0, grammarAccess.getFieldRelationInterpretationAccess().getContainmentContainmentKeyword_0_0()); 3707 newLeafNode(enumLiteral_0, grammarAccess.getUnaryOpAccess().getNEGEnumLiteralDeclaration_0());
2212 } 3708 }
2213 { 3709 )
2214 if ($current==null) { 3710 |
2215 $current = createModelElement(grammarAccess.getFieldRelationInterpretationRule());
2216 }
2217 setWithLastConsumed($current, "containment", true, "containment");
2218 }
2219 )
2220 )?
2221 ( 3711 (
2222 ( 3712 enumLiteral_1='+'
2223 { 3713 {
2224 newCompositeNode(grammarAccess.getFieldRelationInterpretationAccess().getSymbolModelSymbolParserRuleCall_1_0()); 3714 $current = grammarAccess.getUnaryOpAccess().getPLUSEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
2225 } 3715 newLeafNode(enumLiteral_1, grammarAccess.getUnaryOpAccess().getPLUSEnumLiteralDeclaration_1());
2226 lv_symbol_1_0=ruleModelSymbol 3716 }
2227 {
2228 if ($current==null) {
2229 $current = createModelElementForParent(grammarAccess.getFieldRelationInterpretationRule());
2230 }
2231 set(
2232 $current,
2233 "symbol",
2234 lv_symbol_1_0,
2235 "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol");
2236 afterParserOrEnumRuleCall();
2237 }
2238 )
2239 ) 3717 )
2240 otherlv_2=':' 3718 |
2241 {
2242 newLeafNode(otherlv_2, grammarAccess.getFieldRelationInterpretationAccess().getColonKeyword_2());
2243 }
2244 ( 3719 (
2245 ( 3720 enumLiteral_2='-'
2246 { 3721 {
2247 newCompositeNode(grammarAccess.getFieldRelationInterpretationAccess().getMultiplicityMultiplicityDefinitionParserRuleCall_3_0()); 3722 $current = grammarAccess.getUnaryOpAccess().getMINUSEnumLiteralDeclaration_2().getEnumLiteral().getInstance();
2248 } 3723 newLeafNode(enumLiteral_2, grammarAccess.getUnaryOpAccess().getMINUSEnumLiteralDeclaration_2());
2249 lv_multiplicity_3_0=ruleMultiplicityDefinition 3724 }
2250 { 3725 )
2251 if ($current==null) { 3726 |
2252 $current = createModelElementForParent(grammarAccess.getFieldRelationInterpretationRule());
2253 }
2254 set(
2255 $current,
2256 "multiplicity",
2257 lv_multiplicity_3_0,
2258 "org.eclipse.viatra.solver.language.SolverLanguage.MultiplicityDefinition");
2259 afterParserOrEnumRuleCall();
2260 }
2261 )
2262 )?
2263 ( 3727 (
2264 ( 3728 enumLiteral_3='may'
2265 { 3729 {
2266 newCompositeNode(grammarAccess.getFieldRelationInterpretationAccess().getTargetSymbolParserRuleCall_4_0()); 3730 $current = grammarAccess.getUnaryOpAccess().getMAYEnumLiteralDeclaration_3().getEnumLiteral().getInstance();
2267 } 3731 newLeafNode(enumLiteral_3, grammarAccess.getUnaryOpAccess().getMAYEnumLiteralDeclaration_3());
2268 lv_target_4_0=ruleSymbol 3732 }
2269 { 3733 )
2270 if ($current==null) { 3734 |
2271 $current = createModelElementForParent(grammarAccess.getFieldRelationInterpretationRule()); 3735 (
2272 } 3736 enumLiteral_4='must'
2273 set( 3737 {
2274 $current, 3738 $current = grammarAccess.getUnaryOpAccess().getMUSTEnumLiteralDeclaration_4().getEnumLiteral().getInstance();
2275 "target", 3739 newLeafNode(enumLiteral_4, grammarAccess.getUnaryOpAccess().getMUSTEnumLiteralDeclaration_4());
2276 lv_target_4_0, 3740 }
2277 "org.eclipse.viatra.solver.language.SolverLanguage.Symbol"); 3741 )
2278 afterParserOrEnumRuleCall(); 3742 |
2279 } 3743 (
2280 ) 3744 enumLiteral_5='current'
3745 {
3746 $current = grammarAccess.getUnaryOpAccess().getCURRENTEnumLiteralDeclaration_5().getEnumLiteral().getInstance();
3747 newLeafNode(enumLiteral_5, grammarAccess.getUnaryOpAccess().getCURRENTEnumLiteralDeclaration_5());
3748 }
2281 ) 3749 )
2282 ) 3750 )
2283; 3751;
2284 3752
2285// Entry rule entryRuleGlobalRelationInterpretation 3753// Rule AggregationOp
2286entryRuleGlobalRelationInterpretation returns [EObject current=null]: 3754ruleAggregationOp returns [Enumerator current=null]
2287 { newCompositeNode(grammarAccess.getGlobalRelationInterpretationRule()); }
2288 iv_ruleGlobalRelationInterpretation=ruleGlobalRelationInterpretation
2289 { $current=$iv_ruleGlobalRelationInterpretation.current; }
2290 EOF;
2291
2292// Rule GlobalRelationInterpretation
2293ruleGlobalRelationInterpretation returns [EObject current=null]
2294@init { 3755@init {
2295 enterRule(); 3756 enterRule();
2296} 3757}
@@ -2299,134 +3760,100 @@ ruleGlobalRelationInterpretation returns [EObject current=null]
2299}: 3760}:
2300 ( 3761 (
2301 ( 3762 (
2302 ( 3763 enumLiteral_0='only'
2303 lv_containment_0_0='containment' 3764 {
2304 { 3765 $current = grammarAccess.getAggregationOpAccess().getONLYEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
2305 newLeafNode(lv_containment_0_0, grammarAccess.getGlobalRelationInterpretationAccess().getContainmentContainmentKeyword_0_0()); 3766 newLeafNode(enumLiteral_0, grammarAccess.getAggregationOpAccess().getONLYEnumLiteralDeclaration_0());
2306 } 3767 }
2307 { 3768 )
2308 if ($current==null) { 3769 |
2309 $current = createModelElement(grammarAccess.getGlobalRelationInterpretationRule());
2310 }
2311 setWithLastConsumed($current, "containment", true, "containment");
2312 }
2313 )
2314 )?
2315 otherlv_1='relation'
2316 {
2317 newLeafNode(otherlv_1, grammarAccess.getGlobalRelationInterpretationAccess().getRelationKeyword_1());
2318 }
2319 ( 3770 (
2320 ( 3771 enumLiteral_1='sum'
2321 { 3772 {
2322 newCompositeNode(grammarAccess.getGlobalRelationInterpretationAccess().getSymbolModelSymbolParserRuleCall_2_0()); 3773 $current = grammarAccess.getAggregationOpAccess().getSUMEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
2323 } 3774 newLeafNode(enumLiteral_1, grammarAccess.getAggregationOpAccess().getSUMEnumLiteralDeclaration_1());
2324 lv_symbol_2_0=ruleModelSymbol 3775 }
2325 {
2326 if ($current==null) {
2327 $current = createModelElementForParent(grammarAccess.getGlobalRelationInterpretationRule());
2328 }
2329 set(
2330 $current,
2331 "symbol",
2332 lv_symbol_2_0,
2333 "org.eclipse.viatra.solver.language.SolverLanguage.ModelSymbol");
2334 afterParserOrEnumRuleCall();
2335 }
2336 )
2337 ) 3776 )
2338 otherlv_3=':' 3777 |
2339 {
2340 newLeafNode(otherlv_3, grammarAccess.getGlobalRelationInterpretationAccess().getColonKeyword_3());
2341 }
2342 ( 3778 (
2343 ( 3779 enumLiteral_2='prod'
2344 { 3780 {
2345 newCompositeNode(grammarAccess.getGlobalRelationInterpretationAccess().getSourceMultiplicityMultiplicityDefinitionParserRuleCall_4_0()); 3781 $current = grammarAccess.getAggregationOpAccess().getPRODEnumLiteralDeclaration_2().getEnumLiteral().getInstance();
2346 } 3782 newLeafNode(enumLiteral_2, grammarAccess.getAggregationOpAccess().getPRODEnumLiteralDeclaration_2());
2347 lv_sourceMultiplicity_4_0=ruleMultiplicityDefinition 3783 }
2348 { 3784 )
2349 if ($current==null) { 3785 |
2350 $current = createModelElementForParent(grammarAccess.getGlobalRelationInterpretationRule());
2351 }
2352 set(
2353 $current,
2354 "sourceMultiplicity",
2355 lv_sourceMultiplicity_4_0,
2356 "org.eclipse.viatra.solver.language.SolverLanguage.MultiplicityDefinition");
2357 afterParserOrEnumRuleCall();
2358 }
2359 )
2360 )?
2361 ( 3786 (
2362 ( 3787 enumLiteral_3='avg'
2363 { 3788 {
2364 newCompositeNode(grammarAccess.getGlobalRelationInterpretationAccess().getSourceSymbolParserRuleCall_5_0()); 3789 $current = grammarAccess.getAggregationOpAccess().getAVGEnumLiteralDeclaration_3().getEnumLiteral().getInstance();
2365 } 3790 newLeafNode(enumLiteral_3, grammarAccess.getAggregationOpAccess().getAVGEnumLiteralDeclaration_3());
2366 lv_source_5_0=ruleSymbol 3791 }
2367 {
2368 if ($current==null) {
2369 $current = createModelElementForParent(grammarAccess.getGlobalRelationInterpretationRule());
2370 }
2371 set(
2372 $current,
2373 "source",
2374 lv_source_5_0,
2375 "org.eclipse.viatra.solver.language.SolverLanguage.Symbol");
2376 afterParserOrEnumRuleCall();
2377 }
2378 )
2379 ) 3792 )
3793 |
2380 ( 3794 (
2381 ( 3795 enumLiteral_4='min'
2382 { 3796 {
2383 newCompositeNode(grammarAccess.getGlobalRelationInterpretationAccess().getTargetMultiplicityMultiplicityDefinitionParserRuleCall_6_0()); 3797 $current = grammarAccess.getAggregationOpAccess().getMINEnumLiteralDeclaration_4().getEnumLiteral().getInstance();
2384 } 3798 newLeafNode(enumLiteral_4, grammarAccess.getAggregationOpAccess().getMINEnumLiteralDeclaration_4());
2385 lv_targetMultiplicity_6_0=ruleMultiplicityDefinition 3799 }
2386 { 3800 )
2387 if ($current==null) { 3801 |
2388 $current = createModelElementForParent(grammarAccess.getGlobalRelationInterpretationRule());
2389 }
2390 set(
2391 $current,
2392 "targetMultiplicity",
2393 lv_targetMultiplicity_6_0,
2394 "org.eclipse.viatra.solver.language.SolverLanguage.MultiplicityDefinition");
2395 afterParserOrEnumRuleCall();
2396 }
2397 )
2398 )?
2399 ( 3802 (
2400 ( 3803 enumLiteral_5='max'
2401 { 3804 {
2402 newCompositeNode(grammarAccess.getGlobalRelationInterpretationAccess().getTargetSymbolParserRuleCall_7_0()); 3805 $current = grammarAccess.getAggregationOpAccess().getMAXEnumLiteralDeclaration_5().getEnumLiteral().getInstance();
2403 } 3806 newLeafNode(enumLiteral_5, grammarAccess.getAggregationOpAccess().getMAXEnumLiteralDeclaration_5());
2404 lv_target_7_0=ruleSymbol 3807 }
2405 {
2406 if ($current==null) {
2407 $current = createModelElementForParent(grammarAccess.getGlobalRelationInterpretationRule());
2408 }
2409 set(
2410 $current,
2411 "target",
2412 lv_target_7_0,
2413 "org.eclipse.viatra.solver.language.SolverLanguage.Symbol");
2414 afterParserOrEnumRuleCall();
2415 }
2416 )
2417 ) 3808 )
2418 ) 3809 )
2419; 3810;
2420 3811
2421// Entry rule entryRuleMultiplicityDefinition 3812// Rule LogicValue
2422entryRuleMultiplicityDefinition returns [EObject current=null]: 3813ruleLogicValue returns [Enumerator current=null]
2423 { newCompositeNode(grammarAccess.getMultiplicityDefinitionRule()); } 3814@init {
2424 iv_ruleMultiplicityDefinition=ruleMultiplicityDefinition 3815 enterRule();
2425 { $current=$iv_ruleMultiplicityDefinition.current; } 3816}
2426 EOF; 3817@after {
3818 leaveRule();
3819}:
3820 (
3821 (
3822 enumLiteral_0='true'
3823 {
3824 $current = grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
3825 newLeafNode(enumLiteral_0, grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0());
3826 }
3827 )
3828 |
3829 (
3830 enumLiteral_1='false'
3831 {
3832 $current = grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
3833 newLeafNode(enumLiteral_1, grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1());
3834 }
3835 )
3836 |
3837 (
3838 enumLiteral_2='unknown'
3839 {
3840 $current = grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2().getEnumLiteral().getInstance();
3841 newLeafNode(enumLiteral_2, grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2());
3842 }
3843 )
3844 |
3845 (
3846 enumLiteral_3='error'
3847 {
3848 $current = grammarAccess.getLogicValueAccess().getERROREnumLiteralDeclaration_3().getEnumLiteral().getInstance();
3849 newLeafNode(enumLiteral_3, grammarAccess.getLogicValueAccess().getERROREnumLiteralDeclaration_3());
3850 }
3851 )
3852 )
3853;
2427 3854
2428// Rule MultiplicityDefinition 3855// Rule ObjectiveKind
2429ruleMultiplicityDefinition returns [EObject current=null] 3856ruleObjectiveKind returns [Enumerator current=null]
2430@init { 3857@init {
2431 enterRule(); 3858 enterRule();
2432} 3859}
@@ -2435,67 +3862,33 @@ ruleMultiplicityDefinition returns [EObject current=null]
2435}: 3862}:
2436 ( 3863 (
2437 ( 3864 (
2438 ( 3865 enumLiteral_0='minimize'
2439 lv_lower_0_0=RULE_INT 3866 {
2440 { 3867 $current = grammarAccess.getObjectiveKindAccess().getMINIMIZEEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
2441 newLeafNode(lv_lower_0_0, grammarAccess.getMultiplicityDefinitionAccess().getLowerINTTerminalRuleCall_0_0()); 3868 newLeafNode(enumLiteral_0, grammarAccess.getObjectiveKindAccess().getMINIMIZEEnumLiteralDeclaration_0());
2442 } 3869 }
2443 {
2444 if ($current==null) {
2445 $current = createModelElement(grammarAccess.getMultiplicityDefinitionRule());
2446 }
2447 setWithLastConsumed(
2448 $current,
2449 "lower",
2450 lv_lower_0_0,
2451 "org.eclipse.xtext.common.Terminals.INT");
2452 }
2453 )
2454 ) 3870 )
2455 otherlv_1='..' 3871 |
2456 {
2457 newLeafNode(otherlv_1, grammarAccess.getMultiplicityDefinitionAccess().getFullStopFullStopKeyword_1());
2458 }
2459 ( 3872 (
2460 ( 3873 enumLiteral_1='maximize'
2461 ( 3874 {
2462 lv_upper_2_0=RULE_INT 3875 $current = grammarAccess.getObjectiveKindAccess().getMAXIMIZEEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
2463 { 3876 newLeafNode(enumLiteral_1, grammarAccess.getObjectiveKindAccess().getMAXIMIZEEnumLiteralDeclaration_1());
2464 newLeafNode(lv_upper_2_0, grammarAccess.getMultiplicityDefinitionAccess().getUpperINTTerminalRuleCall_2_0_0()); 3877 }
2465 }
2466 {
2467 if ($current==null) {
2468 $current = createModelElement(grammarAccess.getMultiplicityDefinitionRule());
2469 }
2470 setWithLastConsumed(
2471 $current,
2472 "upper",
2473 lv_upper_2_0,
2474 "org.eclipse.xtext.common.Terminals.INT");
2475 }
2476 )
2477 )
2478 |
2479 (
2480 (
2481 lv_unlimitedUpper_3_0='*'
2482 {
2483 newLeafNode(lv_unlimitedUpper_3_0, grammarAccess.getMultiplicityDefinitionAccess().getUnlimitedUpperAsteriskKeyword_2_1_0());
2484 }
2485 {
2486 if ($current==null) {
2487 $current = createModelElement(grammarAccess.getMultiplicityDefinitionRule());
2488 }
2489 setWithLastConsumed($current, "unlimitedUpper", true, "*");
2490 }
2491 )
2492 )
2493 ) 3878 )
2494 ) 3879 )
2495; 3880;
2496 3881
2497RULE_STRING : '"' ('\\' .|~(('\\'|'"')))* '"'; 3882RULE_STRING : '"' ('\\' .|~(('\\'|'"')))* '"';
2498 3883
3884RULE_QUOTED_ID : '\'' ('\\' .|~(('\\'|'\'')))* '\'';
3885
3886RULE_PLUS : 'synthetic::plus';
3887
3888RULE_STAR : 'synthetic::star';
3889
3890RULE_DOT : 'synthetic::dot';
3891
2499RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*; 3892RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
2500 3893
2501RULE_INT : ('0'..'9')+; 3894RULE_INT : ('0'..'9')+;