diff options
Diffstat (limited to 'language/src/main/xtext-gen/org/eclipse/viatra/solver/language/serializer')
2 files changed, 508 insertions, 0 deletions
diff --git a/language/src/main/xtext-gen/org/eclipse/viatra/solver/language/serializer/ProblemSemanticSequencer.java b/language/src/main/xtext-gen/org/eclipse/viatra/solver/language/serializer/ProblemSemanticSequencer.java new file mode 100644 index 00000000..cb44c31f --- /dev/null +++ b/language/src/main/xtext-gen/org/eclipse/viatra/solver/language/serializer/ProblemSemanticSequencer.java | |||
@@ -0,0 +1,369 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.26.0.M1 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.serializer; | ||
5 | |||
6 | import com.google.inject.Inject; | ||
7 | import java.util.Set; | ||
8 | import org.eclipse.emf.ecore.EObject; | ||
9 | import org.eclipse.emf.ecore.EPackage; | ||
10 | import org.eclipse.viatra.solver.language.model.problem.Argument; | ||
11 | import org.eclipse.viatra.solver.language.model.problem.Assertion; | ||
12 | import org.eclipse.viatra.solver.language.model.problem.Atom; | ||
13 | import org.eclipse.viatra.solver.language.model.problem.ClassDeclaration; | ||
14 | import org.eclipse.viatra.solver.language.model.problem.Conjunction; | ||
15 | import org.eclipse.viatra.solver.language.model.problem.EnumDeclaration; | ||
16 | import org.eclipse.viatra.solver.language.model.problem.ExactMultiplicity; | ||
17 | import org.eclipse.viatra.solver.language.model.problem.NegativeLiteral; | ||
18 | import org.eclipse.viatra.solver.language.model.problem.Node; | ||
19 | import org.eclipse.viatra.solver.language.model.problem.PredicateDefinition; | ||
20 | import org.eclipse.viatra.solver.language.model.problem.Problem; | ||
21 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
22 | import org.eclipse.viatra.solver.language.model.problem.RangeMultiplicity; | ||
23 | import org.eclipse.viatra.solver.language.model.problem.ReferenceDeclaration; | ||
24 | import org.eclipse.viatra.solver.language.model.problem.ScopeDeclaration; | ||
25 | import org.eclipse.viatra.solver.language.model.problem.TypeScope; | ||
26 | import org.eclipse.viatra.solver.language.model.problem.UnboundedMultiplicity; | ||
27 | import org.eclipse.viatra.solver.language.services.ProblemGrammarAccess; | ||
28 | import org.eclipse.xtext.Action; | ||
29 | import org.eclipse.xtext.Parameter; | ||
30 | import org.eclipse.xtext.ParserRule; | ||
31 | import org.eclipse.xtext.serializer.ISerializationContext; | ||
32 | import org.eclipse.xtext.serializer.acceptor.SequenceFeeder; | ||
33 | import org.eclipse.xtext.serializer.sequencer.AbstractDelegatingSemanticSequencer; | ||
34 | import org.eclipse.xtext.serializer.sequencer.ITransientValueService.ValueTransient; | ||
35 | |||
36 | @SuppressWarnings("all") | ||
37 | public class ProblemSemanticSequencer extends AbstractDelegatingSemanticSequencer { | ||
38 | |||
39 | @Inject | ||
40 | private ProblemGrammarAccess grammarAccess; | ||
41 | |||
42 | @Override | ||
43 | public void sequence(ISerializationContext context, EObject semanticObject) { | ||
44 | EPackage epackage = semanticObject.eClass().getEPackage(); | ||
45 | ParserRule rule = context.getParserRule(); | ||
46 | Action action = context.getAssignedAction(); | ||
47 | Set<Parameter> parameters = context.getEnabledBooleanParameters(); | ||
48 | if (epackage == ProblemPackage.eINSTANCE) | ||
49 | switch (semanticObject.eClass().getClassifierID()) { | ||
50 | case ProblemPackage.ARGUMENT: | ||
51 | sequence_Argument(context, (Argument) semanticObject); | ||
52 | return; | ||
53 | case ProblemPackage.ASSERTION: | ||
54 | sequence_Assertion(context, (Assertion) semanticObject); | ||
55 | return; | ||
56 | case ProblemPackage.ATOM: | ||
57 | sequence_Atom(context, (Atom) semanticObject); | ||
58 | return; | ||
59 | case ProblemPackage.CLASS_DECLARATION: | ||
60 | sequence_ClassDeclaration(context, (ClassDeclaration) semanticObject); | ||
61 | return; | ||
62 | case ProblemPackage.CONJUNCTION: | ||
63 | sequence_Conjunction(context, (Conjunction) semanticObject); | ||
64 | return; | ||
65 | case ProblemPackage.ENUM_DECLARATION: | ||
66 | sequence_EnumDeclaration(context, (EnumDeclaration) semanticObject); | ||
67 | return; | ||
68 | case ProblemPackage.EXACT_MULTIPLICITY: | ||
69 | sequence_ExactMultiplicity(context, (ExactMultiplicity) semanticObject); | ||
70 | return; | ||
71 | case ProblemPackage.NEGATIVE_LITERAL: | ||
72 | sequence_NegativeLiteral(context, (NegativeLiteral) semanticObject); | ||
73 | return; | ||
74 | case ProblemPackage.NODE: | ||
75 | sequence_EnumLiteral(context, (Node) semanticObject); | ||
76 | return; | ||
77 | case ProblemPackage.PARAMETER: | ||
78 | sequence_Parameter(context, (org.eclipse.viatra.solver.language.model.problem.Parameter) semanticObject); | ||
79 | return; | ||
80 | case ProblemPackage.PREDICATE_DEFINITION: | ||
81 | sequence_PredicateDefinition(context, (PredicateDefinition) semanticObject); | ||
82 | return; | ||
83 | case ProblemPackage.PROBLEM: | ||
84 | sequence_Problem(context, (Problem) semanticObject); | ||
85 | return; | ||
86 | case ProblemPackage.RANGE_MULTIPLICITY: | ||
87 | sequence_RangeMultiplicity(context, (RangeMultiplicity) semanticObject); | ||
88 | return; | ||
89 | case ProblemPackage.REFERENCE_DECLARATION: | ||
90 | sequence_ReferenceDeclaration(context, (ReferenceDeclaration) semanticObject); | ||
91 | return; | ||
92 | case ProblemPackage.SCOPE_DECLARATION: | ||
93 | sequence_ScopeDeclaration(context, (ScopeDeclaration) semanticObject); | ||
94 | return; | ||
95 | case ProblemPackage.TYPE_SCOPE: | ||
96 | sequence_TypeScope(context, (TypeScope) semanticObject); | ||
97 | return; | ||
98 | case ProblemPackage.UNBOUNDED_MULTIPLICITY: | ||
99 | sequence_UnboundedMultiplicity(context, (UnboundedMultiplicity) semanticObject); | ||
100 | return; | ||
101 | } | ||
102 | if (errorAcceptor != null) | ||
103 | errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context)); | ||
104 | } | ||
105 | |||
106 | /** | ||
107 | * Contexts: | ||
108 | * Argument returns Argument | ||
109 | * | ||
110 | * Constraint: | ||
111 | * variableOrNode=[VariableOrNode|QualifiedName] | ||
112 | */ | ||
113 | protected void sequence_Argument(ISerializationContext context, Argument semanticObject) { | ||
114 | if (errorAcceptor != null) { | ||
115 | if (transientValues.isValueTransient(semanticObject, ProblemPackage.Literals.ARGUMENT__VARIABLE_OR_NODE) == ValueTransient.YES) | ||
116 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ProblemPackage.Literals.ARGUMENT__VARIABLE_OR_NODE)); | ||
117 | } | ||
118 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
119 | feeder.accept(grammarAccess.getArgumentAccess().getVariableOrNodeVariableOrNodeQualifiedNameParserRuleCall_0_1(), semanticObject.eGet(ProblemPackage.Literals.ARGUMENT__VARIABLE_OR_NODE, false)); | ||
120 | feeder.finish(); | ||
121 | } | ||
122 | |||
123 | |||
124 | /** | ||
125 | * Contexts: | ||
126 | * Statement returns Assertion | ||
127 | * Assertion returns Assertion | ||
128 | * | ||
129 | * Constraint: | ||
130 | * ( | ||
131 | * (relation=[Relation|QualifiedName] (arguments+=[Node|QualifiedName] arguments+=[Node|QualifiedName]*)? value=LogicValue) | | ||
132 | * (value=ShortLogicValue? relation=[Relation|QualifiedName] (arguments+=[Node|QualifiedName] arguments+=[Node|QualifiedName]*)?) | ||
133 | * ) | ||
134 | */ | ||
135 | protected void sequence_Assertion(ISerializationContext context, Assertion semanticObject) { | ||
136 | genericSequencer.createSequence(context, semanticObject); | ||
137 | } | ||
138 | |||
139 | |||
140 | /** | ||
141 | * Contexts: | ||
142 | * Literal returns Atom | ||
143 | * Atom returns Atom | ||
144 | * | ||
145 | * Constraint: | ||
146 | * (relation=[Relation|QualifiedName] transitiveClosure?='+'? (arguments+=Argument arguments+=Argument*)?) | ||
147 | */ | ||
148 | protected void sequence_Atom(ISerializationContext context, Atom semanticObject) { | ||
149 | genericSequencer.createSequence(context, semanticObject); | ||
150 | } | ||
151 | |||
152 | |||
153 | /** | ||
154 | * Contexts: | ||
155 | * Statement returns ClassDeclaration | ||
156 | * ClassDeclaration returns ClassDeclaration | ||
157 | * | ||
158 | * Constraint: | ||
159 | * ( | ||
160 | * abstract?='abstract'? | ||
161 | * name=Identifier | ||
162 | * (superTypes+=[Relation|QualifiedName] superTypes+=[Relation|QualifiedName]*)? | ||
163 | * referenceDeclarations+=ReferenceDeclaration* | ||
164 | * ) | ||
165 | */ | ||
166 | protected void sequence_ClassDeclaration(ISerializationContext context, ClassDeclaration semanticObject) { | ||
167 | genericSequencer.createSequence(context, semanticObject); | ||
168 | } | ||
169 | |||
170 | |||
171 | /** | ||
172 | * Contexts: | ||
173 | * Conjunction returns Conjunction | ||
174 | * | ||
175 | * Constraint: | ||
176 | * (literals+=Literal literals+=Literal*) | ||
177 | */ | ||
178 | protected void sequence_Conjunction(ISerializationContext context, Conjunction semanticObject) { | ||
179 | genericSequencer.createSequence(context, semanticObject); | ||
180 | } | ||
181 | |||
182 | |||
183 | /** | ||
184 | * Contexts: | ||
185 | * Statement returns EnumDeclaration | ||
186 | * EnumDeclaration returns EnumDeclaration | ||
187 | * | ||
188 | * Constraint: | ||
189 | * (name=Identifier (literals+=EnumLiteral literals+=EnumLiteral*)?) | ||
190 | */ | ||
191 | protected void sequence_EnumDeclaration(ISerializationContext context, EnumDeclaration semanticObject) { | ||
192 | genericSequencer.createSequence(context, semanticObject); | ||
193 | } | ||
194 | |||
195 | |||
196 | /** | ||
197 | * Contexts: | ||
198 | * EnumLiteral returns Node | ||
199 | * | ||
200 | * Constraint: | ||
201 | * name=QuotedOrUnquotedId | ||
202 | */ | ||
203 | protected void sequence_EnumLiteral(ISerializationContext context, Node semanticObject) { | ||
204 | if (errorAcceptor != null) { | ||
205 | if (transientValues.isValueTransient(semanticObject, ProblemPackage.Literals.NAMED_ELEMENT__NAME) == ValueTransient.YES) | ||
206 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ProblemPackage.Literals.NAMED_ELEMENT__NAME)); | ||
207 | } | ||
208 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
209 | feeder.accept(grammarAccess.getEnumLiteralAccess().getNameQuotedOrUnquotedIdParserRuleCall_0(), semanticObject.getName()); | ||
210 | feeder.finish(); | ||
211 | } | ||
212 | |||
213 | |||
214 | /** | ||
215 | * Contexts: | ||
216 | * Multiplicity returns ExactMultiplicity | ||
217 | * DefiniteMultiplicity returns ExactMultiplicity | ||
218 | * ExactMultiplicity returns ExactMultiplicity | ||
219 | * | ||
220 | * Constraint: | ||
221 | * exactValue=INT | ||
222 | */ | ||
223 | protected void sequence_ExactMultiplicity(ISerializationContext context, ExactMultiplicity semanticObject) { | ||
224 | if (errorAcceptor != null) { | ||
225 | if (transientValues.isValueTransient(semanticObject, ProblemPackage.Literals.EXACT_MULTIPLICITY__EXACT_VALUE) == ValueTransient.YES) | ||
226 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ProblemPackage.Literals.EXACT_MULTIPLICITY__EXACT_VALUE)); | ||
227 | } | ||
228 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
229 | feeder.accept(grammarAccess.getExactMultiplicityAccess().getExactValueINTTerminalRuleCall_0(), semanticObject.getExactValue()); | ||
230 | feeder.finish(); | ||
231 | } | ||
232 | |||
233 | |||
234 | /** | ||
235 | * Contexts: | ||
236 | * Literal returns NegativeLiteral | ||
237 | * NegativeLiteral returns NegativeLiteral | ||
238 | * | ||
239 | * Constraint: | ||
240 | * atom=Atom | ||
241 | */ | ||
242 | protected void sequence_NegativeLiteral(ISerializationContext context, NegativeLiteral semanticObject) { | ||
243 | if (errorAcceptor != null) { | ||
244 | if (transientValues.isValueTransient(semanticObject, ProblemPackage.Literals.NEGATIVE_LITERAL__ATOM) == ValueTransient.YES) | ||
245 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ProblemPackage.Literals.NEGATIVE_LITERAL__ATOM)); | ||
246 | } | ||
247 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
248 | feeder.accept(grammarAccess.getNegativeLiteralAccess().getAtomAtomParserRuleCall_1_0(), semanticObject.getAtom()); | ||
249 | feeder.finish(); | ||
250 | } | ||
251 | |||
252 | |||
253 | /** | ||
254 | * Contexts: | ||
255 | * Parameter returns Parameter | ||
256 | * | ||
257 | * Constraint: | ||
258 | * (parameterType=[Relation|QualifiedName]? name=Identifier) | ||
259 | */ | ||
260 | protected void sequence_Parameter(ISerializationContext context, org.eclipse.viatra.solver.language.model.problem.Parameter semanticObject) { | ||
261 | genericSequencer.createSequence(context, semanticObject); | ||
262 | } | ||
263 | |||
264 | |||
265 | /** | ||
266 | * Contexts: | ||
267 | * Statement returns PredicateDefinition | ||
268 | * PredicateDefinition returns PredicateDefinition | ||
269 | * | ||
270 | * Constraint: | ||
271 | * (error?='error'? name=Identifier (parameters+=Parameter parameters+=Parameter*)? (bodies+=Conjunction bodies+=Conjunction*)?) | ||
272 | */ | ||
273 | protected void sequence_PredicateDefinition(ISerializationContext context, PredicateDefinition semanticObject) { | ||
274 | genericSequencer.createSequence(context, semanticObject); | ||
275 | } | ||
276 | |||
277 | |||
278 | /** | ||
279 | * Contexts: | ||
280 | * Problem returns Problem | ||
281 | * | ||
282 | * Constraint: | ||
283 | * ((name=Identifier statements+=Statement+) | statements+=Statement+)? | ||
284 | */ | ||
285 | protected void sequence_Problem(ISerializationContext context, Problem semanticObject) { | ||
286 | genericSequencer.createSequence(context, semanticObject); | ||
287 | } | ||
288 | |||
289 | |||
290 | /** | ||
291 | * Contexts: | ||
292 | * Multiplicity returns RangeMultiplicity | ||
293 | * DefiniteMultiplicity returns RangeMultiplicity | ||
294 | * RangeMultiplicity returns RangeMultiplicity | ||
295 | * | ||
296 | * Constraint: | ||
297 | * (lowerBound=INT upperBound=UpperBound) | ||
298 | */ | ||
299 | protected void sequence_RangeMultiplicity(ISerializationContext context, RangeMultiplicity semanticObject) { | ||
300 | if (errorAcceptor != null) { | ||
301 | if (transientValues.isValueTransient(semanticObject, ProblemPackage.Literals.RANGE_MULTIPLICITY__LOWER_BOUND) == ValueTransient.YES) | ||
302 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ProblemPackage.Literals.RANGE_MULTIPLICITY__LOWER_BOUND)); | ||
303 | if (transientValues.isValueTransient(semanticObject, ProblemPackage.Literals.RANGE_MULTIPLICITY__UPPER_BOUND) == ValueTransient.YES) | ||
304 | errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ProblemPackage.Literals.RANGE_MULTIPLICITY__UPPER_BOUND)); | ||
305 | } | ||
306 | SequenceFeeder feeder = createSequencerFeeder(context, semanticObject); | ||
307 | feeder.accept(grammarAccess.getRangeMultiplicityAccess().getLowerBoundINTTerminalRuleCall_0_0(), semanticObject.getLowerBound()); | ||
308 | feeder.accept(grammarAccess.getRangeMultiplicityAccess().getUpperBoundUpperBoundParserRuleCall_2_0(), semanticObject.getUpperBound()); | ||
309 | feeder.finish(); | ||
310 | } | ||
311 | |||
312 | |||
313 | /** | ||
314 | * Contexts: | ||
315 | * ReferenceDeclaration returns ReferenceDeclaration | ||
316 | * | ||
317 | * Constraint: | ||
318 | * ( | ||
319 | * containment?='contains'? | ||
320 | * referenceType=[Relation|QualifiedName] | ||
321 | * multiplicity=Multiplicity? | ||
322 | * name=Identifier | ||
323 | * opposite=[ReferenceDeclaration|QualifiedName]? | ||
324 | * ) | ||
325 | */ | ||
326 | protected void sequence_ReferenceDeclaration(ISerializationContext context, ReferenceDeclaration semanticObject) { | ||
327 | genericSequencer.createSequence(context, semanticObject); | ||
328 | } | ||
329 | |||
330 | |||
331 | /** | ||
332 | * Contexts: | ||
333 | * Statement returns ScopeDeclaration | ||
334 | * ScopeDeclaration returns ScopeDeclaration | ||
335 | * | ||
336 | * Constraint: | ||
337 | * (typeScopes+=TypeScope typeScopes+=TypeScope*) | ||
338 | */ | ||
339 | protected void sequence_ScopeDeclaration(ISerializationContext context, ScopeDeclaration semanticObject) { | ||
340 | genericSequencer.createSequence(context, semanticObject); | ||
341 | } | ||
342 | |||
343 | |||
344 | /** | ||
345 | * Contexts: | ||
346 | * TypeScope returns TypeScope | ||
347 | * | ||
348 | * Constraint: | ||
349 | * (targetType=[ClassDeclaration|ID] increment?='+='? multiplicity=DefiniteMultiplicity) | ||
350 | */ | ||
351 | protected void sequence_TypeScope(ISerializationContext context, TypeScope semanticObject) { | ||
352 | genericSequencer.createSequence(context, semanticObject); | ||
353 | } | ||
354 | |||
355 | |||
356 | /** | ||
357 | * Contexts: | ||
358 | * Multiplicity returns UnboundedMultiplicity | ||
359 | * UnboundedMultiplicity returns UnboundedMultiplicity | ||
360 | * | ||
361 | * Constraint: | ||
362 | * {UnboundedMultiplicity} | ||
363 | */ | ||
364 | protected void sequence_UnboundedMultiplicity(ISerializationContext context, UnboundedMultiplicity semanticObject) { | ||
365 | genericSequencer.createSequence(context, semanticObject); | ||
366 | } | ||
367 | |||
368 | |||
369 | } | ||
diff --git a/language/src/main/xtext-gen/org/eclipse/viatra/solver/language/serializer/ProblemSyntacticSequencer.java b/language/src/main/xtext-gen/org/eclipse/viatra/solver/language/serializer/ProblemSyntacticSequencer.java new file mode 100644 index 00000000..3f0a3f05 --- /dev/null +++ b/language/src/main/xtext-gen/org/eclipse/viatra/solver/language/serializer/ProblemSyntacticSequencer.java | |||
@@ -0,0 +1,139 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.26.0.M1 | ||
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.ProblemGrammarAccess; | ||
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 ProblemSyntacticSequencer extends AbstractSyntacticSequencer { | ||
23 | |||
24 | protected ProblemGrammarAccess grammarAccess; | ||
25 | protected AbstractElementAlias match_ClassDeclaration_FullStopKeyword_4_1_or___LeftCurlyBracketKeyword_4_0_0_RightCurlyBracketKeyword_4_0_2__; | ||
26 | protected AbstractElementAlias match_ClassDeclaration_SemicolonKeyword_4_0_1_1_q; | ||
27 | protected AbstractElementAlias match_EnumDeclaration_FullStopKeyword_2_1_or___LeftCurlyBracketKeyword_2_0_0_RightCurlyBracketKeyword_2_0_2__; | ||
28 | protected AbstractElementAlias match_EnumDeclaration___CommaKeyword_2_0_1_2_0_or_SemicolonKeyword_2_0_1_2_1__q; | ||
29 | protected AbstractElementAlias match_PredicateDefinition_PredKeyword_0_0_1_q; | ||
30 | protected AbstractElementAlias match_ReferenceDeclaration_RefersKeyword_0_1_q; | ||
31 | |||
32 | @Inject | ||
33 | protected void init(IGrammarAccess access) { | ||
34 | grammarAccess = (ProblemGrammarAccess) access; | ||
35 | match_ClassDeclaration_FullStopKeyword_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().getFullStopKeyword_4_1())); | ||
36 | match_ClassDeclaration_SemicolonKeyword_4_0_1_1_q = new TokenAlias(false, true, grammarAccess.getClassDeclarationAccess().getSemicolonKeyword_4_0_1_1()); | ||
37 | match_EnumDeclaration_FullStopKeyword_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().getFullStopKeyword_2_1())); | ||
38 | match_EnumDeclaration___CommaKeyword_2_0_1_2_0_or_SemicolonKeyword_2_0_1_2_1__q = new AlternativeAlias(false, true, new TokenAlias(false, false, grammarAccess.getEnumDeclarationAccess().getCommaKeyword_2_0_1_2_0()), new TokenAlias(false, false, grammarAccess.getEnumDeclarationAccess().getSemicolonKeyword_2_0_1_2_1())); | ||
39 | match_PredicateDefinition_PredKeyword_0_0_1_q = new TokenAlias(false, true, grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_0_1()); | ||
40 | match_ReferenceDeclaration_RefersKeyword_0_1_q = new TokenAlias(false, true, grammarAccess.getReferenceDeclarationAccess().getRefersKeyword_0_1()); | ||
41 | } | ||
42 | |||
43 | @Override | ||
44 | protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) { | ||
45 | return ""; | ||
46 | } | ||
47 | |||
48 | |||
49 | @Override | ||
50 | protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) { | ||
51 | if (transition.getAmbiguousSyntaxes().isEmpty()) return; | ||
52 | List<INode> transitionNodes = collectNodes(fromNode, toNode); | ||
53 | for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) { | ||
54 | List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax); | ||
55 | if (match_ClassDeclaration_FullStopKeyword_4_1_or___LeftCurlyBracketKeyword_4_0_0_RightCurlyBracketKeyword_4_0_2__.equals(syntax)) | ||
56 | emit_ClassDeclaration_FullStopKeyword_4_1_or___LeftCurlyBracketKeyword_4_0_0_RightCurlyBracketKeyword_4_0_2__(semanticObject, getLastNavigableState(), syntaxNodes); | ||
57 | else if (match_ClassDeclaration_SemicolonKeyword_4_0_1_1_q.equals(syntax)) | ||
58 | emit_ClassDeclaration_SemicolonKeyword_4_0_1_1_q(semanticObject, getLastNavigableState(), syntaxNodes); | ||
59 | else if (match_EnumDeclaration_FullStopKeyword_2_1_or___LeftCurlyBracketKeyword_2_0_0_RightCurlyBracketKeyword_2_0_2__.equals(syntax)) | ||
60 | emit_EnumDeclaration_FullStopKeyword_2_1_or___LeftCurlyBracketKeyword_2_0_0_RightCurlyBracketKeyword_2_0_2__(semanticObject, getLastNavigableState(), syntaxNodes); | ||
61 | else if (match_EnumDeclaration___CommaKeyword_2_0_1_2_0_or_SemicolonKeyword_2_0_1_2_1__q.equals(syntax)) | ||
62 | emit_EnumDeclaration___CommaKeyword_2_0_1_2_0_or_SemicolonKeyword_2_0_1_2_1__q(semanticObject, getLastNavigableState(), syntaxNodes); | ||
63 | else if (match_PredicateDefinition_PredKeyword_0_0_1_q.equals(syntax)) | ||
64 | emit_PredicateDefinition_PredKeyword_0_0_1_q(semanticObject, getLastNavigableState(), syntaxNodes); | ||
65 | else if (match_ReferenceDeclaration_RefersKeyword_0_1_q.equals(syntax)) | ||
66 | emit_ReferenceDeclaration_RefersKeyword_0_1_q(semanticObject, getLastNavigableState(), syntaxNodes); | ||
67 | else acceptNodes(getLastNavigableState(), syntaxNodes); | ||
68 | } | ||
69 | } | ||
70 | |||
71 | /** | ||
72 | * Ambiguous syntax: | ||
73 | * ('{' '}') | '.' | ||
74 | * | ||
75 | * This ambiguous syntax occurs at: | ||
76 | * name=Identifier (ambiguity) (rule end) | ||
77 | * superTypes+=[Relation|QualifiedName] (ambiguity) (rule end) | ||
78 | */ | ||
79 | protected void emit_ClassDeclaration_FullStopKeyword_4_1_or___LeftCurlyBracketKeyword_4_0_0_RightCurlyBracketKeyword_4_0_2__(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
80 | acceptNodes(transition, nodes); | ||
81 | } | ||
82 | |||
83 | /** | ||
84 | * Ambiguous syntax: | ||
85 | * ';'? | ||
86 | * | ||
87 | * This ambiguous syntax occurs at: | ||
88 | * referenceDeclarations+=ReferenceDeclaration (ambiguity) '}' (rule end) | ||
89 | * referenceDeclarations+=ReferenceDeclaration (ambiguity) referenceDeclarations+=ReferenceDeclaration | ||
90 | */ | ||
91 | protected void emit_ClassDeclaration_SemicolonKeyword_4_0_1_1_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
92 | acceptNodes(transition, nodes); | ||
93 | } | ||
94 | |||
95 | /** | ||
96 | * Ambiguous syntax: | ||
97 | * ('{' '}') | '.' | ||
98 | * | ||
99 | * This ambiguous syntax occurs at: | ||
100 | * name=Identifier (ambiguity) (rule end) | ||
101 | */ | ||
102 | protected void emit_EnumDeclaration_FullStopKeyword_2_1_or___LeftCurlyBracketKeyword_2_0_0_RightCurlyBracketKeyword_2_0_2__(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
103 | acceptNodes(transition, nodes); | ||
104 | } | ||
105 | |||
106 | /** | ||
107 | * Ambiguous syntax: | ||
108 | * (',' | ';')? | ||
109 | * | ||
110 | * This ambiguous syntax occurs at: | ||
111 | * literals+=EnumLiteral (ambiguity) '}' (rule end) | ||
112 | */ | ||
113 | protected void emit_EnumDeclaration___CommaKeyword_2_0_1_2_0_or_SemicolonKeyword_2_0_1_2_1__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
114 | acceptNodes(transition, nodes); | ||
115 | } | ||
116 | |||
117 | /** | ||
118 | * Ambiguous syntax: | ||
119 | * 'pred'? | ||
120 | * | ||
121 | * This ambiguous syntax occurs at: | ||
122 | * error?='error' (ambiguity) name=Identifier | ||
123 | */ | ||
124 | protected void emit_PredicateDefinition_PredKeyword_0_0_1_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
125 | acceptNodes(transition, nodes); | ||
126 | } | ||
127 | |||
128 | /** | ||
129 | * Ambiguous syntax: | ||
130 | * 'refers'? | ||
131 | * | ||
132 | * This ambiguous syntax occurs at: | ||
133 | * (rule start) (ambiguity) referenceType=[Relation|QualifiedName] | ||
134 | */ | ||
135 | protected void emit_ReferenceDeclaration_RefersKeyword_0_1_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { | ||
136 | acceptNodes(transition, nodes); | ||
137 | } | ||
138 | |||
139 | } | ||