diff options
author | 2020-05-08 21:02:33 +0200 | |
---|---|---|
committer | 2020-05-08 21:02:33 +0200 | |
commit | 771e3773bb7ebbf6712724cb2b248467c9cc2e3c (patch) | |
tree | b1724af24b9c583b2780c7a2fe76e76fd174359d /Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSemanticSequencer.java | |
parent | Update solver language grammar (diff) | |
download | VIATRA-Generator-771e3773bb7ebbf6712724cb2b248467c9cc2e3c.tar.gz VIATRA-Generator-771e3773bb7ebbf6712724cb2b248467c9cc2e3c.tar.zst VIATRA-Generator-771e3773bb7ebbf6712724cb2b248467c9cc2e3c.zip |
Synthetic tokens for solver language
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSemanticSequencer.java')
-rw-r--r-- | Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSemanticSequencer.java | 111 |
1 files changed, 34 insertions, 77 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSemanticSequencer.java b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSemanticSequencer.java index fc204c16..5cb73796 100644 --- a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSemanticSequencer.java +++ b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSemanticSequencer.java | |||
@@ -16,6 +16,7 @@ import org.eclipse.viatra.solver.language.solverLanguage.BoundedMultiplicity; | |||
16 | import org.eclipse.viatra.solver.language.solverLanguage.BoundedScopeDefinition; | 16 | import org.eclipse.viatra.solver.language.solverLanguage.BoundedScopeDefinition; |
17 | import org.eclipse.viatra.solver.language.solverLanguage.Call; | 17 | import org.eclipse.viatra.solver.language.solverLanguage.Call; |
18 | import org.eclipse.viatra.solver.language.solverLanguage.Case; | 18 | import org.eclipse.viatra.solver.language.solverLanguage.Case; |
19 | import org.eclipse.viatra.solver.language.solverLanguage.ClassDefinition; | ||
19 | import org.eclipse.viatra.solver.language.solverLanguage.Comparison; | 20 | import org.eclipse.viatra.solver.language.solverLanguage.Comparison; |
20 | import org.eclipse.viatra.solver.language.solverLanguage.Conjunction; | 21 | import org.eclipse.viatra.solver.language.solverLanguage.Conjunction; |
21 | import org.eclipse.viatra.solver.language.solverLanguage.Count; | 22 | import org.eclipse.viatra.solver.language.solverLanguage.Count; |
@@ -43,7 +44,6 @@ import org.eclipse.viatra.solver.language.solverLanguage.Problem; | |||
43 | import org.eclipse.viatra.solver.language.solverLanguage.Reference; | 44 | import org.eclipse.viatra.solver.language.solverLanguage.Reference; |
44 | import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; | 45 | import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; |
45 | import org.eclipse.viatra.solver.language.solverLanguage.StarArgument; | 46 | import org.eclipse.viatra.solver.language.solverLanguage.StarArgument; |
46 | import org.eclipse.viatra.solver.language.solverLanguage.Statement; | ||
47 | import org.eclipse.viatra.solver.language.solverLanguage.StringLiteral; | 47 | import org.eclipse.viatra.solver.language.solverLanguage.StringLiteral; |
48 | import org.eclipse.viatra.solver.language.solverLanguage.Switch; | 48 | import org.eclipse.viatra.solver.language.solverLanguage.Switch; |
49 | import org.eclipse.viatra.solver.language.solverLanguage.TypedArgument; | 49 | import org.eclipse.viatra.solver.language.solverLanguage.TypedArgument; |
@@ -91,34 +91,8 @@ public class SolverLanguageSemanticSequencer extends AbstractDelegatingSemanticS | |||
91 | sequence_BoundedScopeDefinition(context, (BoundedScopeDefinition) semanticObject); | 91 | sequence_BoundedScopeDefinition(context, (BoundedScopeDefinition) semanticObject); |
92 | return; | 92 | return; |
93 | case SolverLanguagePackage.CALL: | 93 | case SolverLanguagePackage.CALL: |
94 | if (action == grammarAccess.getAssertionOrDefinitionAccess().getAssertionBodyAction_1_0_0() | 94 | sequence_Call(context, (Call) semanticObject); |
95 | || action == grammarAccess.getAssertionOrDefinitionAccess().getPredicateDefinitionHeadAction_1_1_0() | 95 | return; |
96 | || action == grammarAccess.getAssertionOrDefinitionAccess().getMetricDefinitionHeadAction_1_2_0() | ||
97 | || rule == grammarAccess.getExpressionRule() | ||
98 | || rule == grammarAccess.getDisjunctiveExpressionRule() | ||
99 | || action == grammarAccess.getDisjunctiveExpressionAccess().getDisjunctionChildrenAction_1_0_0() | ||
100 | || action == grammarAccess.getDisjunctiveExpressionAccess().getCaseConditionAction_1_1_0() | ||
101 | || rule == grammarAccess.getConjunctiveExpressionRule() | ||
102 | || action == grammarAccess.getConjunctiveExpressionAccess().getConjunctionChildrenAction_1_0() | ||
103 | || rule == grammarAccess.getComparisonExpressionRule() | ||
104 | || action == grammarAccess.getComparisonExpressionAccess().getComparisonLeftAction_1_0() | ||
105 | || rule == grammarAccess.getAdditiveExpressionRule() | ||
106 | || action == grammarAccess.getAdditiveExpressionAccess().getBinaryExpressionLeftAction_1_0() | ||
107 | || rule == grammarAccess.getMultiplicativeExpressionRule() | ||
108 | || action == grammarAccess.getMultiplicativeExpressionAccess().getBinaryExpressionLeftAction_1_0() | ||
109 | || rule == grammarAccess.getExponentialExpressionRule() | ||
110 | || action == grammarAccess.getExponentialExpressionAccess().getBinaryExpressionLeftAction_1_0() | ||
111 | || rule == grammarAccess.getUnaryExpressionRule() | ||
112 | || rule == grammarAccess.getAggregationExpressionRule() | ||
113 | || rule == grammarAccess.getAtomicExpressionRule()) { | ||
114 | sequence_AtomicExpression(context, (Call) semanticObject); | ||
115 | return; | ||
116 | } | ||
117 | else if (rule == grammarAccess.getCallRule()) { | ||
118 | sequence_Call(context, (Call) semanticObject); | ||
119 | return; | ||
120 | } | ||
121 | else break; | ||
122 | case SolverLanguagePackage.CASE: | 96 | case SolverLanguagePackage.CASE: |
123 | if (rule == grammarAccess.getCaseRule()) { | 97 | if (rule == grammarAccess.getCaseRule()) { |
124 | sequence_Case(context, (Case) semanticObject); | 98 | sequence_Case(context, (Case) semanticObject); |
@@ -129,6 +103,9 @@ public class SolverLanguageSemanticSequencer extends AbstractDelegatingSemanticS | |||
129 | return; | 103 | return; |
130 | } | 104 | } |
131 | else break; | 105 | else break; |
106 | case SolverLanguagePackage.CLASS_DEFINITION: | ||
107 | sequence_ClassDefinition(context, (ClassDefinition) semanticObject); | ||
108 | return; | ||
132 | case SolverLanguagePackage.COMPARISON: | 109 | case SolverLanguagePackage.COMPARISON: |
133 | sequence_ComparisonExpression(context, (Comparison) semanticObject); | 110 | sequence_ComparisonExpression(context, (Comparison) semanticObject); |
134 | return; | 111 | return; |
@@ -229,9 +206,6 @@ public class SolverLanguageSemanticSequencer extends AbstractDelegatingSemanticS | |||
229 | case SolverLanguagePackage.STAR_ARGUMENT: | 206 | case SolverLanguagePackage.STAR_ARGUMENT: |
230 | sequence_StarArgument(context, (StarArgument) semanticObject); | 207 | sequence_StarArgument(context, (StarArgument) semanticObject); |
231 | return; | 208 | return; |
232 | case SolverLanguagePackage.STATEMENT: | ||
233 | sequence_ClassDefinition(context, (Statement) semanticObject); | ||
234 | return; | ||
235 | case SolverLanguagePackage.STRING_LITERAL: | 209 | case SolverLanguagePackage.STRING_LITERAL: |
236 | sequence_StringLiteral(context, (StringLiteral) semanticObject); | 210 | sequence_StringLiteral(context, (StringLiteral) semanticObject); |
237 | return; | 211 | return; |
@@ -430,46 +404,6 @@ public class SolverLanguageSemanticSequencer extends AbstractDelegatingSemanticS | |||
430 | 404 | ||
431 | /** | 405 | /** |
432 | * Contexts: | 406 | * Contexts: |
433 | * AssertionOrDefinition.Assertion_1_0_0 returns Call | ||
434 | * AssertionOrDefinition.PredicateDefinition_1_1_0 returns Call | ||
435 | * AssertionOrDefinition.MetricDefinition_1_2_0 returns Call | ||
436 | * Expression returns Call | ||
437 | * DisjunctiveExpression returns Call | ||
438 | * DisjunctiveExpression.Disjunction_1_0_0 returns Call | ||
439 | * DisjunctiveExpression.Case_1_1_0 returns Call | ||
440 | * ConjunctiveExpression returns Call | ||
441 | * ConjunctiveExpression.Conjunction_1_0 returns Call | ||
442 | * ComparisonExpression returns Call | ||
443 | * ComparisonExpression.Comparison_1_0 returns Call | ||
444 | * AdditiveExpression returns Call | ||
445 | * AdditiveExpression.BinaryExpression_1_0 returns Call | ||
446 | * MultiplicativeExpression returns Call | ||
447 | * MultiplicativeExpression.BinaryExpression_1_0 returns Call | ||
448 | * ExponentialExpression returns Call | ||
449 | * ExponentialExpression.BinaryExpression_1_0 returns Call | ||
450 | * UnaryExpression returns Call | ||
451 | * AggregationExpression returns Call | ||
452 | * AtomicExpression returns Call | ||
453 | * | ||
454 | * Constraint: | ||
455 | * (functor=AtomicExpression_Call_0_1_0 argumentList=ArgumentList) | ||
456 | */ | ||
457 | protected void sequence_AtomicExpression(ISerializationContext context, Call semanticObject) { | ||
458 | if (errorAcceptor != null) { | ||
459 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.CALL__FUNCTOR) == ValueTransient.YES) | ||
460 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.CALL__FUNCTOR)); | ||
461 | if (transientValues.isValueTransient(semanticObject, SolverLanguagePackage.Literals.CALL__ARGUMENT_LIST) == ValueTransient.YES) | ||
462 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SolverLanguagePackage.Literals.CALL__ARGUMENT_LIST)); | ||
463 | } | ||
464 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
465 | feeder.accept(grammarAccess.getAtomicExpressionAccess().getCallFunctorAction_0_1_0(), semanticObject.getFunctor()); | ||
466 | feeder.accept(grammarAccess.getAtomicExpressionAccess().getArgumentListArgumentListParserRuleCall_0_1_1_0(), semanticObject.getArgumentList()); | ||
467 | feeder.finish(); | ||
468 | } | ||
469 | |||
470 | |||
471 | /** | ||
472 | * Contexts: | ||
473 | * Multiplicity returns BoundedMultiplicity | 407 | * Multiplicity returns BoundedMultiplicity |
474 | * BoundedMultiplicity returns BoundedMultiplicity | 408 | * BoundedMultiplicity returns BoundedMultiplicity |
475 | * | 409 | * |
@@ -506,10 +440,34 @@ public class SolverLanguageSemanticSequencer extends AbstractDelegatingSemanticS | |||
506 | 440 | ||
507 | /** | 441 | /** |
508 | * Contexts: | 442 | * Contexts: |
443 | * AssertionOrDefinition.Assertion_1_0_0 returns Call | ||
444 | * AssertionOrDefinition.PredicateDefinition_1_1_0 returns Call | ||
445 | * AssertionOrDefinition.MetricDefinition_1_2_0 returns Call | ||
446 | * Expression returns Call | ||
447 | * DisjunctiveExpression returns Call | ||
448 | * DisjunctiveExpression.Disjunction_1_0_0 returns Call | ||
449 | * DisjunctiveExpression.Case_1_1_0 returns Call | ||
450 | * ConjunctiveExpression returns Call | ||
451 | * ConjunctiveExpression.Conjunction_1_0 returns Call | ||
452 | * ComparisonExpression returns Call | ||
453 | * ComparisonExpression.Comparison_1_0 returns Call | ||
454 | * AdditiveExpression returns Call | ||
455 | * AdditiveExpression.BinaryExpression_1_0 returns Call | ||
456 | * MultiplicativeExpression returns Call | ||
457 | * MultiplicativeExpression.BinaryExpression_1_0 returns Call | ||
458 | * ExponentialExpression returns Call | ||
459 | * ExponentialExpression.BinaryExpression_1_0 returns Call | ||
460 | * UnaryExpression returns Call | ||
461 | * AggregationExpression returns Call | ||
462 | * AtomicExpression returns Call | ||
509 | * Call returns Call | 463 | * Call returns Call |
510 | * | 464 | * |
511 | * Constraint: | 465 | * Constraint: |
512 | * (functor=Reference (transitiveClosure?=STAR | reflexiveTransitiveClosure?=PLUS)? argumentList=ArgumentList) | 466 | * ( |
467 | * functor=Reference | ||
468 | * (transitiveClosure?=TRANSITIVE_CLOSURE | reflexiveTransitiveClosure?=REFLEXIVE_TRANSITIVE_CLOSURE)? | ||
469 | * argumentList=ArgumentList | ||
470 | * ) | ||
513 | */ | 471 | */ |
514 | protected void sequence_Call(ISerializationContext context, Call semanticObject) { | 472 | protected void sequence_Call(ISerializationContext context, Call semanticObject) { |
515 | genericSequencer.createSequence(context, semanticObject); | 473 | genericSequencer.createSequence(context, semanticObject); |
@@ -539,8 +497,8 @@ public class SolverLanguageSemanticSequencer extends AbstractDelegatingSemanticS | |||
539 | 497 | ||
540 | /** | 498 | /** |
541 | * Contexts: | 499 | * Contexts: |
542 | * Statement returns Statement | 500 | * Statement returns ClassDefinition |
543 | * ClassDefinition returns Statement | 501 | * ClassDefinition returns ClassDefinition |
544 | * | 502 | * |
545 | * Constraint: | 503 | * Constraint: |
546 | * ( | 504 | * ( |
@@ -550,7 +508,7 @@ public class SolverLanguageSemanticSequencer extends AbstractDelegatingSemanticS | |||
550 | * members+=MemberDefinition* | 508 | * members+=MemberDefinition* |
551 | * ) | 509 | * ) |
552 | */ | 510 | */ |
553 | protected void sequence_ClassDefinition(ISerializationContext context, Statement semanticObject) { | 511 | protected void sequence_ClassDefinition(ISerializationContext context, ClassDefinition semanticObject) { |
554 | genericSequencer.createSequence(context, semanticObject); | 512 | genericSequencer.createSequence(context, semanticObject); |
555 | } | 513 | } |
556 | 514 | ||
@@ -1252,7 +1210,6 @@ public class SolverLanguageSemanticSequencer extends AbstractDelegatingSemanticS | |||
1252 | * UnaryExpression returns Reference | 1210 | * UnaryExpression returns Reference |
1253 | * AggregationExpression returns Reference | 1211 | * AggregationExpression returns Reference |
1254 | * AtomicExpression returns Reference | 1212 | * AtomicExpression returns Reference |
1255 | * AtomicExpression.Call_0_1_0 returns Reference | ||
1256 | * Reference returns Reference | 1213 | * Reference returns Reference |
1257 | * | 1214 | * |
1258 | * Constraint: | 1215 | * Constraint: |