diff options
author | 2020-05-06 00:27:55 +0200 | |
---|---|---|
committer | 2020-05-06 00:27:55 +0200 | |
commit | 820151b6d27643ba0927ca84d1bccadbd695a55d (patch) | |
tree | 9d3a5786b7f90723a6af967875f861a89e5b897e /Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSyntacticSequencer.java | |
parent | color update (diff) | |
download | VIATRA-Generator-820151b6d27643ba0927ca84d1bccadbd695a55d.tar.gz VIATRA-Generator-820151b6d27643ba0927ca84d1bccadbd695a55d.tar.zst VIATRA-Generator-820151b6d27643ba0927ca84d1bccadbd695a55d.zip |
PS language update
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSyntacticSequencer.java')
-rw-r--r-- | Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSyntacticSequencer.java | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSyntacticSequencer.java b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSyntacticSequencer.java index 5145bfac..8a2d6f62 100644 --- a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSyntacticSequencer.java +++ b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSyntacticSequencer.java | |||
@@ -11,6 +11,7 @@ import org.eclipse.xtext.IGrammarAccess; | |||
11 | import org.eclipse.xtext.RuleCall; | 11 | import org.eclipse.xtext.RuleCall; |
12 | import org.eclipse.xtext.nodemodel.INode; | 12 | import org.eclipse.xtext.nodemodel.INode; |
13 | import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias; | 13 | import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias; |
14 | import org.eclipse.xtext.serializer.analysis.GrammarAlias.GroupAlias; | ||
14 | import org.eclipse.xtext.serializer.analysis.GrammarAlias.TokenAlias; | 15 | import org.eclipse.xtext.serializer.analysis.GrammarAlias.TokenAlias; |
15 | import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynNavigable; | 16 | import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynNavigable; |
16 | import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition; | 17 | import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition; |
@@ -20,12 +21,18 @@ import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer; | |||
20 | public class SolverLanguageSyntacticSequencer extends AbstractSyntacticSequencer { | 21 | public class SolverLanguageSyntacticSequencer extends AbstractSyntacticSequencer { |
21 | 22 | ||
22 | protected SolverLanguageGrammarAccess grammarAccess; | 23 | protected SolverLanguageGrammarAccess grammarAccess; |
24 | protected AbstractElementAlias match_BasicInterpretation___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q; | ||
25 | protected AbstractElementAlias match_Constraint___LeftParenthesisKeyword_0_2_0_RightParenthesisKeyword_0_2_3__q; | ||
23 | protected AbstractElementAlias match_PatternBody_TrueKeyword_1_0_q; | 26 | protected AbstractElementAlias match_PatternBody_TrueKeyword_1_0_q; |
27 | protected AbstractElementAlias match_Predicate___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q; | ||
24 | 28 | ||
25 | @Inject | 29 | @Inject |
26 | protected void init(IGrammarAccess access) { | 30 | protected void init(IGrammarAccess access) { |
27 | grammarAccess = (SolverLanguageGrammarAccess) access; | 31 | grammarAccess = (SolverLanguageGrammarAccess) access; |
32 | match_BasicInterpretation___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getBasicInterpretationAccess().getLeftParenthesisKeyword_1_0()), new TokenAlias(false, false, grammarAccess.getBasicInterpretationAccess().getRightParenthesisKeyword_1_2())); | ||
33 | match_Constraint___LeftParenthesisKeyword_0_2_0_RightParenthesisKeyword_0_2_3__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getConstraintAccess().getLeftParenthesisKeyword_0_2_0()), new TokenAlias(false, false, grammarAccess.getConstraintAccess().getRightParenthesisKeyword_0_2_3())); | ||
28 | match_PatternBody_TrueKeyword_1_0_q = new TokenAlias(false, true, grammarAccess.getPatternBodyAccess().getTrueKeyword_1_0()); | 34 | match_PatternBody_TrueKeyword_1_0_q = new TokenAlias(false, true, grammarAccess.getPatternBodyAccess().getTrueKeyword_1_0()); |
35 | match_Predicate___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q = new GroupAlias(false, true, new TokenAlias(false, false, grammarAccess.getPredicateAccess().getLeftParenthesisKeyword_2_0()), new TokenAlias(false, false, grammarAccess.getPredicateAccess().getRightParenthesisKeyword_2_2())); | ||
29 | } | 36 | } |
30 | 37 | ||
31 | @Override | 38 | @Override |
@@ -40,14 +47,42 @@ public class SolverLanguageSyntacticSequencer extends AbstractSyntacticSequencer | |||
40 | List<INode> transitionNodes = collectNodes(fromNode, toNode); | 47 | List<INode> transitionNodes = collectNodes(fromNode, toNode); |
41 | for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) { | 48 | for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) { |
42 | List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax); | 49 | List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax); |
43 | if (match_PatternBody_TrueKeyword_1_0_q.equals(syntax)) | 50 | if (match_BasicInterpretation___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q.equals(syntax)) |
51 | emit_BasicInterpretation___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(semanticObject, getLastNavigableState(), syntaxNodes); | ||
52 | else if (match_Constraint___LeftParenthesisKeyword_0_2_0_RightParenthesisKeyword_0_2_3__q.equals(syntax)) | ||
53 | emit_Constraint___LeftParenthesisKeyword_0_2_0_RightParenthesisKeyword_0_2_3__q(semanticObject, getLastNavigableState(), syntaxNodes); | ||
54 | else if (match_PatternBody_TrueKeyword_1_0_q.equals(syntax)) | ||
44 | emit_PatternBody_TrueKeyword_1_0_q(semanticObject, getLastNavigableState(), syntaxNodes); | 55 | emit_PatternBody_TrueKeyword_1_0_q(semanticObject, getLastNavigableState(), syntaxNodes); |
56 | else if (match_Predicate___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q.equals(syntax)) | ||
57 | emit_Predicate___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q(semanticObject, getLastNavigableState(), syntaxNodes); | ||
45 | else acceptNodes(getLastNavigableState(), syntaxNodes); | 58 | else acceptNodes(getLastNavigableState(), syntaxNodes); |
46 | } | 59 | } |
47 | } | 60 | } |
48 | 61 | ||
49 | /** | 62 | /** |
50 | * Ambiguous syntax: | 63 | * Ambiguous syntax: |
64 | * ('(' ')')? | ||
65 | * | ||
66 | * This ambiguous syntax occurs at: | ||
67 | * symbol=Symbol (ambiguity) ':' value=TruthValue | ||
68 | */ | ||
69 | protected void emit_BasicInterpretation___LeftParenthesisKeyword_1_0_RightParenthesisKeyword_1_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
70 | acceptNodes(transition, nodes); | ||
71 | } | ||
72 | |||
73 | /** | ||
74 | * Ambiguous syntax: | ||
75 | * ('(' ')')? | ||
76 | * | ||
77 | * This ambiguous syntax occurs at: | ||
78 | * symbol=ModelSymbol (ambiguity) (rule end) | ||
79 | */ | ||
80 | protected void emit_Constraint___LeftParenthesisKeyword_0_2_0_RightParenthesisKeyword_0_2_3__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
81 | acceptNodes(transition, nodes); | ||
82 | } | ||
83 | |||
84 | /** | ||
85 | * Ambiguous syntax: | ||
51 | * 'true'? | 86 | * 'true'? |
52 | * | 87 | * |
53 | * This ambiguous syntax occurs at: | 88 | * This ambiguous syntax occurs at: |
@@ -57,4 +92,16 @@ public class SolverLanguageSyntacticSequencer extends AbstractSyntacticSequencer | |||
57 | acceptNodes(transition, nodes); | 92 | acceptNodes(transition, nodes); |
58 | } | 93 | } |
59 | 94 | ||
95 | /** | ||
96 | * Ambiguous syntax: | ||
97 | * ('(' ')')? | ||
98 | * | ||
99 | * This ambiguous syntax occurs at: | ||
100 | * symbol=ModelSymbol (ambiguity) ':-' 'false' '.' (rule end) | ||
101 | * symbol=ModelSymbol (ambiguity) ':-' bodies+=PatternBody | ||
102 | */ | ||
103 | protected void emit_Predicate___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
104 | acceptNodes(transition, nodes); | ||
105 | } | ||
106 | |||
60 | } | 107 | } |