diff options
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 | 191 |
1 files changed, 191 insertions, 0 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 new file mode 100644 index 00000000..2f9ea8a3 --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/serializer/SolverLanguageSyntacticSequencer.java | |||
@@ -0,0 +1,191 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.21.0 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.serializer; | ||
5 | |||
6 | import com.google.inject.Inject; | ||
7 | import java.util.List; | ||
8 | import org.eclipse.emf.ecore.EObject; | ||
9 | import org.eclipse.viatra.solver.language.services.SolverLanguageGrammarAccess; | ||
10 | import org.eclipse.xtext.IGrammarAccess; | ||
11 | import org.eclipse.xtext.RuleCall; | ||
12 | import org.eclipse.xtext.nodemodel.INode; | ||
13 | import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias; | ||
14 | import org.eclipse.xtext.serializer.analysis.GrammarAlias.AlternativeAlias; | ||
15 | import org.eclipse.xtext.serializer.analysis.GrammarAlias.GroupAlias; | ||
16 | import org.eclipse.xtext.serializer.analysis.GrammarAlias.TokenAlias; | ||
17 | import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynNavigable; | ||
18 | import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition; | ||
19 | import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer; | ||
20 | |||
21 | @SuppressWarnings("all") | ||
22 | public class SolverLanguageSyntacticSequencer extends AbstractSyntacticSequencer { | ||
23 | |||
24 | protected SolverLanguageGrammarAccess grammarAccess; | ||
25 | protected AbstractElementAlias match_AtomicExpression_LeftParenthesisKeyword_4_0_a; | ||
26 | protected AbstractElementAlias match_AtomicExpression_LeftParenthesisKeyword_4_0_p; | ||
27 | protected AbstractElementAlias match_ClassDeclaration_FULL_STOPTerminalRuleCall_4_1_or___LeftCurlyBracketKeyword_4_0_0_RightCurlyBracketKeyword_4_0_2__; | ||
28 | protected AbstractElementAlias match_EnumDeclaration_CommaKeyword_2_0_1_1_0_q; | ||
29 | protected AbstractElementAlias match_EnumDeclaration_FULL_STOPTerminalRuleCall_2_1_or___LeftCurlyBracketKeyword_2_0_0_RightCurlyBracketKeyword_2_0_2__; | ||
30 | protected AbstractElementAlias match_Field_SemicolonKeyword_5_q; | ||
31 | |||
32 | @Inject | ||
33 | protected void init(IGrammarAccess access) { | ||
34 | grammarAccess = (SolverLanguageGrammarAccess) access; | ||
35 | match_AtomicExpression_LeftParenthesisKeyword_4_0_a = new TokenAlias(true, true, grammarAccess.getAtomicExpressionAccess().getLeftParenthesisKeyword_4_0()); | ||
36 | match_AtomicExpression_LeftParenthesisKeyword_4_0_p = new TokenAlias(true, false, grammarAccess.getAtomicExpressionAccess().getLeftParenthesisKeyword_4_0()); | ||
37 | match_ClassDeclaration_FULL_STOPTerminalRuleCall_4_1_or___LeftCurlyBracketKeyword_4_0_0_RightCurlyBracketKeyword_4_0_2__ = new AlternativeAlias(false, false, new GroupAlias(false, false, new TokenAlias(false, false, grammarAccess.getClassDeclarationAccess().getLeftCurlyBracketKeyword_4_0_0()), new TokenAlias(false, false, grammarAccess.getClassDeclarationAccess().getRightCurlyBracketKeyword_4_0_2())), new TokenAlias(false, false, grammarAccess.getClassDeclarationAccess().getFULL_STOPTerminalRuleCall_4_1())); | ||
38 | match_EnumDeclaration_CommaKeyword_2_0_1_1_0_q = new TokenAlias(false, true, grammarAccess.getEnumDeclarationAccess().getCommaKeyword_2_0_1_1_0()); | ||
39 | match_EnumDeclaration_FULL_STOPTerminalRuleCall_2_1_or___LeftCurlyBracketKeyword_2_0_0_RightCurlyBracketKeyword_2_0_2__ = new AlternativeAlias(false, false, new GroupAlias(false, false, new TokenAlias(false, false, grammarAccess.getEnumDeclarationAccess().getLeftCurlyBracketKeyword_2_0_0()), new TokenAlias(false, false, grammarAccess.getEnumDeclarationAccess().getRightCurlyBracketKeyword_2_0_2())), new TokenAlias(false, false, grammarAccess.getEnumDeclarationAccess().getFULL_STOPTerminalRuleCall_2_1())); | ||
40 | match_Field_SemicolonKeyword_5_q = new TokenAlias(false, true, grammarAccess.getFieldAccess().getSemicolonKeyword_5()); | ||
41 | } | ||
42 | |||
43 | @Override | ||
44 | protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) { | ||
45 | if (ruleCall.getRule() == grammarAccess.getFULL_STOPRule()) | ||
46 | return getFULL_STOPToken(semanticObject, ruleCall, node); | ||
47 | else if (ruleCall.getRule() == grammarAccess.getREFLEXIVE_TRANSITIVE_CLOSURERule()) | ||
48 | return getREFLEXIVE_TRANSITIVE_CLOSUREToken(semanticObject, ruleCall, node); | ||
49 | else if (ruleCall.getRule() == grammarAccess.getTRANSITIVE_CLOSURERule()) | ||
50 | return getTRANSITIVE_CLOSUREToken(semanticObject, ruleCall, node); | ||
51 | return ""; | ||
52 | } | ||
53 | |||
54 | /** | ||
55 | * Synthetic terminal rule. The concrete syntax is to be specified by clients. | ||
56 | * Defaults to the empty string. | ||
57 | */ | ||
58 | protected String getFULL_STOPToken(EObject semanticObject, RuleCall ruleCall, INode node) { return ""; } | ||
59 | |||
60 | /** | ||
61 | * Synthetic terminal rule. The concrete syntax is to be specified by clients. | ||
62 | * Defaults to the empty string. | ||
63 | */ | ||
64 | protected String getREFLEXIVE_TRANSITIVE_CLOSUREToken(EObject semanticObject, RuleCall ruleCall, INode node) { return ""; } | ||
65 | |||
66 | /** | ||
67 | * Synthetic terminal rule. The concrete syntax is to be specified by clients. | ||
68 | * Defaults to the empty string. | ||
69 | */ | ||
70 | protected String getTRANSITIVE_CLOSUREToken(EObject semanticObject, RuleCall ruleCall, INode node) { return ""; } | ||
71 | |||
72 | @Override | ||
73 | protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) { | ||
74 | if (transition.getAmbiguousSyntaxes().isEmpty()) return; | ||
75 | List<INode> transitionNodes = collectNodes(fromNode, toNode); | ||
76 | for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) { | ||
77 | List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax); | ||
78 | if (match_AtomicExpression_LeftParenthesisKeyword_4_0_a.equals(syntax)) | ||
79 | emit_AtomicExpression_LeftParenthesisKeyword_4_0_a(semanticObject, getLastNavigableState(), syntaxNodes); | ||
80 | else if (match_AtomicExpression_LeftParenthesisKeyword_4_0_p.equals(syntax)) | ||
81 | emit_AtomicExpression_LeftParenthesisKeyword_4_0_p(semanticObject, getLastNavigableState(), syntaxNodes); | ||
82 | else if (match_ClassDeclaration_FULL_STOPTerminalRuleCall_4_1_or___LeftCurlyBracketKeyword_4_0_0_RightCurlyBracketKeyword_4_0_2__.equals(syntax)) | ||
83 | emit_ClassDeclaration_FULL_STOPTerminalRuleCall_4_1_or___LeftCurlyBracketKeyword_4_0_0_RightCurlyBracketKeyword_4_0_2__(semanticObject, getLastNavigableState(), syntaxNodes); | ||
84 | else if (match_EnumDeclaration_CommaKeyword_2_0_1_1_0_q.equals(syntax)) | ||
85 | emit_EnumDeclaration_CommaKeyword_2_0_1_1_0_q(semanticObject, getLastNavigableState(), syntaxNodes); | ||
86 | else if (match_EnumDeclaration_FULL_STOPTerminalRuleCall_2_1_or___LeftCurlyBracketKeyword_2_0_0_RightCurlyBracketKeyword_2_0_2__.equals(syntax)) | ||
87 | emit_EnumDeclaration_FULL_STOPTerminalRuleCall_2_1_or___LeftCurlyBracketKeyword_2_0_0_RightCurlyBracketKeyword_2_0_2__(semanticObject, getLastNavigableState(), syntaxNodes); | ||
88 | else if (match_Field_SemicolonKeyword_5_q.equals(syntax)) | ||
89 | emit_Field_SemicolonKeyword_5_q(semanticObject, getLastNavigableState(), syntaxNodes); | ||
90 | else acceptNodes(getLastNavigableState(), syntaxNodes); | ||
91 | } | ||
92 | } | ||
93 | |||
94 | /** | ||
95 | * Ambiguous syntax: | ||
96 | * '('* | ||
97 | * | ||
98 | * This ambiguous syntax occurs at: | ||
99 | * (rule start) (ambiguity) '[' lowerBound=AdditiveExpression | ||
100 | * (rule start) (ambiguity) 'count' '{' condition=Expression | ||
101 | * (rule start) (ambiguity) 'empty' (rule start) | ||
102 | * (rule start) (ambiguity) 'if' condition=DisjunctiveExpression | ||
103 | * (rule start) (ambiguity) 'inf' (rule start) | ||
104 | * (rule start) (ambiguity) 'let' bindings+=LetBinding | ||
105 | * (rule start) (ambiguity) components+=PathComponent | ||
106 | * (rule start) (ambiguity) functor=Reference | ||
107 | * (rule start) (ambiguity) op=UnaryOperator | ||
108 | * (rule start) (ambiguity) op=[Symbol|QualifiedName] | ||
109 | * (rule start) (ambiguity) value=INT | ||
110 | * (rule start) (ambiguity) value=LogicValue | ||
111 | * (rule start) (ambiguity) value=Real | ||
112 | * (rule start) (ambiguity) value=STRING | ||
113 | * (rule start) (ambiguity) {BinaryExpression.left=} | ||
114 | * (rule start) (ambiguity) {CastExpression.body=} | ||
115 | * (rule start) (ambiguity) {Conjunction.children+=} | ||
116 | * (rule start) (ambiguity) {Disjunction.children+=} | ||
117 | * (rule start) (ambiguity) {Forall.condition=} | ||
118 | * (rule start) (ambiguity) {Switch.cases+=} | ||
119 | */ | ||
120 | protected void emit_AtomicExpression_LeftParenthesisKeyword_4_0_a(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
121 | acceptNodes(transition, nodes); | ||
122 | } | ||
123 | |||
124 | /** | ||
125 | * Ambiguous syntax: | ||
126 | * '('+ | ||
127 | * | ||
128 | * This ambiguous syntax occurs at: | ||
129 | * (rule start) (ambiguity) 'count' '{' condition=Expression | ||
130 | * (rule start) (ambiguity) 'if' condition=DisjunctiveExpression | ||
131 | * (rule start) (ambiguity) 'let' bindings+=LetBinding | ||
132 | * (rule start) (ambiguity) op=UnaryOperator | ||
133 | * (rule start) (ambiguity) op=[Symbol|QualifiedName] | ||
134 | * (rule start) (ambiguity) {BinaryExpression.left=} | ||
135 | * (rule start) (ambiguity) {CastExpression.body=} | ||
136 | * (rule start) (ambiguity) {Conjunction.children+=} | ||
137 | * (rule start) (ambiguity) {Disjunction.children+=} | ||
138 | * (rule start) (ambiguity) {Forall.condition=} | ||
139 | * (rule start) (ambiguity) {Switch.cases+=} | ||
140 | */ | ||
141 | protected void emit_AtomicExpression_LeftParenthesisKeyword_4_0_p(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
142 | acceptNodes(transition, nodes); | ||
143 | } | ||
144 | |||
145 | /** | ||
146 | * Ambiguous syntax: | ||
147 | * ('{' '}') | FULL_STOP | ||
148 | * | ||
149 | * This ambiguous syntax occurs at: | ||
150 | * name=ID (ambiguity) (rule end) | ||
151 | * supertypes+=[Symbol|QualifiedName] (ambiguity) (rule end) | ||
152 | */ | ||
153 | protected void emit_ClassDeclaration_FULL_STOPTerminalRuleCall_4_1_or___LeftCurlyBracketKeyword_4_0_0_RightCurlyBracketKeyword_4_0_2__(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
154 | acceptNodes(transition, nodes); | ||
155 | } | ||
156 | |||
157 | /** | ||
158 | * Ambiguous syntax: | ||
159 | * ','? | ||
160 | * | ||
161 | * This ambiguous syntax occurs at: | ||
162 | * literals+=EnumLiteral (ambiguity) literals+=EnumLiteral | ||
163 | */ | ||
164 | protected void emit_EnumDeclaration_CommaKeyword_2_0_1_1_0_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
165 | acceptNodes(transition, nodes); | ||
166 | } | ||
167 | |||
168 | /** | ||
169 | * Ambiguous syntax: | ||
170 | * ('{' '}') | FULL_STOP | ||
171 | * | ||
172 | * This ambiguous syntax occurs at: | ||
173 | * name=ID (ambiguity) (rule end) | ||
174 | */ | ||
175 | protected void emit_EnumDeclaration_FULL_STOPTerminalRuleCall_2_1_or___LeftCurlyBracketKeyword_2_0_0_RightCurlyBracketKeyword_2_0_2__(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
176 | acceptNodes(transition, nodes); | ||
177 | } | ||
178 | |||
179 | /** | ||
180 | * Ambiguous syntax: | ||
181 | * ';'? | ||
182 | * | ||
183 | * This ambiguous syntax occurs at: | ||
184 | * name=ID (ambiguity) (rule end) | ||
185 | * opposite=[Symbol|QualifiedName] (ambiguity) (rule end) | ||
186 | */ | ||
187 | protected void emit_Field_SemicolonKeyword_5_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
188 | acceptNodes(transition, nodes); | ||
189 | } | ||
190 | |||
191 | } | ||