diff options
Diffstat (limited to 'org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr')
6 files changed, 7398 insertions, 0 deletions
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/ProblemAntlrTokenFileProvider.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/ProblemAntlrTokenFileProvider.java new file mode 100644 index 00000000..b7ecf3f6 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/ProblemAntlrTokenFileProvider.java | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.26.0.M1 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.parser.antlr; | ||
5 | |||
6 | import java.io.InputStream; | ||
7 | import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider; | ||
8 | |||
9 | public class ProblemAntlrTokenFileProvider implements IAntlrTokenFileProvider { | ||
10 | |||
11 | @Override | ||
12 | public InputStream getAntlrTokenFile() { | ||
13 | ClassLoader classLoader = getClass().getClassLoader(); | ||
14 | return classLoader.getResourceAsStream("org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.tokens"); | ||
15 | } | ||
16 | } | ||
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/ProblemParser.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/ProblemParser.java new file mode 100644 index 00000000..3af86cab --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/ProblemParser.java | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.26.0.M1 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.parser.antlr; | ||
5 | |||
6 | import com.google.inject.Inject; | ||
7 | import org.eclipse.viatra.solver.language.parser.antlr.internal.InternalProblemParser; | ||
8 | import org.eclipse.viatra.solver.language.services.ProblemGrammarAccess; | ||
9 | import org.eclipse.xtext.parser.antlr.AbstractAntlrParser; | ||
10 | import org.eclipse.xtext.parser.antlr.XtextTokenStream; | ||
11 | |||
12 | public class ProblemParser extends AbstractAntlrParser { | ||
13 | |||
14 | @Inject | ||
15 | private ProblemGrammarAccess grammarAccess; | ||
16 | |||
17 | @Override | ||
18 | protected void setInitialHiddenTokens(XtextTokenStream tokenStream) { | ||
19 | tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT"); | ||
20 | } | ||
21 | |||
22 | |||
23 | @Override | ||
24 | protected InternalProblemParser createParser(XtextTokenStream stream) { | ||
25 | return new InternalProblemParser(stream, getGrammarAccess()); | ||
26 | } | ||
27 | |||
28 | @Override | ||
29 | protected String getDefaultRuleName() { | ||
30 | return "Problem"; | ||
31 | } | ||
32 | |||
33 | public ProblemGrammarAccess getGrammarAccess() { | ||
34 | return this.grammarAccess; | ||
35 | } | ||
36 | |||
37 | public void setGrammarAccess(ProblemGrammarAccess grammarAccess) { | ||
38 | this.grammarAccess = grammarAccess; | ||
39 | } | ||
40 | } | ||
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.g b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.g new file mode 100644 index 00000000..61b76835 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.g | |||
@@ -0,0 +1,1522 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.26.0.M1 | ||
3 | */ | ||
4 | grammar InternalProblem; | ||
5 | |||
6 | options { | ||
7 | superClass=AbstractInternalAntlrParser; | ||
8 | } | ||
9 | |||
10 | @lexer::header { | ||
11 | package org.eclipse.viatra.solver.language.parser.antlr.internal; | ||
12 | |||
13 | // Hack: Use our own Lexer superclass by means of import. | ||
14 | // Currently there is no other way to specify the superclass for the lexer. | ||
15 | import org.eclipse.xtext.parser.antlr.Lexer; | ||
16 | } | ||
17 | |||
18 | @parser::header { | ||
19 | package org.eclipse.viatra.solver.language.parser.antlr.internal; | ||
20 | |||
21 | import org.eclipse.xtext.*; | ||
22 | import org.eclipse.xtext.parser.*; | ||
23 | import org.eclipse.xtext.parser.impl.*; | ||
24 | import org.eclipse.emf.ecore.util.EcoreUtil; | ||
25 | import org.eclipse.emf.ecore.EObject; | ||
26 | import org.eclipse.emf.common.util.Enumerator; | ||
27 | import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser; | ||
28 | import org.eclipse.xtext.parser.antlr.XtextTokenStream; | ||
29 | import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; | ||
30 | import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; | ||
31 | import org.eclipse.viatra.solver.language.services.ProblemGrammarAccess; | ||
32 | |||
33 | } | ||
34 | |||
35 | @parser::members { | ||
36 | |||
37 | private ProblemGrammarAccess grammarAccess; | ||
38 | |||
39 | public InternalProblemParser(TokenStream input, ProblemGrammarAccess grammarAccess) { | ||
40 | this(input); | ||
41 | this.grammarAccess = grammarAccess; | ||
42 | registerRules(grammarAccess.getGrammar()); | ||
43 | } | ||
44 | |||
45 | @Override | ||
46 | protected String getFirstRuleName() { | ||
47 | return "Problem"; | ||
48 | } | ||
49 | |||
50 | @Override | ||
51 | protected ProblemGrammarAccess getGrammarAccess() { | ||
52 | return grammarAccess; | ||
53 | } | ||
54 | |||
55 | } | ||
56 | |||
57 | @rulecatch { | ||
58 | catch (RecognitionException re) { | ||
59 | recover(input,re); | ||
60 | appendSkippedTokens(); | ||
61 | } | ||
62 | } | ||
63 | |||
64 | // Entry rule entryRuleProblem | ||
65 | entryRuleProblem returns [EObject current=null]: | ||
66 | { newCompositeNode(grammarAccess.getProblemRule()); } | ||
67 | iv_ruleProblem=ruleProblem | ||
68 | { $current=$iv_ruleProblem.current; } | ||
69 | EOF; | ||
70 | |||
71 | // Rule Problem | ||
72 | ruleProblem returns [EObject current=null] | ||
73 | @init { | ||
74 | enterRule(); | ||
75 | } | ||
76 | @after { | ||
77 | leaveRule(); | ||
78 | }: | ||
79 | ( | ||
80 | ( | ||
81 | { | ||
82 | newCompositeNode(grammarAccess.getProblemAccess().getStatementsStatementParserRuleCall_0()); | ||
83 | } | ||
84 | lv_statements_0_0=ruleStatement | ||
85 | { | ||
86 | if ($current==null) { | ||
87 | $current = createModelElementForParent(grammarAccess.getProblemRule()); | ||
88 | } | ||
89 | add( | ||
90 | $current, | ||
91 | "statements", | ||
92 | lv_statements_0_0, | ||
93 | "org.eclipse.viatra.solver.language.Problem.Statement"); | ||
94 | afterParserOrEnumRuleCall(); | ||
95 | } | ||
96 | ) | ||
97 | )* | ||
98 | ; | ||
99 | |||
100 | // Entry rule entryRuleStatement | ||
101 | entryRuleStatement returns [EObject current=null]: | ||
102 | { newCompositeNode(grammarAccess.getStatementRule()); } | ||
103 | iv_ruleStatement=ruleStatement | ||
104 | { $current=$iv_ruleStatement.current; } | ||
105 | EOF; | ||
106 | |||
107 | // Rule Statement | ||
108 | ruleStatement returns [EObject current=null] | ||
109 | @init { | ||
110 | enterRule(); | ||
111 | } | ||
112 | @after { | ||
113 | leaveRule(); | ||
114 | }: | ||
115 | ( | ||
116 | { | ||
117 | newCompositeNode(grammarAccess.getStatementAccess().getClassDeclarationParserRuleCall_0()); | ||
118 | } | ||
119 | this_ClassDeclaration_0=ruleClassDeclaration | ||
120 | { | ||
121 | $current = $this_ClassDeclaration_0.current; | ||
122 | afterParserOrEnumRuleCall(); | ||
123 | } | ||
124 | | | ||
125 | { | ||
126 | newCompositeNode(grammarAccess.getStatementAccess().getPredicateDefinitionParserRuleCall_1()); | ||
127 | } | ||
128 | this_PredicateDefinition_1=rulePredicateDefinition | ||
129 | { | ||
130 | $current = $this_PredicateDefinition_1.current; | ||
131 | afterParserOrEnumRuleCall(); | ||
132 | } | ||
133 | | | ||
134 | { | ||
135 | newCompositeNode(grammarAccess.getStatementAccess().getAssertionParserRuleCall_2()); | ||
136 | } | ||
137 | this_Assertion_2=ruleAssertion | ||
138 | { | ||
139 | $current = $this_Assertion_2.current; | ||
140 | afterParserOrEnumRuleCall(); | ||
141 | } | ||
142 | | | ||
143 | { | ||
144 | newCompositeNode(grammarAccess.getStatementAccess().getScopeDeclarationParserRuleCall_3()); | ||
145 | } | ||
146 | this_ScopeDeclaration_3=ruleScopeDeclaration | ||
147 | { | ||
148 | $current = $this_ScopeDeclaration_3.current; | ||
149 | afterParserOrEnumRuleCall(); | ||
150 | } | ||
151 | ) | ||
152 | ; | ||
153 | |||
154 | // Entry rule entryRuleClassDeclaration | ||
155 | entryRuleClassDeclaration returns [EObject current=null]: | ||
156 | { newCompositeNode(grammarAccess.getClassDeclarationRule()); } | ||
157 | iv_ruleClassDeclaration=ruleClassDeclaration | ||
158 | { $current=$iv_ruleClassDeclaration.current; } | ||
159 | EOF; | ||
160 | |||
161 | // Rule ClassDeclaration | ||
162 | ruleClassDeclaration returns [EObject current=null] | ||
163 | @init { | ||
164 | enterRule(); | ||
165 | } | ||
166 | @after { | ||
167 | leaveRule(); | ||
168 | }: | ||
169 | ( | ||
170 | ( | ||
171 | ( | ||
172 | lv_abstract_0_0='abstract' | ||
173 | { | ||
174 | newLeafNode(lv_abstract_0_0, grammarAccess.getClassDeclarationAccess().getAbstractAbstractKeyword_0_0()); | ||
175 | } | ||
176 | { | ||
177 | if ($current==null) { | ||
178 | $current = createModelElement(grammarAccess.getClassDeclarationRule()); | ||
179 | } | ||
180 | setWithLastConsumed($current, "abstract", lv_abstract_0_0 != null, "abstract"); | ||
181 | } | ||
182 | ) | ||
183 | )? | ||
184 | otherlv_1='class' | ||
185 | { | ||
186 | newLeafNode(otherlv_1, grammarAccess.getClassDeclarationAccess().getClassKeyword_1()); | ||
187 | } | ||
188 | ( | ||
189 | ( | ||
190 | lv_name_2_0=RULE_ID | ||
191 | { | ||
192 | newLeafNode(lv_name_2_0, grammarAccess.getClassDeclarationAccess().getNameIDTerminalRuleCall_2_0()); | ||
193 | } | ||
194 | { | ||
195 | if ($current==null) { | ||
196 | $current = createModelElement(grammarAccess.getClassDeclarationRule()); | ||
197 | } | ||
198 | setWithLastConsumed( | ||
199 | $current, | ||
200 | "name", | ||
201 | lv_name_2_0, | ||
202 | "org.eclipse.xtext.common.Terminals.ID"); | ||
203 | } | ||
204 | ) | ||
205 | ) | ||
206 | ( | ||
207 | ( | ||
208 | otherlv_3='extends' | ||
209 | { | ||
210 | newLeafNode(otherlv_3, grammarAccess.getClassDeclarationAccess().getExtendsKeyword_3_0_0()); | ||
211 | } | ||
212 | ( | ||
213 | ( | ||
214 | ( | ||
215 | { | ||
216 | if ($current==null) { | ||
217 | $current = createModelElement(grammarAccess.getClassDeclarationRule()); | ||
218 | } | ||
219 | } | ||
220 | otherlv_4=RULE_ID | ||
221 | { | ||
222 | newLeafNode(otherlv_4, grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_0_0()); | ||
223 | } | ||
224 | ) | ||
225 | ) | ||
226 | | | ||
227 | ( | ||
228 | otherlv_5='[' | ||
229 | { | ||
230 | newLeafNode(otherlv_5, grammarAccess.getClassDeclarationAccess().getLeftSquareBracketKeyword_3_0_1_1_0()); | ||
231 | } | ||
232 | ( | ||
233 | ( | ||
234 | ( | ||
235 | { | ||
236 | if ($current==null) { | ||
237 | $current = createModelElement(grammarAccess.getClassDeclarationRule()); | ||
238 | } | ||
239 | } | ||
240 | otherlv_6=RULE_ID | ||
241 | { | ||
242 | newLeafNode(otherlv_6, grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_1_1_0_0()); | ||
243 | } | ||
244 | ) | ||
245 | ) | ||
246 | ( | ||
247 | otherlv_7=',' | ||
248 | { | ||
249 | newLeafNode(otherlv_7, grammarAccess.getClassDeclarationAccess().getCommaKeyword_3_0_1_1_1_1_0()); | ||
250 | } | ||
251 | ( | ||
252 | ( | ||
253 | { | ||
254 | if ($current==null) { | ||
255 | $current = createModelElement(grammarAccess.getClassDeclarationRule()); | ||
256 | } | ||
257 | } | ||
258 | otherlv_8=RULE_ID | ||
259 | { | ||
260 | newLeafNode(otherlv_8, grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_1_1_1_1_0()); | ||
261 | } | ||
262 | ) | ||
263 | ) | ||
264 | )* | ||
265 | )? | ||
266 | otherlv_9=']' | ||
267 | { | ||
268 | newLeafNode(otherlv_9, grammarAccess.getClassDeclarationAccess().getRightSquareBracketKeyword_3_0_1_1_2()); | ||
269 | } | ||
270 | ) | ||
271 | ) | ||
272 | ) | ||
273 | | | ||
274 | ( | ||
275 | ( | ||
276 | { | ||
277 | newCompositeNode(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsReferenceDeclarationParserRuleCall_3_1_0()); | ||
278 | } | ||
279 | lv_referenceDeclarations_10_0=ruleReferenceDeclaration | ||
280 | { | ||
281 | if ($current==null) { | ||
282 | $current = createModelElementForParent(grammarAccess.getClassDeclarationRule()); | ||
283 | } | ||
284 | add( | ||
285 | $current, | ||
286 | "referenceDeclarations", | ||
287 | lv_referenceDeclarations_10_0, | ||
288 | "org.eclipse.viatra.solver.language.Problem.ReferenceDeclaration"); | ||
289 | afterParserOrEnumRuleCall(); | ||
290 | } | ||
291 | ) | ||
292 | ) | ||
293 | )? | ||
294 | ( | ||
295 | otherlv_11=',' | ||
296 | { | ||
297 | newLeafNode(otherlv_11, grammarAccess.getClassDeclarationAccess().getCommaKeyword_4_0()); | ||
298 | } | ||
299 | ( | ||
300 | ( | ||
301 | { | ||
302 | newCompositeNode(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsReferenceDeclarationParserRuleCall_4_1_0()); | ||
303 | } | ||
304 | lv_referenceDeclarations_12_0=ruleReferenceDeclaration | ||
305 | { | ||
306 | if ($current==null) { | ||
307 | $current = createModelElementForParent(grammarAccess.getClassDeclarationRule()); | ||
308 | } | ||
309 | add( | ||
310 | $current, | ||
311 | "referenceDeclarations", | ||
312 | lv_referenceDeclarations_12_0, | ||
313 | "org.eclipse.viatra.solver.language.Problem.ReferenceDeclaration"); | ||
314 | afterParserOrEnumRuleCall(); | ||
315 | } | ||
316 | ) | ||
317 | ) | ||
318 | )* | ||
319 | otherlv_13='.' | ||
320 | { | ||
321 | newLeafNode(otherlv_13, grammarAccess.getClassDeclarationAccess().getFullStopKeyword_5()); | ||
322 | } | ||
323 | ) | ||
324 | ; | ||
325 | |||
326 | // Entry rule entryRuleReferenceDeclaration | ||
327 | entryRuleReferenceDeclaration returns [EObject current=null]: | ||
328 | { newCompositeNode(grammarAccess.getReferenceDeclarationRule()); } | ||
329 | iv_ruleReferenceDeclaration=ruleReferenceDeclaration | ||
330 | { $current=$iv_ruleReferenceDeclaration.current; } | ||
331 | EOF; | ||
332 | |||
333 | // Rule ReferenceDeclaration | ||
334 | ruleReferenceDeclaration returns [EObject current=null] | ||
335 | @init { | ||
336 | enterRule(); | ||
337 | } | ||
338 | @after { | ||
339 | leaveRule(); | ||
340 | }: | ||
341 | ( | ||
342 | ( | ||
343 | ( | ||
344 | ( | ||
345 | lv_containment_0_0='contains' | ||
346 | { | ||
347 | newLeafNode(lv_containment_0_0, grammarAccess.getReferenceDeclarationAccess().getContainmentContainsKeyword_0_0_0()); | ||
348 | } | ||
349 | { | ||
350 | if ($current==null) { | ||
351 | $current = createModelElement(grammarAccess.getReferenceDeclarationRule()); | ||
352 | } | ||
353 | setWithLastConsumed($current, "containment", lv_containment_0_0 != null, "contains"); | ||
354 | } | ||
355 | ) | ||
356 | ) | ||
357 | | | ||
358 | otherlv_1='refers' | ||
359 | { | ||
360 | newLeafNode(otherlv_1, grammarAccess.getReferenceDeclarationAccess().getRefersKeyword_0_1()); | ||
361 | } | ||
362 | ) | ||
363 | ( | ||
364 | ( | ||
365 | { | ||
366 | if ($current==null) { | ||
367 | $current = createModelElement(grammarAccess.getReferenceDeclarationRule()); | ||
368 | } | ||
369 | } | ||
370 | otherlv_2=RULE_ID | ||
371 | { | ||
372 | newLeafNode(otherlv_2, grammarAccess.getReferenceDeclarationAccess().getReferenceTypeClassDeclarationCrossReference_1_0()); | ||
373 | } | ||
374 | ) | ||
375 | ) | ||
376 | otherlv_3='[' | ||
377 | { | ||
378 | newLeafNode(otherlv_3, grammarAccess.getReferenceDeclarationAccess().getLeftSquareBracketKeyword_2()); | ||
379 | } | ||
380 | ( | ||
381 | ( | ||
382 | { | ||
383 | newCompositeNode(grammarAccess.getReferenceDeclarationAccess().getMultiplicityMultiplicityParserRuleCall_3_0()); | ||
384 | } | ||
385 | lv_multiplicity_4_0=ruleMultiplicity | ||
386 | { | ||
387 | if ($current==null) { | ||
388 | $current = createModelElementForParent(grammarAccess.getReferenceDeclarationRule()); | ||
389 | } | ||
390 | set( | ||
391 | $current, | ||
392 | "multiplicity", | ||
393 | lv_multiplicity_4_0, | ||
394 | "org.eclipse.viatra.solver.language.Problem.Multiplicity"); | ||
395 | afterParserOrEnumRuleCall(); | ||
396 | } | ||
397 | ) | ||
398 | ) | ||
399 | otherlv_5=']' | ||
400 | { | ||
401 | newLeafNode(otherlv_5, grammarAccess.getReferenceDeclarationAccess().getRightSquareBracketKeyword_4()); | ||
402 | } | ||
403 | ( | ||
404 | ( | ||
405 | lv_name_6_0=RULE_ID | ||
406 | { | ||
407 | newLeafNode(lv_name_6_0, grammarAccess.getReferenceDeclarationAccess().getNameIDTerminalRuleCall_5_0()); | ||
408 | } | ||
409 | { | ||
410 | if ($current==null) { | ||
411 | $current = createModelElement(grammarAccess.getReferenceDeclarationRule()); | ||
412 | } | ||
413 | setWithLastConsumed( | ||
414 | $current, | ||
415 | "name", | ||
416 | lv_name_6_0, | ||
417 | "org.eclipse.xtext.common.Terminals.ID"); | ||
418 | } | ||
419 | ) | ||
420 | ) | ||
421 | ( | ||
422 | otherlv_7='opposite' | ||
423 | { | ||
424 | newLeafNode(otherlv_7, grammarAccess.getReferenceDeclarationAccess().getOppositeKeyword_6_0()); | ||
425 | } | ||
426 | ( | ||
427 | ( | ||
428 | { | ||
429 | if ($current==null) { | ||
430 | $current = createModelElement(grammarAccess.getReferenceDeclarationRule()); | ||
431 | } | ||
432 | } | ||
433 | { | ||
434 | newCompositeNode(grammarAccess.getReferenceDeclarationAccess().getOppositeReferenceDeclarationCrossReference_6_1_0()); | ||
435 | } | ||
436 | ruleQualifiedName | ||
437 | { | ||
438 | afterParserOrEnumRuleCall(); | ||
439 | } | ||
440 | ) | ||
441 | ) | ||
442 | )? | ||
443 | ) | ||
444 | ; | ||
445 | |||
446 | // Entry rule entryRulePredicateDefinition | ||
447 | entryRulePredicateDefinition returns [EObject current=null]: | ||
448 | { newCompositeNode(grammarAccess.getPredicateDefinitionRule()); } | ||
449 | iv_rulePredicateDefinition=rulePredicateDefinition | ||
450 | { $current=$iv_rulePredicateDefinition.current; } | ||
451 | EOF; | ||
452 | |||
453 | // Rule PredicateDefinition | ||
454 | rulePredicateDefinition returns [EObject current=null] | ||
455 | @init { | ||
456 | enterRule(); | ||
457 | } | ||
458 | @after { | ||
459 | leaveRule(); | ||
460 | }: | ||
461 | ( | ||
462 | ( | ||
463 | ( | ||
464 | ( | ||
465 | ( | ||
466 | lv_error_0_0='error' | ||
467 | { | ||
468 | newLeafNode(lv_error_0_0, grammarAccess.getPredicateDefinitionAccess().getErrorErrorKeyword_0_0_0_0()); | ||
469 | } | ||
470 | { | ||
471 | if ($current==null) { | ||
472 | $current = createModelElement(grammarAccess.getPredicateDefinitionRule()); | ||
473 | } | ||
474 | setWithLastConsumed($current, "error", lv_error_0_0 != null, "error"); | ||
475 | } | ||
476 | ) | ||
477 | ) | ||
478 | ( | ||
479 | otherlv_1='pred' | ||
480 | { | ||
481 | newLeafNode(otherlv_1, grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_0_1()); | ||
482 | } | ||
483 | )? | ||
484 | ) | ||
485 | | | ||
486 | otherlv_2='pred' | ||
487 | { | ||
488 | newLeafNode(otherlv_2, grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_1()); | ||
489 | } | ||
490 | ) | ||
491 | ( | ||
492 | ( | ||
493 | lv_name_3_0=RULE_ID | ||
494 | { | ||
495 | newLeafNode(lv_name_3_0, grammarAccess.getPredicateDefinitionAccess().getNameIDTerminalRuleCall_1_0()); | ||
496 | } | ||
497 | { | ||
498 | if ($current==null) { | ||
499 | $current = createModelElement(grammarAccess.getPredicateDefinitionRule()); | ||
500 | } | ||
501 | setWithLastConsumed( | ||
502 | $current, | ||
503 | "name", | ||
504 | lv_name_3_0, | ||
505 | "org.eclipse.xtext.common.Terminals.ID"); | ||
506 | } | ||
507 | ) | ||
508 | ) | ||
509 | otherlv_4='(' | ||
510 | { | ||
511 | newLeafNode(otherlv_4, grammarAccess.getPredicateDefinitionAccess().getLeftParenthesisKeyword_2()); | ||
512 | } | ||
513 | ( | ||
514 | ( | ||
515 | ( | ||
516 | { | ||
517 | newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getParametersParameterParserRuleCall_3_0_0()); | ||
518 | } | ||
519 | lv_parameters_5_0=ruleParameter | ||
520 | { | ||
521 | if ($current==null) { | ||
522 | $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); | ||
523 | } | ||
524 | add( | ||
525 | $current, | ||
526 | "parameters", | ||
527 | lv_parameters_5_0, | ||
528 | "org.eclipse.viatra.solver.language.Problem.Parameter"); | ||
529 | afterParserOrEnumRuleCall(); | ||
530 | } | ||
531 | ) | ||
532 | ) | ||
533 | ( | ||
534 | otherlv_6=',' | ||
535 | { | ||
536 | newLeafNode(otherlv_6, grammarAccess.getPredicateDefinitionAccess().getCommaKeyword_3_1_0()); | ||
537 | } | ||
538 | ( | ||
539 | ( | ||
540 | { | ||
541 | newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getParametersParameterParserRuleCall_3_1_1_0()); | ||
542 | } | ||
543 | lv_parameters_7_0=ruleParameter | ||
544 | { | ||
545 | if ($current==null) { | ||
546 | $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); | ||
547 | } | ||
548 | add( | ||
549 | $current, | ||
550 | "parameters", | ||
551 | lv_parameters_7_0, | ||
552 | "org.eclipse.viatra.solver.language.Problem.Parameter"); | ||
553 | afterParserOrEnumRuleCall(); | ||
554 | } | ||
555 | ) | ||
556 | ) | ||
557 | )* | ||
558 | )? | ||
559 | otherlv_8=')' | ||
560 | { | ||
561 | newLeafNode(otherlv_8, grammarAccess.getPredicateDefinitionAccess().getRightParenthesisKeyword_4()); | ||
562 | } | ||
563 | ( | ||
564 | otherlv_9=':=' | ||
565 | { | ||
566 | newLeafNode(otherlv_9, grammarAccess.getPredicateDefinitionAccess().getColonEqualsSignKeyword_5_0()); | ||
567 | } | ||
568 | ( | ||
569 | ( | ||
570 | { | ||
571 | newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getBodiesConjunctionParserRuleCall_5_1_0()); | ||
572 | } | ||
573 | lv_bodies_10_0=ruleConjunction | ||
574 | { | ||
575 | if ($current==null) { | ||
576 | $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); | ||
577 | } | ||
578 | add( | ||
579 | $current, | ||
580 | "bodies", | ||
581 | lv_bodies_10_0, | ||
582 | "org.eclipse.viatra.solver.language.Problem.Conjunction"); | ||
583 | afterParserOrEnumRuleCall(); | ||
584 | } | ||
585 | ) | ||
586 | ) | ||
587 | ( | ||
588 | otherlv_11=';' | ||
589 | { | ||
590 | newLeafNode(otherlv_11, grammarAccess.getPredicateDefinitionAccess().getSemicolonKeyword_5_2_0()); | ||
591 | } | ||
592 | ( | ||
593 | ( | ||
594 | { | ||
595 | newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getBodiesConjunctionParserRuleCall_5_2_1_0()); | ||
596 | } | ||
597 | lv_bodies_12_0=ruleConjunction | ||
598 | { | ||
599 | if ($current==null) { | ||
600 | $current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); | ||
601 | } | ||
602 | add( | ||
603 | $current, | ||
604 | "bodies", | ||
605 | lv_bodies_12_0, | ||
606 | "org.eclipse.viatra.solver.language.Problem.Conjunction"); | ||
607 | afterParserOrEnumRuleCall(); | ||
608 | } | ||
609 | ) | ||
610 | ) | ||
611 | )* | ||
612 | )? | ||
613 | otherlv_13='.' | ||
614 | { | ||
615 | newLeafNode(otherlv_13, grammarAccess.getPredicateDefinitionAccess().getFullStopKeyword_6()); | ||
616 | } | ||
617 | ) | ||
618 | ; | ||
619 | |||
620 | // Entry rule entryRuleParameter | ||
621 | entryRuleParameter returns [EObject current=null]: | ||
622 | { newCompositeNode(grammarAccess.getParameterRule()); } | ||
623 | iv_ruleParameter=ruleParameter | ||
624 | { $current=$iv_ruleParameter.current; } | ||
625 | EOF; | ||
626 | |||
627 | // Rule Parameter | ||
628 | ruleParameter returns [EObject current=null] | ||
629 | @init { | ||
630 | enterRule(); | ||
631 | } | ||
632 | @after { | ||
633 | leaveRule(); | ||
634 | }: | ||
635 | ( | ||
636 | ( | ||
637 | ( | ||
638 | { | ||
639 | if ($current==null) { | ||
640 | $current = createModelElement(grammarAccess.getParameterRule()); | ||
641 | } | ||
642 | } | ||
643 | otherlv_0=RULE_ID | ||
644 | { | ||
645 | newLeafNode(otherlv_0, grammarAccess.getParameterAccess().getParameterTypeClassDeclarationCrossReference_0_0()); | ||
646 | } | ||
647 | ) | ||
648 | ) | ||
649 | ( | ||
650 | ( | ||
651 | lv_name_1_0=RULE_ID | ||
652 | { | ||
653 | newLeafNode(lv_name_1_0, grammarAccess.getParameterAccess().getNameIDTerminalRuleCall_1_0()); | ||
654 | } | ||
655 | { | ||
656 | if ($current==null) { | ||
657 | $current = createModelElement(grammarAccess.getParameterRule()); | ||
658 | } | ||
659 | setWithLastConsumed( | ||
660 | $current, | ||
661 | "name", | ||
662 | lv_name_1_0, | ||
663 | "org.eclipse.xtext.common.Terminals.ID"); | ||
664 | } | ||
665 | ) | ||
666 | ) | ||
667 | ) | ||
668 | ; | ||
669 | |||
670 | // Entry rule entryRuleConjunction | ||
671 | entryRuleConjunction returns [EObject current=null]: | ||
672 | { newCompositeNode(grammarAccess.getConjunctionRule()); } | ||
673 | iv_ruleConjunction=ruleConjunction | ||
674 | { $current=$iv_ruleConjunction.current; } | ||
675 | EOF; | ||
676 | |||
677 | // Rule Conjunction | ||
678 | ruleConjunction returns [EObject current=null] | ||
679 | @init { | ||
680 | enterRule(); | ||
681 | } | ||
682 | @after { | ||
683 | leaveRule(); | ||
684 | }: | ||
685 | ( | ||
686 | ( | ||
687 | ( | ||
688 | { | ||
689 | newCompositeNode(grammarAccess.getConjunctionAccess().getLiteralsLiteralParserRuleCall_0_0()); | ||
690 | } | ||
691 | lv_literals_0_0=ruleLiteral | ||
692 | { | ||
693 | if ($current==null) { | ||
694 | $current = createModelElementForParent(grammarAccess.getConjunctionRule()); | ||
695 | } | ||
696 | add( | ||
697 | $current, | ||
698 | "literals", | ||
699 | lv_literals_0_0, | ||
700 | "org.eclipse.viatra.solver.language.Problem.Literal"); | ||
701 | afterParserOrEnumRuleCall(); | ||
702 | } | ||
703 | ) | ||
704 | ) | ||
705 | ( | ||
706 | otherlv_1=',' | ||
707 | { | ||
708 | newLeafNode(otherlv_1, grammarAccess.getConjunctionAccess().getCommaKeyword_1_0()); | ||
709 | } | ||
710 | ( | ||
711 | ( | ||
712 | { | ||
713 | newCompositeNode(grammarAccess.getConjunctionAccess().getLiteralsLiteralParserRuleCall_1_1_0()); | ||
714 | } | ||
715 | lv_literals_2_0=ruleLiteral | ||
716 | { | ||
717 | if ($current==null) { | ||
718 | $current = createModelElementForParent(grammarAccess.getConjunctionRule()); | ||
719 | } | ||
720 | add( | ||
721 | $current, | ||
722 | "literals", | ||
723 | lv_literals_2_0, | ||
724 | "org.eclipse.viatra.solver.language.Problem.Literal"); | ||
725 | afterParserOrEnumRuleCall(); | ||
726 | } | ||
727 | ) | ||
728 | ) | ||
729 | )* | ||
730 | ) | ||
731 | ; | ||
732 | |||
733 | // Entry rule entryRuleLiteral | ||
734 | entryRuleLiteral returns [EObject current=null]: | ||
735 | { newCompositeNode(grammarAccess.getLiteralRule()); } | ||
736 | iv_ruleLiteral=ruleLiteral | ||
737 | { $current=$iv_ruleLiteral.current; } | ||
738 | EOF; | ||
739 | |||
740 | // Rule Literal | ||
741 | ruleLiteral returns [EObject current=null] | ||
742 | @init { | ||
743 | enterRule(); | ||
744 | } | ||
745 | @after { | ||
746 | leaveRule(); | ||
747 | }: | ||
748 | ( | ||
749 | { | ||
750 | newCompositeNode(grammarAccess.getLiteralAccess().getAtomParserRuleCall_0()); | ||
751 | } | ||
752 | this_Atom_0=ruleAtom | ||
753 | { | ||
754 | $current = $this_Atom_0.current; | ||
755 | afterParserOrEnumRuleCall(); | ||
756 | } | ||
757 | | | ||
758 | { | ||
759 | newCompositeNode(grammarAccess.getLiteralAccess().getNegativeLiteralParserRuleCall_1()); | ||
760 | } | ||
761 | this_NegativeLiteral_1=ruleNegativeLiteral | ||
762 | { | ||
763 | $current = $this_NegativeLiteral_1.current; | ||
764 | afterParserOrEnumRuleCall(); | ||
765 | } | ||
766 | ) | ||
767 | ; | ||
768 | |||
769 | // Entry rule entryRuleNegativeLiteral | ||
770 | entryRuleNegativeLiteral returns [EObject current=null]: | ||
771 | { newCompositeNode(grammarAccess.getNegativeLiteralRule()); } | ||
772 | iv_ruleNegativeLiteral=ruleNegativeLiteral | ||
773 | { $current=$iv_ruleNegativeLiteral.current; } | ||
774 | EOF; | ||
775 | |||
776 | // Rule NegativeLiteral | ||
777 | ruleNegativeLiteral returns [EObject current=null] | ||
778 | @init { | ||
779 | enterRule(); | ||
780 | } | ||
781 | @after { | ||
782 | leaveRule(); | ||
783 | }: | ||
784 | ( | ||
785 | otherlv_0='!' | ||
786 | { | ||
787 | newLeafNode(otherlv_0, grammarAccess.getNegativeLiteralAccess().getExclamationMarkKeyword_0()); | ||
788 | } | ||
789 | ( | ||
790 | ( | ||
791 | { | ||
792 | newCompositeNode(grammarAccess.getNegativeLiteralAccess().getAtomAtomParserRuleCall_1_0()); | ||
793 | } | ||
794 | lv_atom_1_0=ruleAtom | ||
795 | { | ||
796 | if ($current==null) { | ||
797 | $current = createModelElementForParent(grammarAccess.getNegativeLiteralRule()); | ||
798 | } | ||
799 | set( | ||
800 | $current, | ||
801 | "atom", | ||
802 | lv_atom_1_0, | ||
803 | "org.eclipse.viatra.solver.language.Problem.Atom"); | ||
804 | afterParserOrEnumRuleCall(); | ||
805 | } | ||
806 | ) | ||
807 | ) | ||
808 | ) | ||
809 | ; | ||
810 | |||
811 | // Entry rule entryRuleAtom | ||
812 | entryRuleAtom returns [EObject current=null]: | ||
813 | { newCompositeNode(grammarAccess.getAtomRule()); } | ||
814 | iv_ruleAtom=ruleAtom | ||
815 | { $current=$iv_ruleAtom.current; } | ||
816 | EOF; | ||
817 | |||
818 | // Rule Atom | ||
819 | ruleAtom returns [EObject current=null] | ||
820 | @init { | ||
821 | enterRule(); | ||
822 | } | ||
823 | @after { | ||
824 | leaveRule(); | ||
825 | }: | ||
826 | ( | ||
827 | ( | ||
828 | ( | ||
829 | { | ||
830 | if ($current==null) { | ||
831 | $current = createModelElement(grammarAccess.getAtomRule()); | ||
832 | } | ||
833 | } | ||
834 | { | ||
835 | newCompositeNode(grammarAccess.getAtomAccess().getRelationRelationCrossReference_0_0()); | ||
836 | } | ||
837 | ruleQualifiedName | ||
838 | { | ||
839 | afterParserOrEnumRuleCall(); | ||
840 | } | ||
841 | ) | ||
842 | ) | ||
843 | ( | ||
844 | ( | ||
845 | lv_transitiveClosure_1_0='+' | ||
846 | { | ||
847 | newLeafNode(lv_transitiveClosure_1_0, grammarAccess.getAtomAccess().getTransitiveClosurePlusSignKeyword_1_0()); | ||
848 | } | ||
849 | { | ||
850 | if ($current==null) { | ||
851 | $current = createModelElement(grammarAccess.getAtomRule()); | ||
852 | } | ||
853 | setWithLastConsumed($current, "transitiveClosure", lv_transitiveClosure_1_0 != null, "+"); | ||
854 | } | ||
855 | ) | ||
856 | )? | ||
857 | otherlv_2='(' | ||
858 | { | ||
859 | newLeafNode(otherlv_2, grammarAccess.getAtomAccess().getLeftParenthesisKeyword_2()); | ||
860 | } | ||
861 | ( | ||
862 | ( | ||
863 | ( | ||
864 | { | ||
865 | if ($current==null) { | ||
866 | $current = createModelElement(grammarAccess.getAtomRule()); | ||
867 | } | ||
868 | } | ||
869 | otherlv_3=RULE_ID | ||
870 | { | ||
871 | newLeafNode(otherlv_3, grammarAccess.getAtomAccess().getArgumentsVariableCrossReference_3_0_0()); | ||
872 | } | ||
873 | ) | ||
874 | ) | ||
875 | ( | ||
876 | otherlv_4=',' | ||
877 | { | ||
878 | newLeafNode(otherlv_4, grammarAccess.getAtomAccess().getCommaKeyword_3_1_0()); | ||
879 | } | ||
880 | ( | ||
881 | ( | ||
882 | { | ||
883 | if ($current==null) { | ||
884 | $current = createModelElement(grammarAccess.getAtomRule()); | ||
885 | } | ||
886 | } | ||
887 | otherlv_5=RULE_ID | ||
888 | { | ||
889 | newLeafNode(otherlv_5, grammarAccess.getAtomAccess().getArgumentsVariableCrossReference_3_1_1_0()); | ||
890 | } | ||
891 | ) | ||
892 | ) | ||
893 | )* | ||
894 | )? | ||
895 | otherlv_6=')' | ||
896 | { | ||
897 | newLeafNode(otherlv_6, grammarAccess.getAtomAccess().getRightParenthesisKeyword_4()); | ||
898 | } | ||
899 | ) | ||
900 | ; | ||
901 | |||
902 | // Entry rule entryRuleAssertion | ||
903 | entryRuleAssertion returns [EObject current=null]: | ||
904 | { newCompositeNode(grammarAccess.getAssertionRule()); } | ||
905 | iv_ruleAssertion=ruleAssertion | ||
906 | { $current=$iv_ruleAssertion.current; } | ||
907 | EOF; | ||
908 | |||
909 | // Rule Assertion | ||
910 | ruleAssertion returns [EObject current=null] | ||
911 | @init { | ||
912 | enterRule(); | ||
913 | } | ||
914 | @after { | ||
915 | leaveRule(); | ||
916 | }: | ||
917 | ( | ||
918 | ( | ||
919 | ( | ||
920 | ( | ||
921 | ( | ||
922 | { | ||
923 | if ($current==null) { | ||
924 | $current = createModelElement(grammarAccess.getAssertionRule()); | ||
925 | } | ||
926 | } | ||
927 | { | ||
928 | newCompositeNode(grammarAccess.getAssertionAccess().getRelationRelationCrossReference_0_0_0_0()); | ||
929 | } | ||
930 | ruleQualifiedName | ||
931 | { | ||
932 | afterParserOrEnumRuleCall(); | ||
933 | } | ||
934 | ) | ||
935 | ) | ||
936 | otherlv_1='(' | ||
937 | { | ||
938 | newLeafNode(otherlv_1, grammarAccess.getAssertionAccess().getLeftParenthesisKeyword_0_0_1()); | ||
939 | } | ||
940 | ( | ||
941 | ( | ||
942 | ( | ||
943 | { | ||
944 | if ($current==null) { | ||
945 | $current = createModelElement(grammarAccess.getAssertionRule()); | ||
946 | } | ||
947 | } | ||
948 | { | ||
949 | newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_0_2_0_0()); | ||
950 | } | ||
951 | ruleQualifiedName | ||
952 | { | ||
953 | afterParserOrEnumRuleCall(); | ||
954 | } | ||
955 | ) | ||
956 | ) | ||
957 | ( | ||
958 | otherlv_3=',' | ||
959 | { | ||
960 | newLeafNode(otherlv_3, grammarAccess.getAssertionAccess().getCommaKeyword_0_0_2_1_0()); | ||
961 | } | ||
962 | ( | ||
963 | ( | ||
964 | { | ||
965 | if ($current==null) { | ||
966 | $current = createModelElement(grammarAccess.getAssertionRule()); | ||
967 | } | ||
968 | } | ||
969 | { | ||
970 | newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_0_2_1_1_0()); | ||
971 | } | ||
972 | ruleQualifiedName | ||
973 | { | ||
974 | afterParserOrEnumRuleCall(); | ||
975 | } | ||
976 | ) | ||
977 | ) | ||
978 | )* | ||
979 | )? | ||
980 | otherlv_5=')' | ||
981 | { | ||
982 | newLeafNode(otherlv_5, grammarAccess.getAssertionAccess().getRightParenthesisKeyword_0_0_3()); | ||
983 | } | ||
984 | otherlv_6=':' | ||
985 | { | ||
986 | newLeafNode(otherlv_6, grammarAccess.getAssertionAccess().getColonKeyword_0_0_4()); | ||
987 | } | ||
988 | ( | ||
989 | ( | ||
990 | { | ||
991 | newCompositeNode(grammarAccess.getAssertionAccess().getValueLogicValueEnumRuleCall_0_0_5_0()); | ||
992 | } | ||
993 | lv_value_7_0=ruleLogicValue | ||
994 | { | ||
995 | if ($current==null) { | ||
996 | $current = createModelElementForParent(grammarAccess.getAssertionRule()); | ||
997 | } | ||
998 | set( | ||
999 | $current, | ||
1000 | "value", | ||
1001 | lv_value_7_0, | ||
1002 | "org.eclipse.viatra.solver.language.Problem.LogicValue"); | ||
1003 | afterParserOrEnumRuleCall(); | ||
1004 | } | ||
1005 | ) | ||
1006 | ) | ||
1007 | ) | ||
1008 | | | ||
1009 | ( | ||
1010 | ( | ||
1011 | ( | ||
1012 | { | ||
1013 | newCompositeNode(grammarAccess.getAssertionAccess().getValueShortLogicValueEnumRuleCall_0_1_0_0()); | ||
1014 | } | ||
1015 | lv_value_8_0=ruleShortLogicValue | ||
1016 | { | ||
1017 | if ($current==null) { | ||
1018 | $current = createModelElementForParent(grammarAccess.getAssertionRule()); | ||
1019 | } | ||
1020 | set( | ||
1021 | $current, | ||
1022 | "value", | ||
1023 | lv_value_8_0, | ||
1024 | "org.eclipse.viatra.solver.language.Problem.ShortLogicValue"); | ||
1025 | afterParserOrEnumRuleCall(); | ||
1026 | } | ||
1027 | ) | ||
1028 | )? | ||
1029 | ( | ||
1030 | ( | ||
1031 | { | ||
1032 | if ($current==null) { | ||
1033 | $current = createModelElement(grammarAccess.getAssertionRule()); | ||
1034 | } | ||
1035 | } | ||
1036 | { | ||
1037 | newCompositeNode(grammarAccess.getAssertionAccess().getRelationRelationCrossReference_0_1_1_0()); | ||
1038 | } | ||
1039 | ruleQualifiedName | ||
1040 | { | ||
1041 | afterParserOrEnumRuleCall(); | ||
1042 | } | ||
1043 | ) | ||
1044 | ) | ||
1045 | otherlv_10='(' | ||
1046 | { | ||
1047 | newLeafNode(otherlv_10, grammarAccess.getAssertionAccess().getLeftParenthesisKeyword_0_1_2()); | ||
1048 | } | ||
1049 | ( | ||
1050 | ( | ||
1051 | ( | ||
1052 | { | ||
1053 | if ($current==null) { | ||
1054 | $current = createModelElement(grammarAccess.getAssertionRule()); | ||
1055 | } | ||
1056 | } | ||
1057 | { | ||
1058 | newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_1_3_0_0()); | ||
1059 | } | ||
1060 | ruleQualifiedName | ||
1061 | { | ||
1062 | afterParserOrEnumRuleCall(); | ||
1063 | } | ||
1064 | ) | ||
1065 | ) | ||
1066 | ( | ||
1067 | otherlv_12=',' | ||
1068 | { | ||
1069 | newLeafNode(otherlv_12, grammarAccess.getAssertionAccess().getCommaKeyword_0_1_3_1_0()); | ||
1070 | } | ||
1071 | ( | ||
1072 | ( | ||
1073 | { | ||
1074 | if ($current==null) { | ||
1075 | $current = createModelElement(grammarAccess.getAssertionRule()); | ||
1076 | } | ||
1077 | } | ||
1078 | { | ||
1079 | newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_1_3_1_1_0()); | ||
1080 | } | ||
1081 | ruleQualifiedName | ||
1082 | { | ||
1083 | afterParserOrEnumRuleCall(); | ||
1084 | } | ||
1085 | ) | ||
1086 | ) | ||
1087 | )* | ||
1088 | )? | ||
1089 | otherlv_14=')' | ||
1090 | { | ||
1091 | newLeafNode(otherlv_14, grammarAccess.getAssertionAccess().getRightParenthesisKeyword_0_1_4()); | ||
1092 | } | ||
1093 | ) | ||
1094 | ) | ||
1095 | otherlv_15='.' | ||
1096 | { | ||
1097 | newLeafNode(otherlv_15, grammarAccess.getAssertionAccess().getFullStopKeyword_1()); | ||
1098 | } | ||
1099 | ) | ||
1100 | ; | ||
1101 | |||
1102 | // Entry rule entryRuleScopeDeclaration | ||
1103 | entryRuleScopeDeclaration returns [EObject current=null]: | ||
1104 | { newCompositeNode(grammarAccess.getScopeDeclarationRule()); } | ||
1105 | iv_ruleScopeDeclaration=ruleScopeDeclaration | ||
1106 | { $current=$iv_ruleScopeDeclaration.current; } | ||
1107 | EOF; | ||
1108 | |||
1109 | // Rule ScopeDeclaration | ||
1110 | ruleScopeDeclaration returns [EObject current=null] | ||
1111 | @init { | ||
1112 | enterRule(); | ||
1113 | } | ||
1114 | @after { | ||
1115 | leaveRule(); | ||
1116 | }: | ||
1117 | ( | ||
1118 | otherlv_0='scope' | ||
1119 | { | ||
1120 | newLeafNode(otherlv_0, grammarAccess.getScopeDeclarationAccess().getScopeKeyword_0()); | ||
1121 | } | ||
1122 | ( | ||
1123 | ( | ||
1124 | { | ||
1125 | newCompositeNode(grammarAccess.getScopeDeclarationAccess().getTypeScopesTypeScopeParserRuleCall_1_0()); | ||
1126 | } | ||
1127 | lv_typeScopes_1_0=ruleTypeScope | ||
1128 | { | ||
1129 | if ($current==null) { | ||
1130 | $current = createModelElementForParent(grammarAccess.getScopeDeclarationRule()); | ||
1131 | } | ||
1132 | add( | ||
1133 | $current, | ||
1134 | "typeScopes", | ||
1135 | lv_typeScopes_1_0, | ||
1136 | "org.eclipse.viatra.solver.language.Problem.TypeScope"); | ||
1137 | afterParserOrEnumRuleCall(); | ||
1138 | } | ||
1139 | ) | ||
1140 | ) | ||
1141 | ( | ||
1142 | otherlv_2=',' | ||
1143 | { | ||
1144 | newLeafNode(otherlv_2, grammarAccess.getScopeDeclarationAccess().getCommaKeyword_2_0()); | ||
1145 | } | ||
1146 | ( | ||
1147 | ( | ||
1148 | { | ||
1149 | newCompositeNode(grammarAccess.getScopeDeclarationAccess().getTypeScopesTypeScopeParserRuleCall_2_1_0()); | ||
1150 | } | ||
1151 | lv_typeScopes_3_0=ruleTypeScope | ||
1152 | { | ||
1153 | if ($current==null) { | ||
1154 | $current = createModelElementForParent(grammarAccess.getScopeDeclarationRule()); | ||
1155 | } | ||
1156 | add( | ||
1157 | $current, | ||
1158 | "typeScopes", | ||
1159 | lv_typeScopes_3_0, | ||
1160 | "org.eclipse.viatra.solver.language.Problem.TypeScope"); | ||
1161 | afterParserOrEnumRuleCall(); | ||
1162 | } | ||
1163 | ) | ||
1164 | ) | ||
1165 | )* | ||
1166 | otherlv_4='.' | ||
1167 | { | ||
1168 | newLeafNode(otherlv_4, grammarAccess.getScopeDeclarationAccess().getFullStopKeyword_3()); | ||
1169 | } | ||
1170 | ) | ||
1171 | ; | ||
1172 | |||
1173 | // Entry rule entryRuleTypeScope | ||
1174 | entryRuleTypeScope returns [EObject current=null]: | ||
1175 | { newCompositeNode(grammarAccess.getTypeScopeRule()); } | ||
1176 | iv_ruleTypeScope=ruleTypeScope | ||
1177 | { $current=$iv_ruleTypeScope.current; } | ||
1178 | EOF; | ||
1179 | |||
1180 | // Rule TypeScope | ||
1181 | ruleTypeScope returns [EObject current=null] | ||
1182 | @init { | ||
1183 | enterRule(); | ||
1184 | } | ||
1185 | @after { | ||
1186 | leaveRule(); | ||
1187 | }: | ||
1188 | ( | ||
1189 | ( | ||
1190 | ( | ||
1191 | { | ||
1192 | if ($current==null) { | ||
1193 | $current = createModelElement(grammarAccess.getTypeScopeRule()); | ||
1194 | } | ||
1195 | } | ||
1196 | otherlv_0=RULE_ID | ||
1197 | { | ||
1198 | newLeafNode(otherlv_0, grammarAccess.getTypeScopeAccess().getTargetTypeClassDeclarationCrossReference_0_0()); | ||
1199 | } | ||
1200 | ) | ||
1201 | ) | ||
1202 | ( | ||
1203 | ( | ||
1204 | ( | ||
1205 | lv_increment_1_0='+=' | ||
1206 | { | ||
1207 | newLeafNode(lv_increment_1_0, grammarAccess.getTypeScopeAccess().getIncrementPlusSignEqualsSignKeyword_1_0_0()); | ||
1208 | } | ||
1209 | { | ||
1210 | if ($current==null) { | ||
1211 | $current = createModelElement(grammarAccess.getTypeScopeRule()); | ||
1212 | } | ||
1213 | setWithLastConsumed($current, "increment", lv_increment_1_0 != null, "+="); | ||
1214 | } | ||
1215 | ) | ||
1216 | ) | ||
1217 | | | ||
1218 | otherlv_2='=' | ||
1219 | { | ||
1220 | newLeafNode(otherlv_2, grammarAccess.getTypeScopeAccess().getEqualsSignKeyword_1_1()); | ||
1221 | } | ||
1222 | ) | ||
1223 | ( | ||
1224 | ( | ||
1225 | { | ||
1226 | newCompositeNode(grammarAccess.getTypeScopeAccess().getMultiplicityMultiplicityParserRuleCall_2_0()); | ||
1227 | } | ||
1228 | lv_multiplicity_3_0=ruleMultiplicity | ||
1229 | { | ||
1230 | if ($current==null) { | ||
1231 | $current = createModelElementForParent(grammarAccess.getTypeScopeRule()); | ||
1232 | } | ||
1233 | set( | ||
1234 | $current, | ||
1235 | "multiplicity", | ||
1236 | lv_multiplicity_3_0, | ||
1237 | "org.eclipse.viatra.solver.language.Problem.Multiplicity"); | ||
1238 | afterParserOrEnumRuleCall(); | ||
1239 | } | ||
1240 | ) | ||
1241 | ) | ||
1242 | ) | ||
1243 | ; | ||
1244 | |||
1245 | // Entry rule entryRuleMultiplicity | ||
1246 | entryRuleMultiplicity returns [EObject current=null]: | ||
1247 | { newCompositeNode(grammarAccess.getMultiplicityRule()); } | ||
1248 | iv_ruleMultiplicity=ruleMultiplicity | ||
1249 | { $current=$iv_ruleMultiplicity.current; } | ||
1250 | EOF; | ||
1251 | |||
1252 | // Rule Multiplicity | ||
1253 | ruleMultiplicity returns [EObject current=null] | ||
1254 | @init { | ||
1255 | enterRule(); | ||
1256 | } | ||
1257 | @after { | ||
1258 | leaveRule(); | ||
1259 | }: | ||
1260 | ( | ||
1261 | { | ||
1262 | newCompositeNode(grammarAccess.getMultiplicityAccess().getRangeMultiplicityParserRuleCall_0()); | ||
1263 | } | ||
1264 | this_RangeMultiplicity_0=ruleRangeMultiplicity | ||
1265 | { | ||
1266 | $current = $this_RangeMultiplicity_0.current; | ||
1267 | afterParserOrEnumRuleCall(); | ||
1268 | } | ||
1269 | | | ||
1270 | { | ||
1271 | newCompositeNode(grammarAccess.getMultiplicityAccess().getExactMultiplicityParserRuleCall_1()); | ||
1272 | } | ||
1273 | this_ExactMultiplicity_1=ruleExactMultiplicity | ||
1274 | { | ||
1275 | $current = $this_ExactMultiplicity_1.current; | ||
1276 | afterParserOrEnumRuleCall(); | ||
1277 | } | ||
1278 | ) | ||
1279 | ; | ||
1280 | |||
1281 | // Entry rule entryRuleRangeMultiplicity | ||
1282 | entryRuleRangeMultiplicity returns [EObject current=null]: | ||
1283 | { newCompositeNode(grammarAccess.getRangeMultiplicityRule()); } | ||
1284 | iv_ruleRangeMultiplicity=ruleRangeMultiplicity | ||
1285 | { $current=$iv_ruleRangeMultiplicity.current; } | ||
1286 | EOF; | ||
1287 | |||
1288 | // Rule RangeMultiplicity | ||
1289 | ruleRangeMultiplicity returns [EObject current=null] | ||
1290 | @init { | ||
1291 | enterRule(); | ||
1292 | } | ||
1293 | @after { | ||
1294 | leaveRule(); | ||
1295 | }: | ||
1296 | ( | ||
1297 | ( | ||
1298 | ( | ||
1299 | lv_lowerBound_0_0=RULE_INT | ||
1300 | { | ||
1301 | newLeafNode(lv_lowerBound_0_0, grammarAccess.getRangeMultiplicityAccess().getLowerBoundINTTerminalRuleCall_0_0()); | ||
1302 | } | ||
1303 | { | ||
1304 | if ($current==null) { | ||
1305 | $current = createModelElement(grammarAccess.getRangeMultiplicityRule()); | ||
1306 | } | ||
1307 | setWithLastConsumed( | ||
1308 | $current, | ||
1309 | "lowerBound", | ||
1310 | lv_lowerBound_0_0, | ||
1311 | "org.eclipse.xtext.common.Terminals.INT"); | ||
1312 | } | ||
1313 | ) | ||
1314 | ) | ||
1315 | otherlv_1='..' | ||
1316 | { | ||
1317 | newLeafNode(otherlv_1, grammarAccess.getRangeMultiplicityAccess().getFullStopFullStopKeyword_1()); | ||
1318 | } | ||
1319 | ( | ||
1320 | ( | ||
1321 | { | ||
1322 | newCompositeNode(grammarAccess.getRangeMultiplicityAccess().getUpperBoundUpperBoundParserRuleCall_2_0()); | ||
1323 | } | ||
1324 | lv_upperBound_2_0=ruleUpperBound | ||
1325 | { | ||
1326 | if ($current==null) { | ||
1327 | $current = createModelElementForParent(grammarAccess.getRangeMultiplicityRule()); | ||
1328 | } | ||
1329 | set( | ||
1330 | $current, | ||
1331 | "upperBound", | ||
1332 | lv_upperBound_2_0, | ||
1333 | "org.eclipse.viatra.solver.language.Problem.UpperBound"); | ||
1334 | afterParserOrEnumRuleCall(); | ||
1335 | } | ||
1336 | ) | ||
1337 | ) | ||
1338 | ) | ||
1339 | ; | ||
1340 | |||
1341 | // Entry rule entryRuleExactMultiplicity | ||
1342 | entryRuleExactMultiplicity returns [EObject current=null]: | ||
1343 | { newCompositeNode(grammarAccess.getExactMultiplicityRule()); } | ||
1344 | iv_ruleExactMultiplicity=ruleExactMultiplicity | ||
1345 | { $current=$iv_ruleExactMultiplicity.current; } | ||
1346 | EOF; | ||
1347 | |||
1348 | // Rule ExactMultiplicity | ||
1349 | ruleExactMultiplicity returns [EObject current=null] | ||
1350 | @init { | ||
1351 | enterRule(); | ||
1352 | } | ||
1353 | @after { | ||
1354 | leaveRule(); | ||
1355 | }: | ||
1356 | ( | ||
1357 | ( | ||
1358 | lv_exactValue_0_0=RULE_INT | ||
1359 | { | ||
1360 | newLeafNode(lv_exactValue_0_0, grammarAccess.getExactMultiplicityAccess().getExactValueINTTerminalRuleCall_0()); | ||
1361 | } | ||
1362 | { | ||
1363 | if ($current==null) { | ||
1364 | $current = createModelElement(grammarAccess.getExactMultiplicityRule()); | ||
1365 | } | ||
1366 | setWithLastConsumed( | ||
1367 | $current, | ||
1368 | "exactValue", | ||
1369 | lv_exactValue_0_0, | ||
1370 | "org.eclipse.xtext.common.Terminals.INT"); | ||
1371 | } | ||
1372 | ) | ||
1373 | ) | ||
1374 | ; | ||
1375 | |||
1376 | // Entry rule entryRuleUpperBound | ||
1377 | entryRuleUpperBound returns [String current=null]: | ||
1378 | { newCompositeNode(grammarAccess.getUpperBoundRule()); } | ||
1379 | iv_ruleUpperBound=ruleUpperBound | ||
1380 | { $current=$iv_ruleUpperBound.current.getText(); } | ||
1381 | EOF; | ||
1382 | |||
1383 | // Rule UpperBound | ||
1384 | ruleUpperBound returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] | ||
1385 | @init { | ||
1386 | enterRule(); | ||
1387 | } | ||
1388 | @after { | ||
1389 | leaveRule(); | ||
1390 | }: | ||
1391 | ( | ||
1392 | this_INT_0=RULE_INT | ||
1393 | { | ||
1394 | $current.merge(this_INT_0); | ||
1395 | } | ||
1396 | { | ||
1397 | newLeafNode(this_INT_0, grammarAccess.getUpperBoundAccess().getINTTerminalRuleCall_0()); | ||
1398 | } | ||
1399 | | | ||
1400 | kw='*' | ||
1401 | { | ||
1402 | $current.merge(kw); | ||
1403 | newLeafNode(kw, grammarAccess.getUpperBoundAccess().getAsteriskKeyword_1()); | ||
1404 | } | ||
1405 | ) | ||
1406 | ; | ||
1407 | |||
1408 | // Entry rule entryRuleQualifiedName | ||
1409 | entryRuleQualifiedName returns [String current=null]: | ||
1410 | { newCompositeNode(grammarAccess.getQualifiedNameRule()); } | ||
1411 | iv_ruleQualifiedName=ruleQualifiedName | ||
1412 | { $current=$iv_ruleQualifiedName.current.getText(); } | ||
1413 | EOF; | ||
1414 | |||
1415 | // Rule QualifiedName | ||
1416 | ruleQualifiedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] | ||
1417 | @init { | ||
1418 | enterRule(); | ||
1419 | } | ||
1420 | @after { | ||
1421 | leaveRule(); | ||
1422 | }: | ||
1423 | ( | ||
1424 | this_ID_0=RULE_ID | ||
1425 | { | ||
1426 | $current.merge(this_ID_0); | ||
1427 | } | ||
1428 | { | ||
1429 | newLeafNode(this_ID_0, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_0()); | ||
1430 | } | ||
1431 | ( | ||
1432 | kw='::' | ||
1433 | { | ||
1434 | $current.merge(kw); | ||
1435 | newLeafNode(kw, grammarAccess.getQualifiedNameAccess().getColonColonKeyword_1_0()); | ||
1436 | } | ||
1437 | this_ID_2=RULE_ID | ||
1438 | { | ||
1439 | $current.merge(this_ID_2); | ||
1440 | } | ||
1441 | { | ||
1442 | newLeafNode(this_ID_2, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_1_1()); | ||
1443 | } | ||
1444 | )* | ||
1445 | ) | ||
1446 | ; | ||
1447 | |||
1448 | // Rule LogicValue | ||
1449 | ruleLogicValue returns [Enumerator current=null] | ||
1450 | @init { | ||
1451 | enterRule(); | ||
1452 | } | ||
1453 | @after { | ||
1454 | leaveRule(); | ||
1455 | }: | ||
1456 | ( | ||
1457 | ( | ||
1458 | enumLiteral_0='true' | ||
1459 | { | ||
1460 | $current = grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); | ||
1461 | newLeafNode(enumLiteral_0, grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0()); | ||
1462 | } | ||
1463 | ) | ||
1464 | | | ||
1465 | ( | ||
1466 | enumLiteral_1='false' | ||
1467 | { | ||
1468 | $current = grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); | ||
1469 | newLeafNode(enumLiteral_1, grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1()); | ||
1470 | } | ||
1471 | ) | ||
1472 | | | ||
1473 | ( | ||
1474 | enumLiteral_2='unknown' | ||
1475 | { | ||
1476 | $current = grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2().getEnumLiteral().getInstance(); | ||
1477 | newLeafNode(enumLiteral_2, grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2()); | ||
1478 | } | ||
1479 | ) | ||
1480 | ) | ||
1481 | ; | ||
1482 | |||
1483 | // Rule ShortLogicValue | ||
1484 | ruleShortLogicValue returns [Enumerator current=null] | ||
1485 | @init { | ||
1486 | enterRule(); | ||
1487 | } | ||
1488 | @after { | ||
1489 | leaveRule(); | ||
1490 | }: | ||
1491 | ( | ||
1492 | ( | ||
1493 | enumLiteral_0='!' | ||
1494 | { | ||
1495 | $current = grammarAccess.getShortLogicValueAccess().getFALSEEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); | ||
1496 | newLeafNode(enumLiteral_0, grammarAccess.getShortLogicValueAccess().getFALSEEnumLiteralDeclaration_0()); | ||
1497 | } | ||
1498 | ) | ||
1499 | | | ||
1500 | ( | ||
1501 | enumLiteral_1='?' | ||
1502 | { | ||
1503 | $current = grammarAccess.getShortLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); | ||
1504 | newLeafNode(enumLiteral_1, grammarAccess.getShortLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_1()); | ||
1505 | } | ||
1506 | ) | ||
1507 | ) | ||
1508 | ; | ||
1509 | |||
1510 | RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*; | ||
1511 | |||
1512 | RULE_INT : ('0'..'9')+; | ||
1513 | |||
1514 | RULE_STRING : ('"' ('\\' .|~(('\\'|'"')))* '"'|'\'' ('\\' .|~(('\\'|'\'')))* '\''); | ||
1515 | |||
1516 | RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/'; | ||
1517 | |||
1518 | RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?; | ||
1519 | |||
1520 | RULE_WS : (' '|'\t'|'\r'|'\n')+; | ||
1521 | |||
1522 | RULE_ANY_OTHER : .; | ||
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.tokens b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.tokens new file mode 100644 index 00000000..22ef662c --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblem.tokens | |||
@@ -0,0 +1,65 @@ | |||
1 | '!'=27 | ||
2 | '('=23 | ||
3 | ')'=24 | ||
4 | '*'=34 | ||
5 | '+'=28 | ||
6 | '+='=31 | ||
7 | ','=15 | ||
8 | '.'=17 | ||
9 | '..'=33 | ||
10 | ':'=29 | ||
11 | '::'=35 | ||
12 | ':='=25 | ||
13 | ';'=26 | ||
14 | '='=32 | ||
15 | '?'=39 | ||
16 | '['=14 | ||
17 | ']'=16 | ||
18 | 'abstract'=11 | ||
19 | 'class'=12 | ||
20 | 'contains'=18 | ||
21 | 'error'=21 | ||
22 | 'extends'=13 | ||
23 | 'false'=37 | ||
24 | 'opposite'=20 | ||
25 | 'pred'=22 | ||
26 | 'refers'=19 | ||
27 | 'scope'=30 | ||
28 | 'true'=36 | ||
29 | 'unknown'=38 | ||
30 | RULE_ANY_OTHER=10 | ||
31 | RULE_ID=4 | ||
32 | RULE_INT=5 | ||
33 | RULE_ML_COMMENT=7 | ||
34 | RULE_SL_COMMENT=8 | ||
35 | RULE_STRING=6 | ||
36 | RULE_WS=9 | ||
37 | T__11=11 | ||
38 | T__12=12 | ||
39 | T__13=13 | ||
40 | T__14=14 | ||
41 | T__15=15 | ||
42 | T__16=16 | ||
43 | T__17=17 | ||
44 | T__18=18 | ||
45 | T__19=19 | ||
46 | T__20=20 | ||
47 | T__21=21 | ||
48 | T__22=22 | ||
49 | T__23=23 | ||
50 | T__24=24 | ||
51 | T__25=25 | ||
52 | T__26=26 | ||
53 | T__27=27 | ||
54 | T__28=28 | ||
55 | T__29=29 | ||
56 | T__30=30 | ||
57 | T__31=31 | ||
58 | T__32=32 | ||
59 | T__33=33 | ||
60 | T__34=34 | ||
61 | T__35=35 | ||
62 | T__36=36 | ||
63 | T__37=37 | ||
64 | T__38=38 | ||
65 | T__39=39 | ||
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblemLexer.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblemLexer.java new file mode 100644 index 00000000..a0b530c8 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblemLexer.java | |||
@@ -0,0 +1,1699 @@ | |||
1 | package org.eclipse.viatra.solver.language.parser.antlr.internal; | ||
2 | |||
3 | // Hack: Use our own Lexer superclass by means of import. | ||
4 | // Currently there is no other way to specify the superclass for the lexer. | ||
5 | import org.eclipse.xtext.parser.antlr.Lexer; | ||
6 | |||
7 | |||
8 | import org.antlr.runtime.*; | ||
9 | import java.util.Stack; | ||
10 | import java.util.List; | ||
11 | import java.util.ArrayList; | ||
12 | |||
13 | @SuppressWarnings("all") | ||
14 | public class InternalProblemLexer extends Lexer { | ||
15 | public static final int RULE_STRING=6; | ||
16 | public static final int RULE_SL_COMMENT=8; | ||
17 | public static final int T__19=19; | ||
18 | public static final int T__15=15; | ||
19 | public static final int T__37=37; | ||
20 | public static final int T__16=16; | ||
21 | public static final int T__38=38; | ||
22 | public static final int T__17=17; | ||
23 | public static final int T__39=39; | ||
24 | public static final int T__18=18; | ||
25 | public static final int T__11=11; | ||
26 | public static final int T__33=33; | ||
27 | public static final int T__12=12; | ||
28 | public static final int T__34=34; | ||
29 | public static final int T__13=13; | ||
30 | public static final int T__35=35; | ||
31 | public static final int T__14=14; | ||
32 | public static final int T__36=36; | ||
33 | public static final int EOF=-1; | ||
34 | public static final int T__30=30; | ||
35 | public static final int T__31=31; | ||
36 | public static final int T__32=32; | ||
37 | public static final int RULE_ID=4; | ||
38 | public static final int RULE_WS=9; | ||
39 | public static final int RULE_ANY_OTHER=10; | ||
40 | public static final int T__26=26; | ||
41 | public static final int T__27=27; | ||
42 | public static final int T__28=28; | ||
43 | public static final int RULE_INT=5; | ||
44 | public static final int T__29=29; | ||
45 | public static final int T__22=22; | ||
46 | public static final int RULE_ML_COMMENT=7; | ||
47 | public static final int T__23=23; | ||
48 | public static final int T__24=24; | ||
49 | public static final int T__25=25; | ||
50 | public static final int T__20=20; | ||
51 | public static final int T__21=21; | ||
52 | |||
53 | // delegates | ||
54 | // delegators | ||
55 | |||
56 | public InternalProblemLexer() {;} | ||
57 | public InternalProblemLexer(CharStream input) { | ||
58 | this(input, new RecognizerSharedState()); | ||
59 | } | ||
60 | public InternalProblemLexer(CharStream input, RecognizerSharedState state) { | ||
61 | super(input,state); | ||
62 | |||
63 | } | ||
64 | public String getGrammarFileName() { return "InternalProblem.g"; } | ||
65 | |||
66 | // $ANTLR start "T__11" | ||
67 | public final void mT__11() throws RecognitionException { | ||
68 | try { | ||
69 | int _type = T__11; | ||
70 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
71 | // InternalProblem.g:11:7: ( 'abstract' ) | ||
72 | // InternalProblem.g:11:9: 'abstract' | ||
73 | { | ||
74 | match("abstract"); | ||
75 | |||
76 | |||
77 | } | ||
78 | |||
79 | state.type = _type; | ||
80 | state.channel = _channel; | ||
81 | } | ||
82 | finally { | ||
83 | } | ||
84 | } | ||
85 | // $ANTLR end "T__11" | ||
86 | |||
87 | // $ANTLR start "T__12" | ||
88 | public final void mT__12() throws RecognitionException { | ||
89 | try { | ||
90 | int _type = T__12; | ||
91 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
92 | // InternalProblem.g:12:7: ( 'class' ) | ||
93 | // InternalProblem.g:12:9: 'class' | ||
94 | { | ||
95 | match("class"); | ||
96 | |||
97 | |||
98 | } | ||
99 | |||
100 | state.type = _type; | ||
101 | state.channel = _channel; | ||
102 | } | ||
103 | finally { | ||
104 | } | ||
105 | } | ||
106 | // $ANTLR end "T__12" | ||
107 | |||
108 | // $ANTLR start "T__13" | ||
109 | public final void mT__13() throws RecognitionException { | ||
110 | try { | ||
111 | int _type = T__13; | ||
112 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
113 | // InternalProblem.g:13:7: ( 'extends' ) | ||
114 | // InternalProblem.g:13:9: 'extends' | ||
115 | { | ||
116 | match("extends"); | ||
117 | |||
118 | |||
119 | } | ||
120 | |||
121 | state.type = _type; | ||
122 | state.channel = _channel; | ||
123 | } | ||
124 | finally { | ||
125 | } | ||
126 | } | ||
127 | // $ANTLR end "T__13" | ||
128 | |||
129 | // $ANTLR start "T__14" | ||
130 | public final void mT__14() throws RecognitionException { | ||
131 | try { | ||
132 | int _type = T__14; | ||
133 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
134 | // InternalProblem.g:14:7: ( '[' ) | ||
135 | // InternalProblem.g:14:9: '[' | ||
136 | { | ||
137 | match('['); | ||
138 | |||
139 | } | ||
140 | |||
141 | state.type = _type; | ||
142 | state.channel = _channel; | ||
143 | } | ||
144 | finally { | ||
145 | } | ||
146 | } | ||
147 | // $ANTLR end "T__14" | ||
148 | |||
149 | // $ANTLR start "T__15" | ||
150 | public final void mT__15() throws RecognitionException { | ||
151 | try { | ||
152 | int _type = T__15; | ||
153 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
154 | // InternalProblem.g:15:7: ( ',' ) | ||
155 | // InternalProblem.g:15:9: ',' | ||
156 | { | ||
157 | match(','); | ||
158 | |||
159 | } | ||
160 | |||
161 | state.type = _type; | ||
162 | state.channel = _channel; | ||
163 | } | ||
164 | finally { | ||
165 | } | ||
166 | } | ||
167 | // $ANTLR end "T__15" | ||
168 | |||
169 | // $ANTLR start "T__16" | ||
170 | public final void mT__16() throws RecognitionException { | ||
171 | try { | ||
172 | int _type = T__16; | ||
173 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
174 | // InternalProblem.g:16:7: ( ']' ) | ||
175 | // InternalProblem.g:16:9: ']' | ||
176 | { | ||
177 | match(']'); | ||
178 | |||
179 | } | ||
180 | |||
181 | state.type = _type; | ||
182 | state.channel = _channel; | ||
183 | } | ||
184 | finally { | ||
185 | } | ||
186 | } | ||
187 | // $ANTLR end "T__16" | ||
188 | |||
189 | // $ANTLR start "T__17" | ||
190 | public final void mT__17() throws RecognitionException { | ||
191 | try { | ||
192 | int _type = T__17; | ||
193 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
194 | // InternalProblem.g:17:7: ( '.' ) | ||
195 | // InternalProblem.g:17:9: '.' | ||
196 | { | ||
197 | match('.'); | ||
198 | |||
199 | } | ||
200 | |||
201 | state.type = _type; | ||
202 | state.channel = _channel; | ||
203 | } | ||
204 | finally { | ||
205 | } | ||
206 | } | ||
207 | // $ANTLR end "T__17" | ||
208 | |||
209 | // $ANTLR start "T__18" | ||
210 | public final void mT__18() throws RecognitionException { | ||
211 | try { | ||
212 | int _type = T__18; | ||
213 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
214 | // InternalProblem.g:18:7: ( 'contains' ) | ||
215 | // InternalProblem.g:18:9: 'contains' | ||
216 | { | ||
217 | match("contains"); | ||
218 | |||
219 | |||
220 | } | ||
221 | |||
222 | state.type = _type; | ||
223 | state.channel = _channel; | ||
224 | } | ||
225 | finally { | ||
226 | } | ||
227 | } | ||
228 | // $ANTLR end "T__18" | ||
229 | |||
230 | // $ANTLR start "T__19" | ||
231 | public final void mT__19() throws RecognitionException { | ||
232 | try { | ||
233 | int _type = T__19; | ||
234 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
235 | // InternalProblem.g:19:7: ( 'refers' ) | ||
236 | // InternalProblem.g:19:9: 'refers' | ||
237 | { | ||
238 | match("refers"); | ||
239 | |||
240 | |||
241 | } | ||
242 | |||
243 | state.type = _type; | ||
244 | state.channel = _channel; | ||
245 | } | ||
246 | finally { | ||
247 | } | ||
248 | } | ||
249 | // $ANTLR end "T__19" | ||
250 | |||
251 | // $ANTLR start "T__20" | ||
252 | public final void mT__20() throws RecognitionException { | ||
253 | try { | ||
254 | int _type = T__20; | ||
255 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
256 | // InternalProblem.g:20:7: ( 'opposite' ) | ||
257 | // InternalProblem.g:20:9: 'opposite' | ||
258 | { | ||
259 | match("opposite"); | ||
260 | |||
261 | |||
262 | } | ||
263 | |||
264 | state.type = _type; | ||
265 | state.channel = _channel; | ||
266 | } | ||
267 | finally { | ||
268 | } | ||
269 | } | ||
270 | // $ANTLR end "T__20" | ||
271 | |||
272 | // $ANTLR start "T__21" | ||
273 | public final void mT__21() throws RecognitionException { | ||
274 | try { | ||
275 | int _type = T__21; | ||
276 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
277 | // InternalProblem.g:21:7: ( 'error' ) | ||
278 | // InternalProblem.g:21:9: 'error' | ||
279 | { | ||
280 | match("error"); | ||
281 | |||
282 | |||
283 | } | ||
284 | |||
285 | state.type = _type; | ||
286 | state.channel = _channel; | ||
287 | } | ||
288 | finally { | ||
289 | } | ||
290 | } | ||
291 | // $ANTLR end "T__21" | ||
292 | |||
293 | // $ANTLR start "T__22" | ||
294 | public final void mT__22() throws RecognitionException { | ||
295 | try { | ||
296 | int _type = T__22; | ||
297 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
298 | // InternalProblem.g:22:7: ( 'pred' ) | ||
299 | // InternalProblem.g:22:9: 'pred' | ||
300 | { | ||
301 | match("pred"); | ||
302 | |||
303 | |||
304 | } | ||
305 | |||
306 | state.type = _type; | ||
307 | state.channel = _channel; | ||
308 | } | ||
309 | finally { | ||
310 | } | ||
311 | } | ||
312 | // $ANTLR end "T__22" | ||
313 | |||
314 | // $ANTLR start "T__23" | ||
315 | public final void mT__23() throws RecognitionException { | ||
316 | try { | ||
317 | int _type = T__23; | ||
318 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
319 | // InternalProblem.g:23:7: ( '(' ) | ||
320 | // InternalProblem.g:23:9: '(' | ||
321 | { | ||
322 | match('('); | ||
323 | |||
324 | } | ||
325 | |||
326 | state.type = _type; | ||
327 | state.channel = _channel; | ||
328 | } | ||
329 | finally { | ||
330 | } | ||
331 | } | ||
332 | // $ANTLR end "T__23" | ||
333 | |||
334 | // $ANTLR start "T__24" | ||
335 | public final void mT__24() throws RecognitionException { | ||
336 | try { | ||
337 | int _type = T__24; | ||
338 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
339 | // InternalProblem.g:24:7: ( ')' ) | ||
340 | // InternalProblem.g:24:9: ')' | ||
341 | { | ||
342 | match(')'); | ||
343 | |||
344 | } | ||
345 | |||
346 | state.type = _type; | ||
347 | state.channel = _channel; | ||
348 | } | ||
349 | finally { | ||
350 | } | ||
351 | } | ||
352 | // $ANTLR end "T__24" | ||
353 | |||
354 | // $ANTLR start "T__25" | ||
355 | public final void mT__25() throws RecognitionException { | ||
356 | try { | ||
357 | int _type = T__25; | ||
358 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
359 | // InternalProblem.g:25:7: ( ':=' ) | ||
360 | // InternalProblem.g:25:9: ':=' | ||
361 | { | ||
362 | match(":="); | ||
363 | |||
364 | |||
365 | } | ||
366 | |||
367 | state.type = _type; | ||
368 | state.channel = _channel; | ||
369 | } | ||
370 | finally { | ||
371 | } | ||
372 | } | ||
373 | // $ANTLR end "T__25" | ||
374 | |||
375 | // $ANTLR start "T__26" | ||
376 | public final void mT__26() throws RecognitionException { | ||
377 | try { | ||
378 | int _type = T__26; | ||
379 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
380 | // InternalProblem.g:26:7: ( ';' ) | ||
381 | // InternalProblem.g:26:9: ';' | ||
382 | { | ||
383 | match(';'); | ||
384 | |||
385 | } | ||
386 | |||
387 | state.type = _type; | ||
388 | state.channel = _channel; | ||
389 | } | ||
390 | finally { | ||
391 | } | ||
392 | } | ||
393 | // $ANTLR end "T__26" | ||
394 | |||
395 | // $ANTLR start "T__27" | ||
396 | public final void mT__27() throws RecognitionException { | ||
397 | try { | ||
398 | int _type = T__27; | ||
399 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
400 | // InternalProblem.g:27:7: ( '!' ) | ||
401 | // InternalProblem.g:27:9: '!' | ||
402 | { | ||
403 | match('!'); | ||
404 | |||
405 | } | ||
406 | |||
407 | state.type = _type; | ||
408 | state.channel = _channel; | ||
409 | } | ||
410 | finally { | ||
411 | } | ||
412 | } | ||
413 | // $ANTLR end "T__27" | ||
414 | |||
415 | // $ANTLR start "T__28" | ||
416 | public final void mT__28() throws RecognitionException { | ||
417 | try { | ||
418 | int _type = T__28; | ||
419 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
420 | // InternalProblem.g:28:7: ( '+' ) | ||
421 | // InternalProblem.g:28:9: '+' | ||
422 | { | ||
423 | match('+'); | ||
424 | |||
425 | } | ||
426 | |||
427 | state.type = _type; | ||
428 | state.channel = _channel; | ||
429 | } | ||
430 | finally { | ||
431 | } | ||
432 | } | ||
433 | // $ANTLR end "T__28" | ||
434 | |||
435 | // $ANTLR start "T__29" | ||
436 | public final void mT__29() throws RecognitionException { | ||
437 | try { | ||
438 | int _type = T__29; | ||
439 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
440 | // InternalProblem.g:29:7: ( ':' ) | ||
441 | // InternalProblem.g:29:9: ':' | ||
442 | { | ||
443 | match(':'); | ||
444 | |||
445 | } | ||
446 | |||
447 | state.type = _type; | ||
448 | state.channel = _channel; | ||
449 | } | ||
450 | finally { | ||
451 | } | ||
452 | } | ||
453 | // $ANTLR end "T__29" | ||
454 | |||
455 | // $ANTLR start "T__30" | ||
456 | public final void mT__30() throws RecognitionException { | ||
457 | try { | ||
458 | int _type = T__30; | ||
459 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
460 | // InternalProblem.g:30:7: ( 'scope' ) | ||
461 | // InternalProblem.g:30:9: 'scope' | ||
462 | { | ||
463 | match("scope"); | ||
464 | |||
465 | |||
466 | } | ||
467 | |||
468 | state.type = _type; | ||
469 | state.channel = _channel; | ||
470 | } | ||
471 | finally { | ||
472 | } | ||
473 | } | ||
474 | // $ANTLR end "T__30" | ||
475 | |||
476 | // $ANTLR start "T__31" | ||
477 | public final void mT__31() throws RecognitionException { | ||
478 | try { | ||
479 | int _type = T__31; | ||
480 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
481 | // InternalProblem.g:31:7: ( '+=' ) | ||
482 | // InternalProblem.g:31:9: '+=' | ||
483 | { | ||
484 | match("+="); | ||
485 | |||
486 | |||
487 | } | ||
488 | |||
489 | state.type = _type; | ||
490 | state.channel = _channel; | ||
491 | } | ||
492 | finally { | ||
493 | } | ||
494 | } | ||
495 | // $ANTLR end "T__31" | ||
496 | |||
497 | // $ANTLR start "T__32" | ||
498 | public final void mT__32() throws RecognitionException { | ||
499 | try { | ||
500 | int _type = T__32; | ||
501 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
502 | // InternalProblem.g:32:7: ( '=' ) | ||
503 | // InternalProblem.g:32:9: '=' | ||
504 | { | ||
505 | match('='); | ||
506 | |||
507 | } | ||
508 | |||
509 | state.type = _type; | ||
510 | state.channel = _channel; | ||
511 | } | ||
512 | finally { | ||
513 | } | ||
514 | } | ||
515 | // $ANTLR end "T__32" | ||
516 | |||
517 | // $ANTLR start "T__33" | ||
518 | public final void mT__33() throws RecognitionException { | ||
519 | try { | ||
520 | int _type = T__33; | ||
521 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
522 | // InternalProblem.g:33:7: ( '..' ) | ||
523 | // InternalProblem.g:33:9: '..' | ||
524 | { | ||
525 | match(".."); | ||
526 | |||
527 | |||
528 | } | ||
529 | |||
530 | state.type = _type; | ||
531 | state.channel = _channel; | ||
532 | } | ||
533 | finally { | ||
534 | } | ||
535 | } | ||
536 | // $ANTLR end "T__33" | ||
537 | |||
538 | // $ANTLR start "T__34" | ||
539 | public final void mT__34() throws RecognitionException { | ||
540 | try { | ||
541 | int _type = T__34; | ||
542 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
543 | // InternalProblem.g:34:7: ( '*' ) | ||
544 | // InternalProblem.g:34:9: '*' | ||
545 | { | ||
546 | match('*'); | ||
547 | |||
548 | } | ||
549 | |||
550 | state.type = _type; | ||
551 | state.channel = _channel; | ||
552 | } | ||
553 | finally { | ||
554 | } | ||
555 | } | ||
556 | // $ANTLR end "T__34" | ||
557 | |||
558 | // $ANTLR start "T__35" | ||
559 | public final void mT__35() throws RecognitionException { | ||
560 | try { | ||
561 | int _type = T__35; | ||
562 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
563 | // InternalProblem.g:35:7: ( '::' ) | ||
564 | // InternalProblem.g:35:9: '::' | ||
565 | { | ||
566 | match("::"); | ||
567 | |||
568 | |||
569 | } | ||
570 | |||
571 | state.type = _type; | ||
572 | state.channel = _channel; | ||
573 | } | ||
574 | finally { | ||
575 | } | ||
576 | } | ||
577 | // $ANTLR end "T__35" | ||
578 | |||
579 | // $ANTLR start "T__36" | ||
580 | public final void mT__36() throws RecognitionException { | ||
581 | try { | ||
582 | int _type = T__36; | ||
583 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
584 | // InternalProblem.g:36:7: ( 'true' ) | ||
585 | // InternalProblem.g:36:9: 'true' | ||
586 | { | ||
587 | match("true"); | ||
588 | |||
589 | |||
590 | } | ||
591 | |||
592 | state.type = _type; | ||
593 | state.channel = _channel; | ||
594 | } | ||
595 | finally { | ||
596 | } | ||
597 | } | ||
598 | // $ANTLR end "T__36" | ||
599 | |||
600 | // $ANTLR start "T__37" | ||
601 | public final void mT__37() throws RecognitionException { | ||
602 | try { | ||
603 | int _type = T__37; | ||
604 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
605 | // InternalProblem.g:37:7: ( 'false' ) | ||
606 | // InternalProblem.g:37:9: 'false' | ||
607 | { | ||
608 | match("false"); | ||
609 | |||
610 | |||
611 | } | ||
612 | |||
613 | state.type = _type; | ||
614 | state.channel = _channel; | ||
615 | } | ||
616 | finally { | ||
617 | } | ||
618 | } | ||
619 | // $ANTLR end "T__37" | ||
620 | |||
621 | // $ANTLR start "T__38" | ||
622 | public final void mT__38() throws RecognitionException { | ||
623 | try { | ||
624 | int _type = T__38; | ||
625 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
626 | // InternalProblem.g:38:7: ( 'unknown' ) | ||
627 | // InternalProblem.g:38:9: 'unknown' | ||
628 | { | ||
629 | match("unknown"); | ||
630 | |||
631 | |||
632 | } | ||
633 | |||
634 | state.type = _type; | ||
635 | state.channel = _channel; | ||
636 | } | ||
637 | finally { | ||
638 | } | ||
639 | } | ||
640 | // $ANTLR end "T__38" | ||
641 | |||
642 | // $ANTLR start "T__39" | ||
643 | public final void mT__39() throws RecognitionException { | ||
644 | try { | ||
645 | int _type = T__39; | ||
646 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
647 | // InternalProblem.g:39:7: ( '?' ) | ||
648 | // InternalProblem.g:39:9: '?' | ||
649 | { | ||
650 | match('?'); | ||
651 | |||
652 | } | ||
653 | |||
654 | state.type = _type; | ||
655 | state.channel = _channel; | ||
656 | } | ||
657 | finally { | ||
658 | } | ||
659 | } | ||
660 | // $ANTLR end "T__39" | ||
661 | |||
662 | // $ANTLR start "RULE_ID" | ||
663 | public final void mRULE_ID() throws RecognitionException { | ||
664 | try { | ||
665 | int _type = RULE_ID; | ||
666 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
667 | // InternalProblem.g:1510:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* ) | ||
668 | // InternalProblem.g:1510:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* | ||
669 | { | ||
670 | // InternalProblem.g:1510:11: ( '^' )? | ||
671 | int alt1=2; | ||
672 | int LA1_0 = input.LA(1); | ||
673 | |||
674 | if ( (LA1_0=='^') ) { | ||
675 | alt1=1; | ||
676 | } | ||
677 | switch (alt1) { | ||
678 | case 1 : | ||
679 | // InternalProblem.g:1510:11: '^' | ||
680 | { | ||
681 | match('^'); | ||
682 | |||
683 | } | ||
684 | break; | ||
685 | |||
686 | } | ||
687 | |||
688 | if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { | ||
689 | input.consume(); | ||
690 | |||
691 | } | ||
692 | else { | ||
693 | MismatchedSetException mse = new MismatchedSetException(null,input); | ||
694 | recover(mse); | ||
695 | throw mse;} | ||
696 | |||
697 | // InternalProblem.g:1510:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* | ||
698 | loop2: | ||
699 | do { | ||
700 | int alt2=2; | ||
701 | int LA2_0 = input.LA(1); | ||
702 | |||
703 | if ( ((LA2_0>='0' && LA2_0<='9')||(LA2_0>='A' && LA2_0<='Z')||LA2_0=='_'||(LA2_0>='a' && LA2_0<='z')) ) { | ||
704 | alt2=1; | ||
705 | } | ||
706 | |||
707 | |||
708 | switch (alt2) { | ||
709 | case 1 : | ||
710 | // InternalProblem.g: | ||
711 | { | ||
712 | if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) { | ||
713 | input.consume(); | ||
714 | |||
715 | } | ||
716 | else { | ||
717 | MismatchedSetException mse = new MismatchedSetException(null,input); | ||
718 | recover(mse); | ||
719 | throw mse;} | ||
720 | |||
721 | |||
722 | } | ||
723 | break; | ||
724 | |||
725 | default : | ||
726 | break loop2; | ||
727 | } | ||
728 | } while (true); | ||
729 | |||
730 | |||
731 | } | ||
732 | |||
733 | state.type = _type; | ||
734 | state.channel = _channel; | ||
735 | } | ||
736 | finally { | ||
737 | } | ||
738 | } | ||
739 | // $ANTLR end "RULE_ID" | ||
740 | |||
741 | // $ANTLR start "RULE_INT" | ||
742 | public final void mRULE_INT() throws RecognitionException { | ||
743 | try { | ||
744 | int _type = RULE_INT; | ||
745 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
746 | // InternalProblem.g:1512:10: ( ( '0' .. '9' )+ ) | ||
747 | // InternalProblem.g:1512:12: ( '0' .. '9' )+ | ||
748 | { | ||
749 | // InternalProblem.g:1512:12: ( '0' .. '9' )+ | ||
750 | int cnt3=0; | ||
751 | loop3: | ||
752 | do { | ||
753 | int alt3=2; | ||
754 | int LA3_0 = input.LA(1); | ||
755 | |||
756 | if ( ((LA3_0>='0' && LA3_0<='9')) ) { | ||
757 | alt3=1; | ||
758 | } | ||
759 | |||
760 | |||
761 | switch (alt3) { | ||
762 | case 1 : | ||
763 | // InternalProblem.g:1512:13: '0' .. '9' | ||
764 | { | ||
765 | matchRange('0','9'); | ||
766 | |||
767 | } | ||
768 | break; | ||
769 | |||
770 | default : | ||
771 | if ( cnt3 >= 1 ) break loop3; | ||
772 | EarlyExitException eee = | ||
773 | new EarlyExitException(3, input); | ||
774 | throw eee; | ||
775 | } | ||
776 | cnt3++; | ||
777 | } while (true); | ||
778 | |||
779 | |||
780 | } | ||
781 | |||
782 | state.type = _type; | ||
783 | state.channel = _channel; | ||
784 | } | ||
785 | finally { | ||
786 | } | ||
787 | } | ||
788 | // $ANTLR end "RULE_INT" | ||
789 | |||
790 | // $ANTLR start "RULE_STRING" | ||
791 | public final void mRULE_STRING() throws RecognitionException { | ||
792 | try { | ||
793 | int _type = RULE_STRING; | ||
794 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
795 | // InternalProblem.g:1514:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) ) | ||
796 | // InternalProblem.g:1514:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) | ||
797 | { | ||
798 | // InternalProblem.g:1514:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) | ||
799 | int alt6=2; | ||
800 | int LA6_0 = input.LA(1); | ||
801 | |||
802 | if ( (LA6_0=='\"') ) { | ||
803 | alt6=1; | ||
804 | } | ||
805 | else if ( (LA6_0=='\'') ) { | ||
806 | alt6=2; | ||
807 | } | ||
808 | else { | ||
809 | NoViableAltException nvae = | ||
810 | new NoViableAltException("", 6, 0, input); | ||
811 | |||
812 | throw nvae; | ||
813 | } | ||
814 | switch (alt6) { | ||
815 | case 1 : | ||
816 | // InternalProblem.g:1514:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | ||
817 | { | ||
818 | match('\"'); | ||
819 | // InternalProblem.g:1514:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* | ||
820 | loop4: | ||
821 | do { | ||
822 | int alt4=3; | ||
823 | int LA4_0 = input.LA(1); | ||
824 | |||
825 | if ( (LA4_0=='\\') ) { | ||
826 | alt4=1; | ||
827 | } | ||
828 | else if ( ((LA4_0>='\u0000' && LA4_0<='!')||(LA4_0>='#' && LA4_0<='[')||(LA4_0>=']' && LA4_0<='\uFFFF')) ) { | ||
829 | alt4=2; | ||
830 | } | ||
831 | |||
832 | |||
833 | switch (alt4) { | ||
834 | case 1 : | ||
835 | // InternalProblem.g:1514:21: '\\\\' . | ||
836 | { | ||
837 | match('\\'); | ||
838 | matchAny(); | ||
839 | |||
840 | } | ||
841 | break; | ||
842 | case 2 : | ||
843 | // InternalProblem.g:1514:28: ~ ( ( '\\\\' | '\"' ) ) | ||
844 | { | ||
845 | if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { | ||
846 | input.consume(); | ||
847 | |||
848 | } | ||
849 | else { | ||
850 | MismatchedSetException mse = new MismatchedSetException(null,input); | ||
851 | recover(mse); | ||
852 | throw mse;} | ||
853 | |||
854 | |||
855 | } | ||
856 | break; | ||
857 | |||
858 | default : | ||
859 | break loop4; | ||
860 | } | ||
861 | } while (true); | ||
862 | |||
863 | match('\"'); | ||
864 | |||
865 | } | ||
866 | break; | ||
867 | case 2 : | ||
868 | // InternalProblem.g:1514:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' | ||
869 | { | ||
870 | match('\''); | ||
871 | // InternalProblem.g:1514:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* | ||
872 | loop5: | ||
873 | do { | ||
874 | int alt5=3; | ||
875 | int LA5_0 = input.LA(1); | ||
876 | |||
877 | if ( (LA5_0=='\\') ) { | ||
878 | alt5=1; | ||
879 | } | ||
880 | else if ( ((LA5_0>='\u0000' && LA5_0<='&')||(LA5_0>='(' && LA5_0<='[')||(LA5_0>=']' && LA5_0<='\uFFFF')) ) { | ||
881 | alt5=2; | ||
882 | } | ||
883 | |||
884 | |||
885 | switch (alt5) { | ||
886 | case 1 : | ||
887 | // InternalProblem.g:1514:54: '\\\\' . | ||
888 | { | ||
889 | match('\\'); | ||
890 | matchAny(); | ||
891 | |||
892 | } | ||
893 | break; | ||
894 | case 2 : | ||
895 | // InternalProblem.g:1514:61: ~ ( ( '\\\\' | '\\'' ) ) | ||
896 | { | ||
897 | if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) { | ||
898 | input.consume(); | ||
899 | |||
900 | } | ||
901 | else { | ||
902 | MismatchedSetException mse = new MismatchedSetException(null,input); | ||
903 | recover(mse); | ||
904 | throw mse;} | ||
905 | |||
906 | |||
907 | } | ||
908 | break; | ||
909 | |||
910 | default : | ||
911 | break loop5; | ||
912 | } | ||
913 | } while (true); | ||
914 | |||
915 | match('\''); | ||
916 | |||
917 | } | ||
918 | break; | ||
919 | |||
920 | } | ||
921 | |||
922 | |||
923 | } | ||
924 | |||
925 | state.type = _type; | ||
926 | state.channel = _channel; | ||
927 | } | ||
928 | finally { | ||
929 | } | ||
930 | } | ||
931 | // $ANTLR end "RULE_STRING" | ||
932 | |||
933 | // $ANTLR start "RULE_ML_COMMENT" | ||
934 | public final void mRULE_ML_COMMENT() throws RecognitionException { | ||
935 | try { | ||
936 | int _type = RULE_ML_COMMENT; | ||
937 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
938 | // InternalProblem.g:1516:17: ( '/*' ( options {greedy=false; } : . )* '*/' ) | ||
939 | // InternalProblem.g:1516:19: '/*' ( options {greedy=false; } : . )* '*/' | ||
940 | { | ||
941 | match("/*"); | ||
942 | |||
943 | // InternalProblem.g:1516:24: ( options {greedy=false; } : . )* | ||
944 | loop7: | ||
945 | do { | ||
946 | int alt7=2; | ||
947 | int LA7_0 = input.LA(1); | ||
948 | |||
949 | if ( (LA7_0=='*') ) { | ||
950 | int LA7_1 = input.LA(2); | ||
951 | |||
952 | if ( (LA7_1=='/') ) { | ||
953 | alt7=2; | ||
954 | } | ||
955 | else if ( ((LA7_1>='\u0000' && LA7_1<='.')||(LA7_1>='0' && LA7_1<='\uFFFF')) ) { | ||
956 | alt7=1; | ||
957 | } | ||
958 | |||
959 | |||
960 | } | ||
961 | else if ( ((LA7_0>='\u0000' && LA7_0<=')')||(LA7_0>='+' && LA7_0<='\uFFFF')) ) { | ||
962 | alt7=1; | ||
963 | } | ||
964 | |||
965 | |||
966 | switch (alt7) { | ||
967 | case 1 : | ||
968 | // InternalProblem.g:1516:52: . | ||
969 | { | ||
970 | matchAny(); | ||
971 | |||
972 | } | ||
973 | break; | ||
974 | |||
975 | default : | ||
976 | break loop7; | ||
977 | } | ||
978 | } while (true); | ||
979 | |||
980 | match("*/"); | ||
981 | |||
982 | |||
983 | } | ||
984 | |||
985 | state.type = _type; | ||
986 | state.channel = _channel; | ||
987 | } | ||
988 | finally { | ||
989 | } | ||
990 | } | ||
991 | // $ANTLR end "RULE_ML_COMMENT" | ||
992 | |||
993 | // $ANTLR start "RULE_SL_COMMENT" | ||
994 | public final void mRULE_SL_COMMENT() throws RecognitionException { | ||
995 | try { | ||
996 | int _type = RULE_SL_COMMENT; | ||
997 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
998 | // InternalProblem.g:1518:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? ) | ||
999 | // InternalProblem.g:1518:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? | ||
1000 | { | ||
1001 | match("//"); | ||
1002 | |||
1003 | // InternalProblem.g:1518:24: (~ ( ( '\\n' | '\\r' ) ) )* | ||
1004 | loop8: | ||
1005 | do { | ||
1006 | int alt8=2; | ||
1007 | int LA8_0 = input.LA(1); | ||
1008 | |||
1009 | if ( ((LA8_0>='\u0000' && LA8_0<='\t')||(LA8_0>='\u000B' && LA8_0<='\f')||(LA8_0>='\u000E' && LA8_0<='\uFFFF')) ) { | ||
1010 | alt8=1; | ||
1011 | } | ||
1012 | |||
1013 | |||
1014 | switch (alt8) { | ||
1015 | case 1 : | ||
1016 | // InternalProblem.g:1518:24: ~ ( ( '\\n' | '\\r' ) ) | ||
1017 | { | ||
1018 | if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) { | ||
1019 | input.consume(); | ||
1020 | |||
1021 | } | ||
1022 | else { | ||
1023 | MismatchedSetException mse = new MismatchedSetException(null,input); | ||
1024 | recover(mse); | ||
1025 | throw mse;} | ||
1026 | |||
1027 | |||
1028 | } | ||
1029 | break; | ||
1030 | |||
1031 | default : | ||
1032 | break loop8; | ||
1033 | } | ||
1034 | } while (true); | ||
1035 | |||
1036 | // InternalProblem.g:1518:40: ( ( '\\r' )? '\\n' )? | ||
1037 | int alt10=2; | ||
1038 | int LA10_0 = input.LA(1); | ||
1039 | |||
1040 | if ( (LA10_0=='\n'||LA10_0=='\r') ) { | ||
1041 | alt10=1; | ||
1042 | } | ||
1043 | switch (alt10) { | ||
1044 | case 1 : | ||
1045 | // InternalProblem.g:1518:41: ( '\\r' )? '\\n' | ||
1046 | { | ||
1047 | // InternalProblem.g:1518:41: ( '\\r' )? | ||
1048 | int alt9=2; | ||
1049 | int LA9_0 = input.LA(1); | ||
1050 | |||
1051 | if ( (LA9_0=='\r') ) { | ||
1052 | alt9=1; | ||
1053 | } | ||
1054 | switch (alt9) { | ||
1055 | case 1 : | ||
1056 | // InternalProblem.g:1518:41: '\\r' | ||
1057 | { | ||
1058 | match('\r'); | ||
1059 | |||
1060 | } | ||
1061 | break; | ||
1062 | |||
1063 | } | ||
1064 | |||
1065 | match('\n'); | ||
1066 | |||
1067 | } | ||
1068 | break; | ||
1069 | |||
1070 | } | ||
1071 | |||
1072 | |||
1073 | } | ||
1074 | |||
1075 | state.type = _type; | ||
1076 | state.channel = _channel; | ||
1077 | } | ||
1078 | finally { | ||
1079 | } | ||
1080 | } | ||
1081 | // $ANTLR end "RULE_SL_COMMENT" | ||
1082 | |||
1083 | // $ANTLR start "RULE_WS" | ||
1084 | public final void mRULE_WS() throws RecognitionException { | ||
1085 | try { | ||
1086 | int _type = RULE_WS; | ||
1087 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
1088 | // InternalProblem.g:1520:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ ) | ||
1089 | // InternalProblem.g:1520:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ | ||
1090 | { | ||
1091 | // InternalProblem.g:1520:11: ( ' ' | '\\t' | '\\r' | '\\n' )+ | ||
1092 | int cnt11=0; | ||
1093 | loop11: | ||
1094 | do { | ||
1095 | int alt11=2; | ||
1096 | int LA11_0 = input.LA(1); | ||
1097 | |||
1098 | if ( ((LA11_0>='\t' && LA11_0<='\n')||LA11_0=='\r'||LA11_0==' ') ) { | ||
1099 | alt11=1; | ||
1100 | } | ||
1101 | |||
1102 | |||
1103 | switch (alt11) { | ||
1104 | case 1 : | ||
1105 | // InternalProblem.g: | ||
1106 | { | ||
1107 | if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' ' ) { | ||
1108 | input.consume(); | ||
1109 | |||
1110 | } | ||
1111 | else { | ||
1112 | MismatchedSetException mse = new MismatchedSetException(null,input); | ||
1113 | recover(mse); | ||
1114 | throw mse;} | ||
1115 | |||
1116 | |||
1117 | } | ||
1118 | break; | ||
1119 | |||
1120 | default : | ||
1121 | if ( cnt11 >= 1 ) break loop11; | ||
1122 | EarlyExitException eee = | ||
1123 | new EarlyExitException(11, input); | ||
1124 | throw eee; | ||
1125 | } | ||
1126 | cnt11++; | ||
1127 | } while (true); | ||
1128 | |||
1129 | |||
1130 | } | ||
1131 | |||
1132 | state.type = _type; | ||
1133 | state.channel = _channel; | ||
1134 | } | ||
1135 | finally { | ||
1136 | } | ||
1137 | } | ||
1138 | // $ANTLR end "RULE_WS" | ||
1139 | |||
1140 | // $ANTLR start "RULE_ANY_OTHER" | ||
1141 | public final void mRULE_ANY_OTHER() throws RecognitionException { | ||
1142 | try { | ||
1143 | int _type = RULE_ANY_OTHER; | ||
1144 | int _channel = DEFAULT_TOKEN_CHANNEL; | ||
1145 | // InternalProblem.g:1522:16: ( . ) | ||
1146 | // InternalProblem.g:1522:18: . | ||
1147 | { | ||
1148 | matchAny(); | ||
1149 | |||
1150 | } | ||
1151 | |||
1152 | state.type = _type; | ||
1153 | state.channel = _channel; | ||
1154 | } | ||
1155 | finally { | ||
1156 | } | ||
1157 | } | ||
1158 | // $ANTLR end "RULE_ANY_OTHER" | ||
1159 | |||
1160 | public void mTokens() throws RecognitionException { | ||
1161 | // InternalProblem.g:1:8: ( T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | T__39 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER ) | ||
1162 | int alt12=36; | ||
1163 | alt12 = dfa12.predict(input); | ||
1164 | switch (alt12) { | ||
1165 | case 1 : | ||
1166 | // InternalProblem.g:1:10: T__11 | ||
1167 | { | ||
1168 | mT__11(); | ||
1169 | |||
1170 | } | ||
1171 | break; | ||
1172 | case 2 : | ||
1173 | // InternalProblem.g:1:16: T__12 | ||
1174 | { | ||
1175 | mT__12(); | ||
1176 | |||
1177 | } | ||
1178 | break; | ||
1179 | case 3 : | ||
1180 | // InternalProblem.g:1:22: T__13 | ||
1181 | { | ||
1182 | mT__13(); | ||
1183 | |||
1184 | } | ||
1185 | break; | ||
1186 | case 4 : | ||
1187 | // InternalProblem.g:1:28: T__14 | ||
1188 | { | ||
1189 | mT__14(); | ||
1190 | |||
1191 | } | ||
1192 | break; | ||
1193 | case 5 : | ||
1194 | // InternalProblem.g:1:34: T__15 | ||
1195 | { | ||
1196 | mT__15(); | ||
1197 | |||
1198 | } | ||
1199 | break; | ||
1200 | case 6 : | ||
1201 | // InternalProblem.g:1:40: T__16 | ||
1202 | { | ||
1203 | mT__16(); | ||
1204 | |||
1205 | } | ||
1206 | break; | ||
1207 | case 7 : | ||
1208 | // InternalProblem.g:1:46: T__17 | ||
1209 | { | ||
1210 | mT__17(); | ||
1211 | |||
1212 | } | ||
1213 | break; | ||
1214 | case 8 : | ||
1215 | // InternalProblem.g:1:52: T__18 | ||
1216 | { | ||
1217 | mT__18(); | ||
1218 | |||
1219 | } | ||
1220 | break; | ||
1221 | case 9 : | ||
1222 | // InternalProblem.g:1:58: T__19 | ||
1223 | { | ||
1224 | mT__19(); | ||
1225 | |||
1226 | } | ||
1227 | break; | ||
1228 | case 10 : | ||
1229 | // InternalProblem.g:1:64: T__20 | ||
1230 | { | ||
1231 | mT__20(); | ||
1232 | |||
1233 | } | ||
1234 | break; | ||
1235 | case 11 : | ||
1236 | // InternalProblem.g:1:70: T__21 | ||
1237 | { | ||
1238 | mT__21(); | ||
1239 | |||
1240 | } | ||
1241 | break; | ||
1242 | case 12 : | ||
1243 | // InternalProblem.g:1:76: T__22 | ||
1244 | { | ||
1245 | mT__22(); | ||
1246 | |||
1247 | } | ||
1248 | break; | ||
1249 | case 13 : | ||
1250 | // InternalProblem.g:1:82: T__23 | ||
1251 | { | ||
1252 | mT__23(); | ||
1253 | |||
1254 | } | ||
1255 | break; | ||
1256 | case 14 : | ||
1257 | // InternalProblem.g:1:88: T__24 | ||
1258 | { | ||
1259 | mT__24(); | ||
1260 | |||
1261 | } | ||
1262 | break; | ||
1263 | case 15 : | ||
1264 | // InternalProblem.g:1:94: T__25 | ||
1265 | { | ||
1266 | mT__25(); | ||
1267 | |||
1268 | } | ||
1269 | break; | ||
1270 | case 16 : | ||
1271 | // InternalProblem.g:1:100: T__26 | ||
1272 | { | ||
1273 | mT__26(); | ||
1274 | |||
1275 | } | ||
1276 | break; | ||
1277 | case 17 : | ||
1278 | // InternalProblem.g:1:106: T__27 | ||
1279 | { | ||
1280 | mT__27(); | ||
1281 | |||
1282 | } | ||
1283 | break; | ||
1284 | case 18 : | ||
1285 | // InternalProblem.g:1:112: T__28 | ||
1286 | { | ||
1287 | mT__28(); | ||
1288 | |||
1289 | } | ||
1290 | break; | ||
1291 | case 19 : | ||
1292 | // InternalProblem.g:1:118: T__29 | ||
1293 | { | ||
1294 | mT__29(); | ||
1295 | |||
1296 | } | ||
1297 | break; | ||
1298 | case 20 : | ||
1299 | // InternalProblem.g:1:124: T__30 | ||
1300 | { | ||
1301 | mT__30(); | ||
1302 | |||
1303 | } | ||
1304 | break; | ||
1305 | case 21 : | ||
1306 | // InternalProblem.g:1:130: T__31 | ||
1307 | { | ||
1308 | mT__31(); | ||
1309 | |||
1310 | } | ||
1311 | break; | ||
1312 | case 22 : | ||
1313 | // InternalProblem.g:1:136: T__32 | ||
1314 | { | ||
1315 | mT__32(); | ||
1316 | |||
1317 | } | ||
1318 | break; | ||
1319 | case 23 : | ||
1320 | // InternalProblem.g:1:142: T__33 | ||
1321 | { | ||
1322 | mT__33(); | ||
1323 | |||
1324 | } | ||
1325 | break; | ||
1326 | case 24 : | ||
1327 | // InternalProblem.g:1:148: T__34 | ||
1328 | { | ||
1329 | mT__34(); | ||
1330 | |||
1331 | } | ||
1332 | break; | ||
1333 | case 25 : | ||
1334 | // InternalProblem.g:1:154: T__35 | ||
1335 | { | ||
1336 | mT__35(); | ||
1337 | |||
1338 | } | ||
1339 | break; | ||
1340 | case 26 : | ||
1341 | // InternalProblem.g:1:160: T__36 | ||
1342 | { | ||
1343 | mT__36(); | ||
1344 | |||
1345 | } | ||
1346 | break; | ||
1347 | case 27 : | ||
1348 | // InternalProblem.g:1:166: T__37 | ||
1349 | { | ||
1350 | mT__37(); | ||
1351 | |||
1352 | } | ||
1353 | break; | ||
1354 | case 28 : | ||
1355 | // InternalProblem.g:1:172: T__38 | ||
1356 | { | ||
1357 | mT__38(); | ||
1358 | |||
1359 | } | ||
1360 | break; | ||
1361 | case 29 : | ||
1362 | // InternalProblem.g:1:178: T__39 | ||
1363 | { | ||
1364 | mT__39(); | ||
1365 | |||
1366 | } | ||
1367 | break; | ||
1368 | case 30 : | ||
1369 | // InternalProblem.g:1:184: RULE_ID | ||
1370 | { | ||
1371 | mRULE_ID(); | ||
1372 | |||
1373 | } | ||
1374 | break; | ||
1375 | case 31 : | ||
1376 | // InternalProblem.g:1:192: RULE_INT | ||
1377 | { | ||
1378 | mRULE_INT(); | ||
1379 | |||
1380 | } | ||
1381 | break; | ||
1382 | case 32 : | ||
1383 | // InternalProblem.g:1:201: RULE_STRING | ||
1384 | { | ||
1385 | mRULE_STRING(); | ||
1386 | |||
1387 | } | ||
1388 | break; | ||
1389 | case 33 : | ||
1390 | // InternalProblem.g:1:213: RULE_ML_COMMENT | ||
1391 | { | ||
1392 | mRULE_ML_COMMENT(); | ||
1393 | |||
1394 | } | ||
1395 | break; | ||
1396 | case 34 : | ||
1397 | // InternalProblem.g:1:229: RULE_SL_COMMENT | ||
1398 | { | ||
1399 | mRULE_SL_COMMENT(); | ||
1400 | |||
1401 | } | ||
1402 | break; | ||
1403 | case 35 : | ||
1404 | // InternalProblem.g:1:245: RULE_WS | ||
1405 | { | ||
1406 | mRULE_WS(); | ||
1407 | |||
1408 | } | ||
1409 | break; | ||
1410 | case 36 : | ||
1411 | // InternalProblem.g:1:253: RULE_ANY_OTHER | ||
1412 | { | ||
1413 | mRULE_ANY_OTHER(); | ||
1414 | |||
1415 | } | ||
1416 | break; | ||
1417 | |||
1418 | } | ||
1419 | |||
1420 | } | ||
1421 | |||
1422 | |||
1423 | protected DFA12 dfa12 = new DFA12(this); | ||
1424 | static final String DFA12_eotS = | ||
1425 | "\1\uffff\3\41\3\uffff\1\52\3\41\2\uffff\1\62\2\uffff\1\66\1\41\2\uffff\3\41\1\uffff\1\37\2\uffff\3\37\2\uffff\1\41\1\uffff\4\41\5\uffff\3\41\11\uffff\1\41\2\uffff\3\41\6\uffff\23\41\1\142\1\41\1\144\3\41\1\150\2\41\1\153\2\41\1\uffff\1\156\1\uffff\1\157\2\41\1\uffff\2\41\1\uffff\1\164\1\41\2\uffff\3\41\1\171\1\uffff\1\41\1\173\1\174\1\175\1\uffff\1\176\4\uffff"; | ||
1426 | static final String DFA12_eofS = | ||
1427 | "\177\uffff"; | ||
1428 | static final String DFA12_minS = | ||
1429 | "\1\0\1\142\1\154\1\162\3\uffff\1\56\1\145\1\160\1\162\2\uffff\1\72\2\uffff\1\75\1\143\2\uffff\1\162\1\141\1\156\1\uffff\1\101\2\uffff\2\0\1\52\2\uffff\1\163\1\uffff\1\141\1\156\1\164\1\162\5\uffff\1\146\1\160\1\145\11\uffff\1\157\2\uffff\1\165\1\154\1\153\6\uffff\1\164\1\163\1\164\1\145\1\157\1\145\1\157\1\144\1\160\1\145\1\163\1\156\1\162\1\163\1\141\1\156\2\162\1\163\1\60\1\145\1\60\1\145\1\157\1\141\1\60\1\151\1\144\1\60\1\163\1\151\1\uffff\1\60\1\uffff\1\60\1\167\1\143\1\uffff\1\156\1\163\1\uffff\1\60\1\164\2\uffff\1\156\1\164\1\163\1\60\1\uffff\1\145\3\60\1\uffff\1\60\4\uffff"; | ||
1430 | static final String DFA12_maxS = | ||
1431 | "\1\uffff\1\142\1\157\1\170\3\uffff\1\56\1\145\1\160\1\162\2\uffff\1\75\2\uffff\1\75\1\143\2\uffff\1\162\1\141\1\156\1\uffff\1\172\2\uffff\2\uffff\1\57\2\uffff\1\163\1\uffff\1\141\1\156\1\164\1\162\5\uffff\1\146\1\160\1\145\11\uffff\1\157\2\uffff\1\165\1\154\1\153\6\uffff\1\164\1\163\1\164\1\145\1\157\1\145\1\157\1\144\1\160\1\145\1\163\1\156\1\162\1\163\1\141\1\156\2\162\1\163\1\172\1\145\1\172\1\145\1\157\1\141\1\172\1\151\1\144\1\172\1\163\1\151\1\uffff\1\172\1\uffff\1\172\1\167\1\143\1\uffff\1\156\1\163\1\uffff\1\172\1\164\2\uffff\1\156\1\164\1\163\1\172\1\uffff\1\145\3\172\1\uffff\1\172\4\uffff"; | ||
1432 | static final String DFA12_acceptS = | ||
1433 | "\4\uffff\1\4\1\5\1\6\4\uffff\1\15\1\16\1\uffff\1\20\1\21\2\uffff\1\26\1\30\3\uffff\1\35\1\uffff\1\36\1\37\3\uffff\1\43\1\44\1\uffff\1\36\4\uffff\1\4\1\5\1\6\1\27\1\7\3\uffff\1\15\1\16\1\17\1\31\1\23\1\20\1\21\1\25\1\22\1\uffff\1\26\1\30\3\uffff\1\35\1\37\1\40\1\41\1\42\1\43\37\uffff\1\14\1\uffff\1\32\3\uffff\1\2\2\uffff\1\13\2\uffff\1\24\1\33\4\uffff\1\11\4\uffff\1\3\1\uffff\1\34\1\1\1\10\1\12"; | ||
1434 | static final String DFA12_specialS = | ||
1435 | "\1\1\32\uffff\1\2\1\0\142\uffff}>"; | ||
1436 | static final String[] DFA12_transitionS = { | ||
1437 | "\11\37\2\36\2\37\1\36\22\37\1\36\1\17\1\33\4\37\1\34\1\13\1\14\1\23\1\20\1\5\1\37\1\7\1\35\12\32\1\15\1\16\1\37\1\22\1\37\1\27\1\37\32\31\1\4\1\37\1\6\1\30\1\31\1\37\1\1\1\31\1\2\1\31\1\3\1\25\10\31\1\11\1\12\1\31\1\10\1\21\1\24\1\26\5\31\uff85\37", | ||
1438 | "\1\40", | ||
1439 | "\1\42\2\uffff\1\43", | ||
1440 | "\1\45\5\uffff\1\44", | ||
1441 | "", | ||
1442 | "", | ||
1443 | "", | ||
1444 | "\1\51", | ||
1445 | "\1\53", | ||
1446 | "\1\54", | ||
1447 | "\1\55", | ||
1448 | "", | ||
1449 | "", | ||
1450 | "\1\61\2\uffff\1\60", | ||
1451 | "", | ||
1452 | "", | ||
1453 | "\1\65", | ||
1454 | "\1\67", | ||
1455 | "", | ||
1456 | "", | ||
1457 | "\1\72", | ||
1458 | "\1\73", | ||
1459 | "\1\74", | ||
1460 | "", | ||
1461 | "\32\41\4\uffff\1\41\1\uffff\32\41", | ||
1462 | "", | ||
1463 | "", | ||
1464 | "\0\77", | ||
1465 | "\0\77", | ||
1466 | "\1\100\4\uffff\1\101", | ||
1467 | "", | ||
1468 | "", | ||
1469 | "\1\103", | ||
1470 | "", | ||
1471 | "\1\104", | ||
1472 | "\1\105", | ||
1473 | "\1\106", | ||
1474 | "\1\107", | ||
1475 | "", | ||
1476 | "", | ||
1477 | "", | ||
1478 | "", | ||
1479 | "", | ||
1480 | "\1\110", | ||
1481 | "\1\111", | ||
1482 | "\1\112", | ||
1483 | "", | ||
1484 | "", | ||
1485 | "", | ||
1486 | "", | ||
1487 | "", | ||
1488 | "", | ||
1489 | "", | ||
1490 | "", | ||
1491 | "", | ||
1492 | "\1\113", | ||
1493 | "", | ||
1494 | "", | ||
1495 | "\1\114", | ||
1496 | "\1\115", | ||
1497 | "\1\116", | ||
1498 | "", | ||
1499 | "", | ||
1500 | "", | ||
1501 | "", | ||
1502 | "", | ||
1503 | "", | ||
1504 | "\1\117", | ||
1505 | "\1\120", | ||
1506 | "\1\121", | ||
1507 | "\1\122", | ||
1508 | "\1\123", | ||
1509 | "\1\124", | ||
1510 | "\1\125", | ||
1511 | "\1\126", | ||
1512 | "\1\127", | ||
1513 | "\1\130", | ||
1514 | "\1\131", | ||
1515 | "\1\132", | ||
1516 | "\1\133", | ||
1517 | "\1\134", | ||
1518 | "\1\135", | ||
1519 | "\1\136", | ||
1520 | "\1\137", | ||
1521 | "\1\140", | ||
1522 | "\1\141", | ||
1523 | "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", | ||
1524 | "\1\143", | ||
1525 | "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", | ||
1526 | "\1\145", | ||
1527 | "\1\146", | ||
1528 | "\1\147", | ||
1529 | "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", | ||
1530 | "\1\151", | ||
1531 | "\1\152", | ||
1532 | "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", | ||
1533 | "\1\154", | ||
1534 | "\1\155", | ||
1535 | "", | ||
1536 | "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", | ||
1537 | "", | ||
1538 | "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", | ||
1539 | "\1\160", | ||
1540 | "\1\161", | ||
1541 | "", | ||
1542 | "\1\162", | ||
1543 | "\1\163", | ||
1544 | "", | ||
1545 | "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", | ||
1546 | "\1\165", | ||
1547 | "", | ||
1548 | "", | ||
1549 | "\1\166", | ||
1550 | "\1\167", | ||
1551 | "\1\170", | ||
1552 | "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", | ||
1553 | "", | ||
1554 | "\1\172", | ||
1555 | "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", | ||
1556 | "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", | ||
1557 | "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", | ||
1558 | "", | ||
1559 | "\12\41\7\uffff\32\41\4\uffff\1\41\1\uffff\32\41", | ||
1560 | "", | ||
1561 | "", | ||
1562 | "", | ||
1563 | "" | ||
1564 | }; | ||
1565 | |||
1566 | static final short[] DFA12_eot = DFA.unpackEncodedString(DFA12_eotS); | ||
1567 | static final short[] DFA12_eof = DFA.unpackEncodedString(DFA12_eofS); | ||
1568 | static final char[] DFA12_min = DFA.unpackEncodedStringToUnsignedChars(DFA12_minS); | ||
1569 | static final char[] DFA12_max = DFA.unpackEncodedStringToUnsignedChars(DFA12_maxS); | ||
1570 | static final short[] DFA12_accept = DFA.unpackEncodedString(DFA12_acceptS); | ||
1571 | static final short[] DFA12_special = DFA.unpackEncodedString(DFA12_specialS); | ||
1572 | static final short[][] DFA12_transition; | ||
1573 | |||
1574 | static { | ||
1575 | int numStates = DFA12_transitionS.length; | ||
1576 | DFA12_transition = new short[numStates][]; | ||
1577 | for (int i=0; i<numStates; i++) { | ||
1578 | DFA12_transition[i] = DFA.unpackEncodedString(DFA12_transitionS[i]); | ||
1579 | } | ||
1580 | } | ||
1581 | |||
1582 | class DFA12 extends DFA { | ||
1583 | |||
1584 | public DFA12(BaseRecognizer recognizer) { | ||
1585 | this.recognizer = recognizer; | ||
1586 | this.decisionNumber = 12; | ||
1587 | this.eot = DFA12_eot; | ||
1588 | this.eof = DFA12_eof; | ||
1589 | this.min = DFA12_min; | ||
1590 | this.max = DFA12_max; | ||
1591 | this.accept = DFA12_accept; | ||
1592 | this.special = DFA12_special; | ||
1593 | this.transition = DFA12_transition; | ||
1594 | } | ||
1595 | public String getDescription() { | ||
1596 | return "1:1: Tokens : ( T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | T__39 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );"; | ||
1597 | } | ||
1598 | public int specialStateTransition(int s, IntStream _input) throws NoViableAltException { | ||
1599 | IntStream input = _input; | ||
1600 | int _s = s; | ||
1601 | switch ( s ) { | ||
1602 | case 0 : | ||
1603 | int LA12_28 = input.LA(1); | ||
1604 | |||
1605 | s = -1; | ||
1606 | if ( ((LA12_28>='\u0000' && LA12_28<='\uFFFF')) ) {s = 63;} | ||
1607 | |||
1608 | else s = 31; | ||
1609 | |||
1610 | if ( s>=0 ) return s; | ||
1611 | break; | ||
1612 | case 1 : | ||
1613 | int LA12_0 = input.LA(1); | ||
1614 | |||
1615 | s = -1; | ||
1616 | if ( (LA12_0=='a') ) {s = 1;} | ||
1617 | |||
1618 | else if ( (LA12_0=='c') ) {s = 2;} | ||
1619 | |||
1620 | else if ( (LA12_0=='e') ) {s = 3;} | ||
1621 | |||
1622 | else if ( (LA12_0=='[') ) {s = 4;} | ||
1623 | |||
1624 | else if ( (LA12_0==',') ) {s = 5;} | ||
1625 | |||
1626 | else if ( (LA12_0==']') ) {s = 6;} | ||
1627 | |||
1628 | else if ( (LA12_0=='.') ) {s = 7;} | ||
1629 | |||
1630 | else if ( (LA12_0=='r') ) {s = 8;} | ||
1631 | |||
1632 | else if ( (LA12_0=='o') ) {s = 9;} | ||
1633 | |||
1634 | else if ( (LA12_0=='p') ) {s = 10;} | ||
1635 | |||
1636 | else if ( (LA12_0=='(') ) {s = 11;} | ||
1637 | |||
1638 | else if ( (LA12_0==')') ) {s = 12;} | ||
1639 | |||
1640 | else if ( (LA12_0==':') ) {s = 13;} | ||
1641 | |||
1642 | else if ( (LA12_0==';') ) {s = 14;} | ||
1643 | |||
1644 | else if ( (LA12_0=='!') ) {s = 15;} | ||
1645 | |||
1646 | else if ( (LA12_0=='+') ) {s = 16;} | ||
1647 | |||
1648 | else if ( (LA12_0=='s') ) {s = 17;} | ||
1649 | |||
1650 | else if ( (LA12_0=='=') ) {s = 18;} | ||
1651 | |||
1652 | else if ( (LA12_0=='*') ) {s = 19;} | ||
1653 | |||
1654 | else if ( (LA12_0=='t') ) {s = 20;} | ||
1655 | |||
1656 | else if ( (LA12_0=='f') ) {s = 21;} | ||
1657 | |||
1658 | else if ( (LA12_0=='u') ) {s = 22;} | ||
1659 | |||
1660 | else if ( (LA12_0=='?') ) {s = 23;} | ||
1661 | |||
1662 | else if ( (LA12_0=='^') ) {s = 24;} | ||
1663 | |||
1664 | else if ( ((LA12_0>='A' && LA12_0<='Z')||LA12_0=='_'||LA12_0=='b'||LA12_0=='d'||(LA12_0>='g' && LA12_0<='n')||LA12_0=='q'||(LA12_0>='v' && LA12_0<='z')) ) {s = 25;} | ||
1665 | |||
1666 | else if ( ((LA12_0>='0' && LA12_0<='9')) ) {s = 26;} | ||
1667 | |||
1668 | else if ( (LA12_0=='\"') ) {s = 27;} | ||
1669 | |||
1670 | else if ( (LA12_0=='\'') ) {s = 28;} | ||
1671 | |||
1672 | else if ( (LA12_0=='/') ) {s = 29;} | ||
1673 | |||
1674 | else if ( ((LA12_0>='\t' && LA12_0<='\n')||LA12_0=='\r'||LA12_0==' ') ) {s = 30;} | ||
1675 | |||
1676 | else if ( ((LA12_0>='\u0000' && LA12_0<='\b')||(LA12_0>='\u000B' && LA12_0<='\f')||(LA12_0>='\u000E' && LA12_0<='\u001F')||(LA12_0>='#' && LA12_0<='&')||LA12_0=='-'||LA12_0=='<'||LA12_0=='>'||LA12_0=='@'||LA12_0=='\\'||LA12_0=='`'||(LA12_0>='{' && LA12_0<='\uFFFF')) ) {s = 31;} | ||
1677 | |||
1678 | if ( s>=0 ) return s; | ||
1679 | break; | ||
1680 | case 2 : | ||
1681 | int LA12_27 = input.LA(1); | ||
1682 | |||
1683 | s = -1; | ||
1684 | if ( ((LA12_27>='\u0000' && LA12_27<='\uFFFF')) ) {s = 63;} | ||
1685 | |||
1686 | else s = 31; | ||
1687 | |||
1688 | if ( s>=0 ) return s; | ||
1689 | break; | ||
1690 | } | ||
1691 | NoViableAltException nvae = | ||
1692 | new NoViableAltException(getDescription(), 12, _s, input); | ||
1693 | error(nvae); | ||
1694 | throw nvae; | ||
1695 | } | ||
1696 | } | ||
1697 | |||
1698 | |||
1699 | } \ No newline at end of file | ||
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblemParser.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblemParser.java new file mode 100644 index 00000000..9bfeb079 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/parser/antlr/internal/InternalProblemParser.java | |||
@@ -0,0 +1,4056 @@ | |||
1 | package org.eclipse.viatra.solver.language.parser.antlr.internal; | ||
2 | |||
3 | import org.eclipse.xtext.*; | ||
4 | import org.eclipse.xtext.parser.*; | ||
5 | import org.eclipse.xtext.parser.impl.*; | ||
6 | import org.eclipse.emf.ecore.util.EcoreUtil; | ||
7 | import org.eclipse.emf.ecore.EObject; | ||
8 | import org.eclipse.emf.common.util.Enumerator; | ||
9 | import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser; | ||
10 | import org.eclipse.xtext.parser.antlr.XtextTokenStream; | ||
11 | import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; | ||
12 | import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; | ||
13 | import org.eclipse.viatra.solver.language.services.ProblemGrammarAccess; | ||
14 | |||
15 | |||
16 | |||
17 | import org.antlr.runtime.*; | ||
18 | import java.util.Stack; | ||
19 | import java.util.List; | ||
20 | import java.util.ArrayList; | ||
21 | |||
22 | @SuppressWarnings("all") | ||
23 | public class InternalProblemParser extends AbstractInternalAntlrParser { | ||
24 | public static final String[] tokenNames = new String[] { | ||
25 | "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_ID", "RULE_INT", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'abstract'", "'class'", "'extends'", "'['", "','", "']'", "'.'", "'contains'", "'refers'", "'opposite'", "'error'", "'pred'", "'('", "')'", "':='", "';'", "'!'", "'+'", "':'", "'scope'", "'+='", "'='", "'..'", "'*'", "'::'", "'true'", "'false'", "'unknown'", "'?'" | ||
26 | }; | ||
27 | public static final int RULE_STRING=6; | ||
28 | public static final int RULE_SL_COMMENT=8; | ||
29 | public static final int T__19=19; | ||
30 | public static final int T__15=15; | ||
31 | public static final int T__37=37; | ||
32 | public static final int T__16=16; | ||
33 | public static final int T__38=38; | ||
34 | public static final int T__17=17; | ||
35 | public static final int T__39=39; | ||
36 | public static final int T__18=18; | ||
37 | public static final int T__11=11; | ||
38 | public static final int T__33=33; | ||
39 | public static final int T__12=12; | ||
40 | public static final int T__34=34; | ||
41 | public static final int T__13=13; | ||
42 | public static final int T__35=35; | ||
43 | public static final int T__14=14; | ||
44 | public static final int T__36=36; | ||
45 | public static final int EOF=-1; | ||
46 | public static final int T__30=30; | ||
47 | public static final int T__31=31; | ||
48 | public static final int T__32=32; | ||
49 | public static final int RULE_ID=4; | ||
50 | public static final int RULE_WS=9; | ||
51 | public static final int RULE_ANY_OTHER=10; | ||
52 | public static final int T__26=26; | ||
53 | public static final int T__27=27; | ||
54 | public static final int T__28=28; | ||
55 | public static final int RULE_INT=5; | ||
56 | public static final int T__29=29; | ||
57 | public static final int T__22=22; | ||
58 | public static final int RULE_ML_COMMENT=7; | ||
59 | public static final int T__23=23; | ||
60 | public static final int T__24=24; | ||
61 | public static final int T__25=25; | ||
62 | public static final int T__20=20; | ||
63 | public static final int T__21=21; | ||
64 | |||
65 | // delegates | ||
66 | // delegators | ||
67 | |||
68 | |||
69 | public InternalProblemParser(TokenStream input) { | ||
70 | this(input, new RecognizerSharedState()); | ||
71 | } | ||
72 | public InternalProblemParser(TokenStream input, RecognizerSharedState state) { | ||
73 | super(input, state); | ||
74 | |||
75 | } | ||
76 | |||
77 | |||
78 | public String[] getTokenNames() { return InternalProblemParser.tokenNames; } | ||
79 | public String getGrammarFileName() { return "InternalProblem.g"; } | ||
80 | |||
81 | |||
82 | |||
83 | private ProblemGrammarAccess grammarAccess; | ||
84 | |||
85 | public InternalProblemParser(TokenStream input, ProblemGrammarAccess grammarAccess) { | ||
86 | this(input); | ||
87 | this.grammarAccess = grammarAccess; | ||
88 | registerRules(grammarAccess.getGrammar()); | ||
89 | } | ||
90 | |||
91 | @Override | ||
92 | protected String getFirstRuleName() { | ||
93 | return "Problem"; | ||
94 | } | ||
95 | |||
96 | @Override | ||
97 | protected ProblemGrammarAccess getGrammarAccess() { | ||
98 | return grammarAccess; | ||
99 | } | ||
100 | |||
101 | |||
102 | |||
103 | |||
104 | // $ANTLR start "entryRuleProblem" | ||
105 | // InternalProblem.g:65:1: entryRuleProblem returns [EObject current=null] : iv_ruleProblem= ruleProblem EOF ; | ||
106 | public final EObject entryRuleProblem() throws RecognitionException { | ||
107 | EObject current = null; | ||
108 | |||
109 | EObject iv_ruleProblem = null; | ||
110 | |||
111 | |||
112 | try { | ||
113 | // InternalProblem.g:65:48: (iv_ruleProblem= ruleProblem EOF ) | ||
114 | // InternalProblem.g:66:2: iv_ruleProblem= ruleProblem EOF | ||
115 | { | ||
116 | newCompositeNode(grammarAccess.getProblemRule()); | ||
117 | pushFollow(FOLLOW_1); | ||
118 | iv_ruleProblem=ruleProblem(); | ||
119 | |||
120 | state._fsp--; | ||
121 | |||
122 | current =iv_ruleProblem; | ||
123 | match(input,EOF,FOLLOW_2); | ||
124 | |||
125 | } | ||
126 | |||
127 | } | ||
128 | |||
129 | catch (RecognitionException re) { | ||
130 | recover(input,re); | ||
131 | appendSkippedTokens(); | ||
132 | } | ||
133 | finally { | ||
134 | } | ||
135 | return current; | ||
136 | } | ||
137 | // $ANTLR end "entryRuleProblem" | ||
138 | |||
139 | |||
140 | // $ANTLR start "ruleProblem" | ||
141 | // InternalProblem.g:72:1: ruleProblem returns [EObject current=null] : ( (lv_statements_0_0= ruleStatement ) )* ; | ||
142 | public final EObject ruleProblem() throws RecognitionException { | ||
143 | EObject current = null; | ||
144 | |||
145 | EObject lv_statements_0_0 = null; | ||
146 | |||
147 | |||
148 | |||
149 | enterRule(); | ||
150 | |||
151 | try { | ||
152 | // InternalProblem.g:78:2: ( ( (lv_statements_0_0= ruleStatement ) )* ) | ||
153 | // InternalProblem.g:79:2: ( (lv_statements_0_0= ruleStatement ) )* | ||
154 | { | ||
155 | // InternalProblem.g:79:2: ( (lv_statements_0_0= ruleStatement ) )* | ||
156 | loop1: | ||
157 | do { | ||
158 | int alt1=2; | ||
159 | int LA1_0 = input.LA(1); | ||
160 | |||
161 | if ( (LA1_0==RULE_ID||(LA1_0>=11 && LA1_0<=12)||(LA1_0>=21 && LA1_0<=22)||LA1_0==27||LA1_0==30||LA1_0==39) ) { | ||
162 | alt1=1; | ||
163 | } | ||
164 | |||
165 | |||
166 | switch (alt1) { | ||
167 | case 1 : | ||
168 | // InternalProblem.g:80:3: (lv_statements_0_0= ruleStatement ) | ||
169 | { | ||
170 | // InternalProblem.g:80:3: (lv_statements_0_0= ruleStatement ) | ||
171 | // InternalProblem.g:81:4: lv_statements_0_0= ruleStatement | ||
172 | { | ||
173 | |||
174 | newCompositeNode(grammarAccess.getProblemAccess().getStatementsStatementParserRuleCall_0()); | ||
175 | |||
176 | pushFollow(FOLLOW_3); | ||
177 | lv_statements_0_0=ruleStatement(); | ||
178 | |||
179 | state._fsp--; | ||
180 | |||
181 | |||
182 | if (current==null) { | ||
183 | current = createModelElementForParent(grammarAccess.getProblemRule()); | ||
184 | } | ||
185 | add( | ||
186 | current, | ||
187 | "statements", | ||
188 | lv_statements_0_0, | ||
189 | "org.eclipse.viatra.solver.language.Problem.Statement"); | ||
190 | afterParserOrEnumRuleCall(); | ||
191 | |||
192 | |||
193 | } | ||
194 | |||
195 | |||
196 | } | ||
197 | break; | ||
198 | |||
199 | default : | ||
200 | break loop1; | ||
201 | } | ||
202 | } while (true); | ||
203 | |||
204 | |||
205 | } | ||
206 | |||
207 | |||
208 | leaveRule(); | ||
209 | |||
210 | } | ||
211 | |||
212 | catch (RecognitionException re) { | ||
213 | recover(input,re); | ||
214 | appendSkippedTokens(); | ||
215 | } | ||
216 | finally { | ||
217 | } | ||
218 | return current; | ||
219 | } | ||
220 | // $ANTLR end "ruleProblem" | ||
221 | |||
222 | |||
223 | // $ANTLR start "entryRuleStatement" | ||
224 | // InternalProblem.g:101:1: entryRuleStatement returns [EObject current=null] : iv_ruleStatement= ruleStatement EOF ; | ||
225 | public final EObject entryRuleStatement() throws RecognitionException { | ||
226 | EObject current = null; | ||
227 | |||
228 | EObject iv_ruleStatement = null; | ||
229 | |||
230 | |||
231 | try { | ||
232 | // InternalProblem.g:101:50: (iv_ruleStatement= ruleStatement EOF ) | ||
233 | // InternalProblem.g:102:2: iv_ruleStatement= ruleStatement EOF | ||
234 | { | ||
235 | newCompositeNode(grammarAccess.getStatementRule()); | ||
236 | pushFollow(FOLLOW_1); | ||
237 | iv_ruleStatement=ruleStatement(); | ||
238 | |||
239 | state._fsp--; | ||
240 | |||
241 | current =iv_ruleStatement; | ||
242 | match(input,EOF,FOLLOW_2); | ||
243 | |||
244 | } | ||
245 | |||
246 | } | ||
247 | |||
248 | catch (RecognitionException re) { | ||
249 | recover(input,re); | ||
250 | appendSkippedTokens(); | ||
251 | } | ||
252 | finally { | ||
253 | } | ||
254 | return current; | ||
255 | } | ||
256 | // $ANTLR end "entryRuleStatement" | ||
257 | |||
258 | |||
259 | // $ANTLR start "ruleStatement" | ||
260 | // InternalProblem.g:108:1: ruleStatement returns [EObject current=null] : (this_ClassDeclaration_0= ruleClassDeclaration | this_PredicateDefinition_1= rulePredicateDefinition | this_Assertion_2= ruleAssertion | this_ScopeDeclaration_3= ruleScopeDeclaration ) ; | ||
261 | public final EObject ruleStatement() throws RecognitionException { | ||
262 | EObject current = null; | ||
263 | |||
264 | EObject this_ClassDeclaration_0 = null; | ||
265 | |||
266 | EObject this_PredicateDefinition_1 = null; | ||
267 | |||
268 | EObject this_Assertion_2 = null; | ||
269 | |||
270 | EObject this_ScopeDeclaration_3 = null; | ||
271 | |||
272 | |||
273 | |||
274 | enterRule(); | ||
275 | |||
276 | try { | ||
277 | // InternalProblem.g:114:2: ( (this_ClassDeclaration_0= ruleClassDeclaration | this_PredicateDefinition_1= rulePredicateDefinition | this_Assertion_2= ruleAssertion | this_ScopeDeclaration_3= ruleScopeDeclaration ) ) | ||
278 | // InternalProblem.g:115:2: (this_ClassDeclaration_0= ruleClassDeclaration | this_PredicateDefinition_1= rulePredicateDefinition | this_Assertion_2= ruleAssertion | this_ScopeDeclaration_3= ruleScopeDeclaration ) | ||
279 | { | ||
280 | // InternalProblem.g:115:2: (this_ClassDeclaration_0= ruleClassDeclaration | this_PredicateDefinition_1= rulePredicateDefinition | this_Assertion_2= ruleAssertion | this_ScopeDeclaration_3= ruleScopeDeclaration ) | ||
281 | int alt2=4; | ||
282 | switch ( input.LA(1) ) { | ||
283 | case 11: | ||
284 | case 12: | ||
285 | { | ||
286 | alt2=1; | ||
287 | } | ||
288 | break; | ||
289 | case 21: | ||
290 | case 22: | ||
291 | { | ||
292 | alt2=2; | ||
293 | } | ||
294 | break; | ||
295 | case RULE_ID: | ||
296 | case 27: | ||
297 | case 39: | ||
298 | { | ||
299 | alt2=3; | ||
300 | } | ||
301 | break; | ||
302 | case 30: | ||
303 | { | ||
304 | alt2=4; | ||
305 | } | ||
306 | break; | ||
307 | default: | ||
308 | NoViableAltException nvae = | ||
309 | new NoViableAltException("", 2, 0, input); | ||
310 | |||
311 | throw nvae; | ||
312 | } | ||
313 | |||
314 | switch (alt2) { | ||
315 | case 1 : | ||
316 | // InternalProblem.g:116:3: this_ClassDeclaration_0= ruleClassDeclaration | ||
317 | { | ||
318 | |||
319 | newCompositeNode(grammarAccess.getStatementAccess().getClassDeclarationParserRuleCall_0()); | ||
320 | |||
321 | pushFollow(FOLLOW_2); | ||
322 | this_ClassDeclaration_0=ruleClassDeclaration(); | ||
323 | |||
324 | state._fsp--; | ||
325 | |||
326 | |||
327 | current = this_ClassDeclaration_0; | ||
328 | afterParserOrEnumRuleCall(); | ||
329 | |||
330 | |||
331 | } | ||
332 | break; | ||
333 | case 2 : | ||
334 | // InternalProblem.g:125:3: this_PredicateDefinition_1= rulePredicateDefinition | ||
335 | { | ||
336 | |||
337 | newCompositeNode(grammarAccess.getStatementAccess().getPredicateDefinitionParserRuleCall_1()); | ||
338 | |||
339 | pushFollow(FOLLOW_2); | ||
340 | this_PredicateDefinition_1=rulePredicateDefinition(); | ||
341 | |||
342 | state._fsp--; | ||
343 | |||
344 | |||
345 | current = this_PredicateDefinition_1; | ||
346 | afterParserOrEnumRuleCall(); | ||
347 | |||
348 | |||
349 | } | ||
350 | break; | ||
351 | case 3 : | ||
352 | // InternalProblem.g:134:3: this_Assertion_2= ruleAssertion | ||
353 | { | ||
354 | |||
355 | newCompositeNode(grammarAccess.getStatementAccess().getAssertionParserRuleCall_2()); | ||
356 | |||
357 | pushFollow(FOLLOW_2); | ||
358 | this_Assertion_2=ruleAssertion(); | ||
359 | |||
360 | state._fsp--; | ||
361 | |||
362 | |||
363 | current = this_Assertion_2; | ||
364 | afterParserOrEnumRuleCall(); | ||
365 | |||
366 | |||
367 | } | ||
368 | break; | ||
369 | case 4 : | ||
370 | // InternalProblem.g:143:3: this_ScopeDeclaration_3= ruleScopeDeclaration | ||
371 | { | ||
372 | |||
373 | newCompositeNode(grammarAccess.getStatementAccess().getScopeDeclarationParserRuleCall_3()); | ||
374 | |||
375 | pushFollow(FOLLOW_2); | ||
376 | this_ScopeDeclaration_3=ruleScopeDeclaration(); | ||
377 | |||
378 | state._fsp--; | ||
379 | |||
380 | |||
381 | current = this_ScopeDeclaration_3; | ||
382 | afterParserOrEnumRuleCall(); | ||
383 | |||
384 | |||
385 | } | ||
386 | break; | ||
387 | |||
388 | } | ||
389 | |||
390 | |||
391 | } | ||
392 | |||
393 | |||
394 | leaveRule(); | ||
395 | |||
396 | } | ||
397 | |||
398 | catch (RecognitionException re) { | ||
399 | recover(input,re); | ||
400 | appendSkippedTokens(); | ||
401 | } | ||
402 | finally { | ||
403 | } | ||
404 | return current; | ||
405 | } | ||
406 | // $ANTLR end "ruleStatement" | ||
407 | |||
408 | |||
409 | // $ANTLR start "entryRuleClassDeclaration" | ||
410 | // InternalProblem.g:155:1: entryRuleClassDeclaration returns [EObject current=null] : iv_ruleClassDeclaration= ruleClassDeclaration EOF ; | ||
411 | public final EObject entryRuleClassDeclaration() throws RecognitionException { | ||
412 | EObject current = null; | ||
413 | |||
414 | EObject iv_ruleClassDeclaration = null; | ||
415 | |||
416 | |||
417 | try { | ||
418 | // InternalProblem.g:155:57: (iv_ruleClassDeclaration= ruleClassDeclaration EOF ) | ||
419 | // InternalProblem.g:156:2: iv_ruleClassDeclaration= ruleClassDeclaration EOF | ||
420 | { | ||
421 | newCompositeNode(grammarAccess.getClassDeclarationRule()); | ||
422 | pushFollow(FOLLOW_1); | ||
423 | iv_ruleClassDeclaration=ruleClassDeclaration(); | ||
424 | |||
425 | state._fsp--; | ||
426 | |||
427 | current =iv_ruleClassDeclaration; | ||
428 | match(input,EOF,FOLLOW_2); | ||
429 | |||
430 | } | ||
431 | |||
432 | } | ||
433 | |||
434 | catch (RecognitionException re) { | ||
435 | recover(input,re); | ||
436 | appendSkippedTokens(); | ||
437 | } | ||
438 | finally { | ||
439 | } | ||
440 | return current; | ||
441 | } | ||
442 | // $ANTLR end "entryRuleClassDeclaration" | ||
443 | |||
444 | |||
445 | // $ANTLR start "ruleClassDeclaration" | ||
446 | // InternalProblem.g:162:1: ruleClassDeclaration returns [EObject current=null] : ( ( (lv_abstract_0_0= 'abstract' ) )? otherlv_1= 'class' ( (lv_name_2_0= RULE_ID ) ) ( (otherlv_3= 'extends' ( ( (otherlv_4= RULE_ID ) ) | (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) ) ) | ( (lv_referenceDeclarations_10_0= ruleReferenceDeclaration ) ) )? (otherlv_11= ',' ( (lv_referenceDeclarations_12_0= ruleReferenceDeclaration ) ) )* otherlv_13= '.' ) ; | ||
447 | public final EObject ruleClassDeclaration() throws RecognitionException { | ||
448 | EObject current = null; | ||
449 | |||
450 | Token lv_abstract_0_0=null; | ||
451 | Token otherlv_1=null; | ||
452 | Token lv_name_2_0=null; | ||
453 | Token otherlv_3=null; | ||
454 | Token otherlv_4=null; | ||
455 | Token otherlv_5=null; | ||
456 | Token otherlv_6=null; | ||
457 | Token otherlv_7=null; | ||
458 | Token otherlv_8=null; | ||
459 | Token otherlv_9=null; | ||
460 | Token otherlv_11=null; | ||
461 | Token otherlv_13=null; | ||
462 | EObject lv_referenceDeclarations_10_0 = null; | ||
463 | |||
464 | EObject lv_referenceDeclarations_12_0 = null; | ||
465 | |||
466 | |||
467 | |||
468 | enterRule(); | ||
469 | |||
470 | try { | ||
471 | // InternalProblem.g:168:2: ( ( ( (lv_abstract_0_0= 'abstract' ) )? otherlv_1= 'class' ( (lv_name_2_0= RULE_ID ) ) ( (otherlv_3= 'extends' ( ( (otherlv_4= RULE_ID ) ) | (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) ) ) | ( (lv_referenceDeclarations_10_0= ruleReferenceDeclaration ) ) )? (otherlv_11= ',' ( (lv_referenceDeclarations_12_0= ruleReferenceDeclaration ) ) )* otherlv_13= '.' ) ) | ||
472 | // InternalProblem.g:169:2: ( ( (lv_abstract_0_0= 'abstract' ) )? otherlv_1= 'class' ( (lv_name_2_0= RULE_ID ) ) ( (otherlv_3= 'extends' ( ( (otherlv_4= RULE_ID ) ) | (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) ) ) | ( (lv_referenceDeclarations_10_0= ruleReferenceDeclaration ) ) )? (otherlv_11= ',' ( (lv_referenceDeclarations_12_0= ruleReferenceDeclaration ) ) )* otherlv_13= '.' ) | ||
473 | { | ||
474 | // InternalProblem.g:169:2: ( ( (lv_abstract_0_0= 'abstract' ) )? otherlv_1= 'class' ( (lv_name_2_0= RULE_ID ) ) ( (otherlv_3= 'extends' ( ( (otherlv_4= RULE_ID ) ) | (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) ) ) | ( (lv_referenceDeclarations_10_0= ruleReferenceDeclaration ) ) )? (otherlv_11= ',' ( (lv_referenceDeclarations_12_0= ruleReferenceDeclaration ) ) )* otherlv_13= '.' ) | ||
475 | // InternalProblem.g:170:3: ( (lv_abstract_0_0= 'abstract' ) )? otherlv_1= 'class' ( (lv_name_2_0= RULE_ID ) ) ( (otherlv_3= 'extends' ( ( (otherlv_4= RULE_ID ) ) | (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) ) ) | ( (lv_referenceDeclarations_10_0= ruleReferenceDeclaration ) ) )? (otherlv_11= ',' ( (lv_referenceDeclarations_12_0= ruleReferenceDeclaration ) ) )* otherlv_13= '.' | ||
476 | { | ||
477 | // InternalProblem.g:170:3: ( (lv_abstract_0_0= 'abstract' ) )? | ||
478 | int alt3=2; | ||
479 | int LA3_0 = input.LA(1); | ||
480 | |||
481 | if ( (LA3_0==11) ) { | ||
482 | alt3=1; | ||
483 | } | ||
484 | switch (alt3) { | ||
485 | case 1 : | ||
486 | // InternalProblem.g:171:4: (lv_abstract_0_0= 'abstract' ) | ||
487 | { | ||
488 | // InternalProblem.g:171:4: (lv_abstract_0_0= 'abstract' ) | ||
489 | // InternalProblem.g:172:5: lv_abstract_0_0= 'abstract' | ||
490 | { | ||
491 | lv_abstract_0_0=(Token)match(input,11,FOLLOW_4); | ||
492 | |||
493 | newLeafNode(lv_abstract_0_0, grammarAccess.getClassDeclarationAccess().getAbstractAbstractKeyword_0_0()); | ||
494 | |||
495 | |||
496 | if (current==null) { | ||
497 | current = createModelElement(grammarAccess.getClassDeclarationRule()); | ||
498 | } | ||
499 | setWithLastConsumed(current, "abstract", lv_abstract_0_0 != null, "abstract"); | ||
500 | |||
501 | |||
502 | } | ||
503 | |||
504 | |||
505 | } | ||
506 | break; | ||
507 | |||
508 | } | ||
509 | |||
510 | otherlv_1=(Token)match(input,12,FOLLOW_5); | ||
511 | |||
512 | newLeafNode(otherlv_1, grammarAccess.getClassDeclarationAccess().getClassKeyword_1()); | ||
513 | |||
514 | // InternalProblem.g:188:3: ( (lv_name_2_0= RULE_ID ) ) | ||
515 | // InternalProblem.g:189:4: (lv_name_2_0= RULE_ID ) | ||
516 | { | ||
517 | // InternalProblem.g:189:4: (lv_name_2_0= RULE_ID ) | ||
518 | // InternalProblem.g:190:5: lv_name_2_0= RULE_ID | ||
519 | { | ||
520 | lv_name_2_0=(Token)match(input,RULE_ID,FOLLOW_6); | ||
521 | |||
522 | newLeafNode(lv_name_2_0, grammarAccess.getClassDeclarationAccess().getNameIDTerminalRuleCall_2_0()); | ||
523 | |||
524 | |||
525 | if (current==null) { | ||
526 | current = createModelElement(grammarAccess.getClassDeclarationRule()); | ||
527 | } | ||
528 | setWithLastConsumed( | ||
529 | current, | ||
530 | "name", | ||
531 | lv_name_2_0, | ||
532 | "org.eclipse.xtext.common.Terminals.ID"); | ||
533 | |||
534 | |||
535 | } | ||
536 | |||
537 | |||
538 | } | ||
539 | |||
540 | // InternalProblem.g:206:3: ( (otherlv_3= 'extends' ( ( (otherlv_4= RULE_ID ) ) | (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) ) ) | ( (lv_referenceDeclarations_10_0= ruleReferenceDeclaration ) ) )? | ||
541 | int alt7=3; | ||
542 | int LA7_0 = input.LA(1); | ||
543 | |||
544 | if ( (LA7_0==13) ) { | ||
545 | alt7=1; | ||
546 | } | ||
547 | else if ( ((LA7_0>=18 && LA7_0<=19)) ) { | ||
548 | alt7=2; | ||
549 | } | ||
550 | switch (alt7) { | ||
551 | case 1 : | ||
552 | // InternalProblem.g:207:4: (otherlv_3= 'extends' ( ( (otherlv_4= RULE_ID ) ) | (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) ) ) | ||
553 | { | ||
554 | // InternalProblem.g:207:4: (otherlv_3= 'extends' ( ( (otherlv_4= RULE_ID ) ) | (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) ) ) | ||
555 | // InternalProblem.g:208:5: otherlv_3= 'extends' ( ( (otherlv_4= RULE_ID ) ) | (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) ) | ||
556 | { | ||
557 | otherlv_3=(Token)match(input,13,FOLLOW_7); | ||
558 | |||
559 | newLeafNode(otherlv_3, grammarAccess.getClassDeclarationAccess().getExtendsKeyword_3_0_0()); | ||
560 | |||
561 | // InternalProblem.g:212:5: ( ( (otherlv_4= RULE_ID ) ) | (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) ) | ||
562 | int alt6=2; | ||
563 | int LA6_0 = input.LA(1); | ||
564 | |||
565 | if ( (LA6_0==RULE_ID) ) { | ||
566 | alt6=1; | ||
567 | } | ||
568 | else if ( (LA6_0==14) ) { | ||
569 | alt6=2; | ||
570 | } | ||
571 | else { | ||
572 | NoViableAltException nvae = | ||
573 | new NoViableAltException("", 6, 0, input); | ||
574 | |||
575 | throw nvae; | ||
576 | } | ||
577 | switch (alt6) { | ||
578 | case 1 : | ||
579 | // InternalProblem.g:213:6: ( (otherlv_4= RULE_ID ) ) | ||
580 | { | ||
581 | // InternalProblem.g:213:6: ( (otherlv_4= RULE_ID ) ) | ||
582 | // InternalProblem.g:214:7: (otherlv_4= RULE_ID ) | ||
583 | { | ||
584 | // InternalProblem.g:214:7: (otherlv_4= RULE_ID ) | ||
585 | // InternalProblem.g:215:8: otherlv_4= RULE_ID | ||
586 | { | ||
587 | |||
588 | if (current==null) { | ||
589 | current = createModelElement(grammarAccess.getClassDeclarationRule()); | ||
590 | } | ||
591 | |||
592 | otherlv_4=(Token)match(input,RULE_ID,FOLLOW_8); | ||
593 | |||
594 | newLeafNode(otherlv_4, grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_0_0()); | ||
595 | |||
596 | |||
597 | } | ||
598 | |||
599 | |||
600 | } | ||
601 | |||
602 | |||
603 | } | ||
604 | break; | ||
605 | case 2 : | ||
606 | // InternalProblem.g:227:6: (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) | ||
607 | { | ||
608 | // InternalProblem.g:227:6: (otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' ) | ||
609 | // InternalProblem.g:228:7: otherlv_5= '[' ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? otherlv_9= ']' | ||
610 | { | ||
611 | otherlv_5=(Token)match(input,14,FOLLOW_9); | ||
612 | |||
613 | newLeafNode(otherlv_5, grammarAccess.getClassDeclarationAccess().getLeftSquareBracketKeyword_3_0_1_1_0()); | ||
614 | |||
615 | // InternalProblem.g:232:7: ( ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* )? | ||
616 | int alt5=2; | ||
617 | int LA5_0 = input.LA(1); | ||
618 | |||
619 | if ( (LA5_0==RULE_ID) ) { | ||
620 | alt5=1; | ||
621 | } | ||
622 | switch (alt5) { | ||
623 | case 1 : | ||
624 | // InternalProblem.g:233:8: ( (otherlv_6= RULE_ID ) ) (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* | ||
625 | { | ||
626 | // InternalProblem.g:233:8: ( (otherlv_6= RULE_ID ) ) | ||
627 | // InternalProblem.g:234:9: (otherlv_6= RULE_ID ) | ||
628 | { | ||
629 | // InternalProblem.g:234:9: (otherlv_6= RULE_ID ) | ||
630 | // InternalProblem.g:235:10: otherlv_6= RULE_ID | ||
631 | { | ||
632 | |||
633 | if (current==null) { | ||
634 | current = createModelElement(grammarAccess.getClassDeclarationRule()); | ||
635 | } | ||
636 | |||
637 | otherlv_6=(Token)match(input,RULE_ID,FOLLOW_10); | ||
638 | |||
639 | newLeafNode(otherlv_6, grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_1_1_0_0()); | ||
640 | |||
641 | |||
642 | } | ||
643 | |||
644 | |||
645 | } | ||
646 | |||
647 | // InternalProblem.g:246:8: (otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) )* | ||
648 | loop4: | ||
649 | do { | ||
650 | int alt4=2; | ||
651 | int LA4_0 = input.LA(1); | ||
652 | |||
653 | if ( (LA4_0==15) ) { | ||
654 | alt4=1; | ||
655 | } | ||
656 | |||
657 | |||
658 | switch (alt4) { | ||
659 | case 1 : | ||
660 | // InternalProblem.g:247:9: otherlv_7= ',' ( (otherlv_8= RULE_ID ) ) | ||
661 | { | ||
662 | otherlv_7=(Token)match(input,15,FOLLOW_5); | ||
663 | |||
664 | newLeafNode(otherlv_7, grammarAccess.getClassDeclarationAccess().getCommaKeyword_3_0_1_1_1_1_0()); | ||
665 | |||
666 | // InternalProblem.g:251:9: ( (otherlv_8= RULE_ID ) ) | ||
667 | // InternalProblem.g:252:10: (otherlv_8= RULE_ID ) | ||
668 | { | ||
669 | // InternalProblem.g:252:10: (otherlv_8= RULE_ID ) | ||
670 | // InternalProblem.g:253:11: otherlv_8= RULE_ID | ||
671 | { | ||
672 | |||
673 | if (current==null) { | ||
674 | current = createModelElement(grammarAccess.getClassDeclarationRule()); | ||
675 | } | ||
676 | |||
677 | otherlv_8=(Token)match(input,RULE_ID,FOLLOW_10); | ||
678 | |||
679 | newLeafNode(otherlv_8, grammarAccess.getClassDeclarationAccess().getSuperTypesClassDeclarationCrossReference_3_0_1_1_1_1_1_0()); | ||
680 | |||
681 | |||
682 | } | ||
683 | |||
684 | |||
685 | } | ||
686 | |||
687 | |||
688 | } | ||
689 | break; | ||
690 | |||
691 | default : | ||
692 | break loop4; | ||
693 | } | ||
694 | } while (true); | ||
695 | |||
696 | |||
697 | } | ||
698 | break; | ||
699 | |||
700 | } | ||
701 | |||
702 | otherlv_9=(Token)match(input,16,FOLLOW_8); | ||
703 | |||
704 | newLeafNode(otherlv_9, grammarAccess.getClassDeclarationAccess().getRightSquareBracketKeyword_3_0_1_1_2()); | ||
705 | |||
706 | |||
707 | } | ||
708 | |||
709 | |||
710 | } | ||
711 | break; | ||
712 | |||
713 | } | ||
714 | |||
715 | |||
716 | } | ||
717 | |||
718 | |||
719 | } | ||
720 | break; | ||
721 | case 2 : | ||
722 | // InternalProblem.g:274:4: ( (lv_referenceDeclarations_10_0= ruleReferenceDeclaration ) ) | ||
723 | { | ||
724 | // InternalProblem.g:274:4: ( (lv_referenceDeclarations_10_0= ruleReferenceDeclaration ) ) | ||
725 | // InternalProblem.g:275:5: (lv_referenceDeclarations_10_0= ruleReferenceDeclaration ) | ||
726 | { | ||
727 | // InternalProblem.g:275:5: (lv_referenceDeclarations_10_0= ruleReferenceDeclaration ) | ||
728 | // InternalProblem.g:276:6: lv_referenceDeclarations_10_0= ruleReferenceDeclaration | ||
729 | { | ||
730 | |||
731 | newCompositeNode(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsReferenceDeclarationParserRuleCall_3_1_0()); | ||
732 | |||
733 | pushFollow(FOLLOW_8); | ||
734 | lv_referenceDeclarations_10_0=ruleReferenceDeclaration(); | ||
735 | |||
736 | state._fsp--; | ||
737 | |||
738 | |||
739 | if (current==null) { | ||
740 | current = createModelElementForParent(grammarAccess.getClassDeclarationRule()); | ||
741 | } | ||
742 | add( | ||
743 | current, | ||
744 | "referenceDeclarations", | ||
745 | lv_referenceDeclarations_10_0, | ||
746 | "org.eclipse.viatra.solver.language.Problem.ReferenceDeclaration"); | ||
747 | afterParserOrEnumRuleCall(); | ||
748 | |||
749 | |||
750 | } | ||
751 | |||
752 | |||
753 | } | ||
754 | |||
755 | |||
756 | } | ||
757 | break; | ||
758 | |||
759 | } | ||
760 | |||
761 | // InternalProblem.g:294:3: (otherlv_11= ',' ( (lv_referenceDeclarations_12_0= ruleReferenceDeclaration ) ) )* | ||
762 | loop8: | ||
763 | do { | ||
764 | int alt8=2; | ||
765 | int LA8_0 = input.LA(1); | ||
766 | |||
767 | if ( (LA8_0==15) ) { | ||
768 | alt8=1; | ||
769 | } | ||
770 | |||
771 | |||
772 | switch (alt8) { | ||
773 | case 1 : | ||
774 | // InternalProblem.g:295:4: otherlv_11= ',' ( (lv_referenceDeclarations_12_0= ruleReferenceDeclaration ) ) | ||
775 | { | ||
776 | otherlv_11=(Token)match(input,15,FOLLOW_11); | ||
777 | |||
778 | newLeafNode(otherlv_11, grammarAccess.getClassDeclarationAccess().getCommaKeyword_4_0()); | ||
779 | |||
780 | // InternalProblem.g:299:4: ( (lv_referenceDeclarations_12_0= ruleReferenceDeclaration ) ) | ||
781 | // InternalProblem.g:300:5: (lv_referenceDeclarations_12_0= ruleReferenceDeclaration ) | ||
782 | { | ||
783 | // InternalProblem.g:300:5: (lv_referenceDeclarations_12_0= ruleReferenceDeclaration ) | ||
784 | // InternalProblem.g:301:6: lv_referenceDeclarations_12_0= ruleReferenceDeclaration | ||
785 | { | ||
786 | |||
787 | newCompositeNode(grammarAccess.getClassDeclarationAccess().getReferenceDeclarationsReferenceDeclarationParserRuleCall_4_1_0()); | ||
788 | |||
789 | pushFollow(FOLLOW_8); | ||
790 | lv_referenceDeclarations_12_0=ruleReferenceDeclaration(); | ||
791 | |||
792 | state._fsp--; | ||
793 | |||
794 | |||
795 | if (current==null) { | ||
796 | current = createModelElementForParent(grammarAccess.getClassDeclarationRule()); | ||
797 | } | ||
798 | add( | ||
799 | current, | ||
800 | "referenceDeclarations", | ||
801 | lv_referenceDeclarations_12_0, | ||
802 | "org.eclipse.viatra.solver.language.Problem.ReferenceDeclaration"); | ||
803 | afterParserOrEnumRuleCall(); | ||
804 | |||
805 | |||
806 | } | ||
807 | |||
808 | |||
809 | } | ||
810 | |||
811 | |||
812 | } | ||
813 | break; | ||
814 | |||
815 | default : | ||
816 | break loop8; | ||
817 | } | ||
818 | } while (true); | ||
819 | |||
820 | otherlv_13=(Token)match(input,17,FOLLOW_2); | ||
821 | |||
822 | newLeafNode(otherlv_13, grammarAccess.getClassDeclarationAccess().getFullStopKeyword_5()); | ||
823 | |||
824 | |||
825 | } | ||
826 | |||
827 | |||
828 | } | ||
829 | |||
830 | |||
831 | leaveRule(); | ||
832 | |||
833 | } | ||
834 | |||
835 | catch (RecognitionException re) { | ||
836 | recover(input,re); | ||
837 | appendSkippedTokens(); | ||
838 | } | ||
839 | finally { | ||
840 | } | ||
841 | return current; | ||
842 | } | ||
843 | // $ANTLR end "ruleClassDeclaration" | ||
844 | |||
845 | |||
846 | // $ANTLR start "entryRuleReferenceDeclaration" | ||
847 | // InternalProblem.g:327:1: entryRuleReferenceDeclaration returns [EObject current=null] : iv_ruleReferenceDeclaration= ruleReferenceDeclaration EOF ; | ||
848 | public final EObject entryRuleReferenceDeclaration() throws RecognitionException { | ||
849 | EObject current = null; | ||
850 | |||
851 | EObject iv_ruleReferenceDeclaration = null; | ||
852 | |||
853 | |||
854 | try { | ||
855 | // InternalProblem.g:327:61: (iv_ruleReferenceDeclaration= ruleReferenceDeclaration EOF ) | ||
856 | // InternalProblem.g:328:2: iv_ruleReferenceDeclaration= ruleReferenceDeclaration EOF | ||
857 | { | ||
858 | newCompositeNode(grammarAccess.getReferenceDeclarationRule()); | ||
859 | pushFollow(FOLLOW_1); | ||
860 | iv_ruleReferenceDeclaration=ruleReferenceDeclaration(); | ||
861 | |||
862 | state._fsp--; | ||
863 | |||
864 | current =iv_ruleReferenceDeclaration; | ||
865 | match(input,EOF,FOLLOW_2); | ||
866 | |||
867 | } | ||
868 | |||
869 | } | ||
870 | |||
871 | catch (RecognitionException re) { | ||
872 | recover(input,re); | ||
873 | appendSkippedTokens(); | ||
874 | } | ||
875 | finally { | ||
876 | } | ||
877 | return current; | ||
878 | } | ||
879 | // $ANTLR end "entryRuleReferenceDeclaration" | ||
880 | |||
881 | |||
882 | // $ANTLR start "ruleReferenceDeclaration" | ||
883 | // InternalProblem.g:334:1: ruleReferenceDeclaration returns [EObject current=null] : ( ( ( (lv_containment_0_0= 'contains' ) ) | otherlv_1= 'refers' ) ( (otherlv_2= RULE_ID ) ) otherlv_3= '[' ( (lv_multiplicity_4_0= ruleMultiplicity ) ) otherlv_5= ']' ( (lv_name_6_0= RULE_ID ) ) (otherlv_7= 'opposite' ( ( ruleQualifiedName ) ) )? ) ; | ||
884 | public final EObject ruleReferenceDeclaration() throws RecognitionException { | ||
885 | EObject current = null; | ||
886 | |||
887 | Token lv_containment_0_0=null; | ||
888 | Token otherlv_1=null; | ||
889 | Token otherlv_2=null; | ||
890 | Token otherlv_3=null; | ||
891 | Token otherlv_5=null; | ||
892 | Token lv_name_6_0=null; | ||
893 | Token otherlv_7=null; | ||
894 | EObject lv_multiplicity_4_0 = null; | ||
895 | |||
896 | |||
897 | |||
898 | enterRule(); | ||
899 | |||
900 | try { | ||
901 | // InternalProblem.g:340:2: ( ( ( ( (lv_containment_0_0= 'contains' ) ) | otherlv_1= 'refers' ) ( (otherlv_2= RULE_ID ) ) otherlv_3= '[' ( (lv_multiplicity_4_0= ruleMultiplicity ) ) otherlv_5= ']' ( (lv_name_6_0= RULE_ID ) ) (otherlv_7= 'opposite' ( ( ruleQualifiedName ) ) )? ) ) | ||
902 | // InternalProblem.g:341:2: ( ( ( (lv_containment_0_0= 'contains' ) ) | otherlv_1= 'refers' ) ( (otherlv_2= RULE_ID ) ) otherlv_3= '[' ( (lv_multiplicity_4_0= ruleMultiplicity ) ) otherlv_5= ']' ( (lv_name_6_0= RULE_ID ) ) (otherlv_7= 'opposite' ( ( ruleQualifiedName ) ) )? ) | ||
903 | { | ||
904 | // InternalProblem.g:341:2: ( ( ( (lv_containment_0_0= 'contains' ) ) | otherlv_1= 'refers' ) ( (otherlv_2= RULE_ID ) ) otherlv_3= '[' ( (lv_multiplicity_4_0= ruleMultiplicity ) ) otherlv_5= ']' ( (lv_name_6_0= RULE_ID ) ) (otherlv_7= 'opposite' ( ( ruleQualifiedName ) ) )? ) | ||
905 | // InternalProblem.g:342:3: ( ( (lv_containment_0_0= 'contains' ) ) | otherlv_1= 'refers' ) ( (otherlv_2= RULE_ID ) ) otherlv_3= '[' ( (lv_multiplicity_4_0= ruleMultiplicity ) ) otherlv_5= ']' ( (lv_name_6_0= RULE_ID ) ) (otherlv_7= 'opposite' ( ( ruleQualifiedName ) ) )? | ||
906 | { | ||
907 | // InternalProblem.g:342:3: ( ( (lv_containment_0_0= 'contains' ) ) | otherlv_1= 'refers' ) | ||
908 | int alt9=2; | ||
909 | int LA9_0 = input.LA(1); | ||
910 | |||
911 | if ( (LA9_0==18) ) { | ||
912 | alt9=1; | ||
913 | } | ||
914 | else if ( (LA9_0==19) ) { | ||
915 | alt9=2; | ||
916 | } | ||
917 | else { | ||
918 | NoViableAltException nvae = | ||
919 | new NoViableAltException("", 9, 0, input); | ||
920 | |||
921 | throw nvae; | ||
922 | } | ||
923 | switch (alt9) { | ||
924 | case 1 : | ||
925 | // InternalProblem.g:343:4: ( (lv_containment_0_0= 'contains' ) ) | ||
926 | { | ||
927 | // InternalProblem.g:343:4: ( (lv_containment_0_0= 'contains' ) ) | ||
928 | // InternalProblem.g:344:5: (lv_containment_0_0= 'contains' ) | ||
929 | { | ||
930 | // InternalProblem.g:344:5: (lv_containment_0_0= 'contains' ) | ||
931 | // InternalProblem.g:345:6: lv_containment_0_0= 'contains' | ||
932 | { | ||
933 | lv_containment_0_0=(Token)match(input,18,FOLLOW_5); | ||
934 | |||
935 | newLeafNode(lv_containment_0_0, grammarAccess.getReferenceDeclarationAccess().getContainmentContainsKeyword_0_0_0()); | ||
936 | |||
937 | |||
938 | if (current==null) { | ||
939 | current = createModelElement(grammarAccess.getReferenceDeclarationRule()); | ||
940 | } | ||
941 | setWithLastConsumed(current, "containment", lv_containment_0_0 != null, "contains"); | ||
942 | |||
943 | |||
944 | } | ||
945 | |||
946 | |||
947 | } | ||
948 | |||
949 | |||
950 | } | ||
951 | break; | ||
952 | case 2 : | ||
953 | // InternalProblem.g:358:4: otherlv_1= 'refers' | ||
954 | { | ||
955 | otherlv_1=(Token)match(input,19,FOLLOW_5); | ||
956 | |||
957 | newLeafNode(otherlv_1, grammarAccess.getReferenceDeclarationAccess().getRefersKeyword_0_1()); | ||
958 | |||
959 | |||
960 | } | ||
961 | break; | ||
962 | |||
963 | } | ||
964 | |||
965 | // InternalProblem.g:363:3: ( (otherlv_2= RULE_ID ) ) | ||
966 | // InternalProblem.g:364:4: (otherlv_2= RULE_ID ) | ||
967 | { | ||
968 | // InternalProblem.g:364:4: (otherlv_2= RULE_ID ) | ||
969 | // InternalProblem.g:365:5: otherlv_2= RULE_ID | ||
970 | { | ||
971 | |||
972 | if (current==null) { | ||
973 | current = createModelElement(grammarAccess.getReferenceDeclarationRule()); | ||
974 | } | ||
975 | |||
976 | otherlv_2=(Token)match(input,RULE_ID,FOLLOW_12); | ||
977 | |||
978 | newLeafNode(otherlv_2, grammarAccess.getReferenceDeclarationAccess().getReferenceTypeClassDeclarationCrossReference_1_0()); | ||
979 | |||
980 | |||
981 | } | ||
982 | |||
983 | |||
984 | } | ||
985 | |||
986 | otherlv_3=(Token)match(input,14,FOLLOW_13); | ||
987 | |||
988 | newLeafNode(otherlv_3, grammarAccess.getReferenceDeclarationAccess().getLeftSquareBracketKeyword_2()); | ||
989 | |||
990 | // InternalProblem.g:380:3: ( (lv_multiplicity_4_0= ruleMultiplicity ) ) | ||
991 | // InternalProblem.g:381:4: (lv_multiplicity_4_0= ruleMultiplicity ) | ||
992 | { | ||
993 | // InternalProblem.g:381:4: (lv_multiplicity_4_0= ruleMultiplicity ) | ||
994 | // InternalProblem.g:382:5: lv_multiplicity_4_0= ruleMultiplicity | ||
995 | { | ||
996 | |||
997 | newCompositeNode(grammarAccess.getReferenceDeclarationAccess().getMultiplicityMultiplicityParserRuleCall_3_0()); | ||
998 | |||
999 | pushFollow(FOLLOW_14); | ||
1000 | lv_multiplicity_4_0=ruleMultiplicity(); | ||
1001 | |||
1002 | state._fsp--; | ||
1003 | |||
1004 | |||
1005 | if (current==null) { | ||
1006 | current = createModelElementForParent(grammarAccess.getReferenceDeclarationRule()); | ||
1007 | } | ||
1008 | set( | ||
1009 | current, | ||
1010 | "multiplicity", | ||
1011 | lv_multiplicity_4_0, | ||
1012 | "org.eclipse.viatra.solver.language.Problem.Multiplicity"); | ||
1013 | afterParserOrEnumRuleCall(); | ||
1014 | |||
1015 | |||
1016 | } | ||
1017 | |||
1018 | |||
1019 | } | ||
1020 | |||
1021 | otherlv_5=(Token)match(input,16,FOLLOW_5); | ||
1022 | |||
1023 | newLeafNode(otherlv_5, grammarAccess.getReferenceDeclarationAccess().getRightSquareBracketKeyword_4()); | ||
1024 | |||
1025 | // InternalProblem.g:403:3: ( (lv_name_6_0= RULE_ID ) ) | ||
1026 | // InternalProblem.g:404:4: (lv_name_6_0= RULE_ID ) | ||
1027 | { | ||
1028 | // InternalProblem.g:404:4: (lv_name_6_0= RULE_ID ) | ||
1029 | // InternalProblem.g:405:5: lv_name_6_0= RULE_ID | ||
1030 | { | ||
1031 | lv_name_6_0=(Token)match(input,RULE_ID,FOLLOW_15); | ||
1032 | |||
1033 | newLeafNode(lv_name_6_0, grammarAccess.getReferenceDeclarationAccess().getNameIDTerminalRuleCall_5_0()); | ||
1034 | |||
1035 | |||
1036 | if (current==null) { | ||
1037 | current = createModelElement(grammarAccess.getReferenceDeclarationRule()); | ||
1038 | } | ||
1039 | setWithLastConsumed( | ||
1040 | current, | ||
1041 | "name", | ||
1042 | lv_name_6_0, | ||
1043 | "org.eclipse.xtext.common.Terminals.ID"); | ||
1044 | |||
1045 | |||
1046 | } | ||
1047 | |||
1048 | |||
1049 | } | ||
1050 | |||
1051 | // InternalProblem.g:421:3: (otherlv_7= 'opposite' ( ( ruleQualifiedName ) ) )? | ||
1052 | int alt10=2; | ||
1053 | int LA10_0 = input.LA(1); | ||
1054 | |||
1055 | if ( (LA10_0==20) ) { | ||
1056 | alt10=1; | ||
1057 | } | ||
1058 | switch (alt10) { | ||
1059 | case 1 : | ||
1060 | // InternalProblem.g:422:4: otherlv_7= 'opposite' ( ( ruleQualifiedName ) ) | ||
1061 | { | ||
1062 | otherlv_7=(Token)match(input,20,FOLLOW_5); | ||
1063 | |||
1064 | newLeafNode(otherlv_7, grammarAccess.getReferenceDeclarationAccess().getOppositeKeyword_6_0()); | ||
1065 | |||
1066 | // InternalProblem.g:426:4: ( ( ruleQualifiedName ) ) | ||
1067 | // InternalProblem.g:427:5: ( ruleQualifiedName ) | ||
1068 | { | ||
1069 | // InternalProblem.g:427:5: ( ruleQualifiedName ) | ||
1070 | // InternalProblem.g:428:6: ruleQualifiedName | ||
1071 | { | ||
1072 | |||
1073 | if (current==null) { | ||
1074 | current = createModelElement(grammarAccess.getReferenceDeclarationRule()); | ||
1075 | } | ||
1076 | |||
1077 | |||
1078 | newCompositeNode(grammarAccess.getReferenceDeclarationAccess().getOppositeReferenceDeclarationCrossReference_6_1_0()); | ||
1079 | |||
1080 | pushFollow(FOLLOW_2); | ||
1081 | ruleQualifiedName(); | ||
1082 | |||
1083 | state._fsp--; | ||
1084 | |||
1085 | |||
1086 | afterParserOrEnumRuleCall(); | ||
1087 | |||
1088 | |||
1089 | } | ||
1090 | |||
1091 | |||
1092 | } | ||
1093 | |||
1094 | |||
1095 | } | ||
1096 | break; | ||
1097 | |||
1098 | } | ||
1099 | |||
1100 | |||
1101 | } | ||
1102 | |||
1103 | |||
1104 | } | ||
1105 | |||
1106 | |||
1107 | leaveRule(); | ||
1108 | |||
1109 | } | ||
1110 | |||
1111 | catch (RecognitionException re) { | ||
1112 | recover(input,re); | ||
1113 | appendSkippedTokens(); | ||
1114 | } | ||
1115 | finally { | ||
1116 | } | ||
1117 | return current; | ||
1118 | } | ||
1119 | // $ANTLR end "ruleReferenceDeclaration" | ||
1120 | |||
1121 | |||
1122 | // $ANTLR start "entryRulePredicateDefinition" | ||
1123 | // InternalProblem.g:447:1: entryRulePredicateDefinition returns [EObject current=null] : iv_rulePredicateDefinition= rulePredicateDefinition EOF ; | ||
1124 | public final EObject entryRulePredicateDefinition() throws RecognitionException { | ||
1125 | EObject current = null; | ||
1126 | |||
1127 | EObject iv_rulePredicateDefinition = null; | ||
1128 | |||
1129 | |||
1130 | try { | ||
1131 | // InternalProblem.g:447:60: (iv_rulePredicateDefinition= rulePredicateDefinition EOF ) | ||
1132 | // InternalProblem.g:448:2: iv_rulePredicateDefinition= rulePredicateDefinition EOF | ||
1133 | { | ||
1134 | newCompositeNode(grammarAccess.getPredicateDefinitionRule()); | ||
1135 | pushFollow(FOLLOW_1); | ||
1136 | iv_rulePredicateDefinition=rulePredicateDefinition(); | ||
1137 | |||
1138 | state._fsp--; | ||
1139 | |||
1140 | current =iv_rulePredicateDefinition; | ||
1141 | match(input,EOF,FOLLOW_2); | ||
1142 | |||
1143 | } | ||
1144 | |||
1145 | } | ||
1146 | |||
1147 | catch (RecognitionException re) { | ||
1148 | recover(input,re); | ||
1149 | appendSkippedTokens(); | ||
1150 | } | ||
1151 | finally { | ||
1152 | } | ||
1153 | return current; | ||
1154 | } | ||
1155 | // $ANTLR end "entryRulePredicateDefinition" | ||
1156 | |||
1157 | |||
1158 | // $ANTLR start "rulePredicateDefinition" | ||
1159 | // InternalProblem.g:454:1: rulePredicateDefinition returns [EObject current=null] : ( ( ( ( (lv_error_0_0= 'error' ) ) (otherlv_1= 'pred' )? ) | otherlv_2= 'pred' ) ( (lv_name_3_0= RULE_ID ) ) otherlv_4= '(' ( ( (lv_parameters_5_0= ruleParameter ) ) (otherlv_6= ',' ( (lv_parameters_7_0= ruleParameter ) ) )* )? otherlv_8= ')' (otherlv_9= ':=' ( (lv_bodies_10_0= ruleConjunction ) ) (otherlv_11= ';' ( (lv_bodies_12_0= ruleConjunction ) ) )* )? otherlv_13= '.' ) ; | ||
1160 | public final EObject rulePredicateDefinition() throws RecognitionException { | ||
1161 | EObject current = null; | ||
1162 | |||
1163 | Token lv_error_0_0=null; | ||
1164 | Token otherlv_1=null; | ||
1165 | Token otherlv_2=null; | ||
1166 | Token lv_name_3_0=null; | ||
1167 | Token otherlv_4=null; | ||
1168 | Token otherlv_6=null; | ||
1169 | Token otherlv_8=null; | ||
1170 | Token otherlv_9=null; | ||
1171 | Token otherlv_11=null; | ||
1172 | Token otherlv_13=null; | ||
1173 | EObject lv_parameters_5_0 = null; | ||
1174 | |||
1175 | EObject lv_parameters_7_0 = null; | ||
1176 | |||
1177 | EObject lv_bodies_10_0 = null; | ||
1178 | |||
1179 | EObject lv_bodies_12_0 = null; | ||
1180 | |||
1181 | |||
1182 | |||
1183 | enterRule(); | ||
1184 | |||
1185 | try { | ||
1186 | // InternalProblem.g:460:2: ( ( ( ( ( (lv_error_0_0= 'error' ) ) (otherlv_1= 'pred' )? ) | otherlv_2= 'pred' ) ( (lv_name_3_0= RULE_ID ) ) otherlv_4= '(' ( ( (lv_parameters_5_0= ruleParameter ) ) (otherlv_6= ',' ( (lv_parameters_7_0= ruleParameter ) ) )* )? otherlv_8= ')' (otherlv_9= ':=' ( (lv_bodies_10_0= ruleConjunction ) ) (otherlv_11= ';' ( (lv_bodies_12_0= ruleConjunction ) ) )* )? otherlv_13= '.' ) ) | ||
1187 | // InternalProblem.g:461:2: ( ( ( ( (lv_error_0_0= 'error' ) ) (otherlv_1= 'pred' )? ) | otherlv_2= 'pred' ) ( (lv_name_3_0= RULE_ID ) ) otherlv_4= '(' ( ( (lv_parameters_5_0= ruleParameter ) ) (otherlv_6= ',' ( (lv_parameters_7_0= ruleParameter ) ) )* )? otherlv_8= ')' (otherlv_9= ':=' ( (lv_bodies_10_0= ruleConjunction ) ) (otherlv_11= ';' ( (lv_bodies_12_0= ruleConjunction ) ) )* )? otherlv_13= '.' ) | ||
1188 | { | ||
1189 | // InternalProblem.g:461:2: ( ( ( ( (lv_error_0_0= 'error' ) ) (otherlv_1= 'pred' )? ) | otherlv_2= 'pred' ) ( (lv_name_3_0= RULE_ID ) ) otherlv_4= '(' ( ( (lv_parameters_5_0= ruleParameter ) ) (otherlv_6= ',' ( (lv_parameters_7_0= ruleParameter ) ) )* )? otherlv_8= ')' (otherlv_9= ':=' ( (lv_bodies_10_0= ruleConjunction ) ) (otherlv_11= ';' ( (lv_bodies_12_0= ruleConjunction ) ) )* )? otherlv_13= '.' ) | ||
1190 | // InternalProblem.g:462:3: ( ( ( (lv_error_0_0= 'error' ) ) (otherlv_1= 'pred' )? ) | otherlv_2= 'pred' ) ( (lv_name_3_0= RULE_ID ) ) otherlv_4= '(' ( ( (lv_parameters_5_0= ruleParameter ) ) (otherlv_6= ',' ( (lv_parameters_7_0= ruleParameter ) ) )* )? otherlv_8= ')' (otherlv_9= ':=' ( (lv_bodies_10_0= ruleConjunction ) ) (otherlv_11= ';' ( (lv_bodies_12_0= ruleConjunction ) ) )* )? otherlv_13= '.' | ||
1191 | { | ||
1192 | // InternalProblem.g:462:3: ( ( ( (lv_error_0_0= 'error' ) ) (otherlv_1= 'pred' )? ) | otherlv_2= 'pred' ) | ||
1193 | int alt12=2; | ||
1194 | int LA12_0 = input.LA(1); | ||
1195 | |||
1196 | if ( (LA12_0==21) ) { | ||
1197 | alt12=1; | ||
1198 | } | ||
1199 | else if ( (LA12_0==22) ) { | ||
1200 | alt12=2; | ||
1201 | } | ||
1202 | else { | ||
1203 | NoViableAltException nvae = | ||
1204 | new NoViableAltException("", 12, 0, input); | ||
1205 | |||
1206 | throw nvae; | ||
1207 | } | ||
1208 | switch (alt12) { | ||
1209 | case 1 : | ||
1210 | // InternalProblem.g:463:4: ( ( (lv_error_0_0= 'error' ) ) (otherlv_1= 'pred' )? ) | ||
1211 | { | ||
1212 | // InternalProblem.g:463:4: ( ( (lv_error_0_0= 'error' ) ) (otherlv_1= 'pred' )? ) | ||
1213 | // InternalProblem.g:464:5: ( (lv_error_0_0= 'error' ) ) (otherlv_1= 'pred' )? | ||
1214 | { | ||
1215 | // InternalProblem.g:464:5: ( (lv_error_0_0= 'error' ) ) | ||
1216 | // InternalProblem.g:465:6: (lv_error_0_0= 'error' ) | ||
1217 | { | ||
1218 | // InternalProblem.g:465:6: (lv_error_0_0= 'error' ) | ||
1219 | // InternalProblem.g:466:7: lv_error_0_0= 'error' | ||
1220 | { | ||
1221 | lv_error_0_0=(Token)match(input,21,FOLLOW_16); | ||
1222 | |||
1223 | newLeafNode(lv_error_0_0, grammarAccess.getPredicateDefinitionAccess().getErrorErrorKeyword_0_0_0_0()); | ||
1224 | |||
1225 | |||
1226 | if (current==null) { | ||
1227 | current = createModelElement(grammarAccess.getPredicateDefinitionRule()); | ||
1228 | } | ||
1229 | setWithLastConsumed(current, "error", lv_error_0_0 != null, "error"); | ||
1230 | |||
1231 | |||
1232 | } | ||
1233 | |||
1234 | |||
1235 | } | ||
1236 | |||
1237 | // InternalProblem.g:478:5: (otherlv_1= 'pred' )? | ||
1238 | int alt11=2; | ||
1239 | int LA11_0 = input.LA(1); | ||
1240 | |||
1241 | if ( (LA11_0==22) ) { | ||
1242 | alt11=1; | ||
1243 | } | ||
1244 | switch (alt11) { | ||
1245 | case 1 : | ||
1246 | // InternalProblem.g:479:6: otherlv_1= 'pred' | ||
1247 | { | ||
1248 | otherlv_1=(Token)match(input,22,FOLLOW_5); | ||
1249 | |||
1250 | newLeafNode(otherlv_1, grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_0_1()); | ||
1251 | |||
1252 | |||
1253 | } | ||
1254 | break; | ||
1255 | |||
1256 | } | ||
1257 | |||
1258 | |||
1259 | } | ||
1260 | |||
1261 | |||
1262 | } | ||
1263 | break; | ||
1264 | case 2 : | ||
1265 | // InternalProblem.g:486:4: otherlv_2= 'pred' | ||
1266 | { | ||
1267 | otherlv_2=(Token)match(input,22,FOLLOW_5); | ||
1268 | |||
1269 | newLeafNode(otherlv_2, grammarAccess.getPredicateDefinitionAccess().getPredKeyword_0_1()); | ||
1270 | |||
1271 | |||
1272 | } | ||
1273 | break; | ||
1274 | |||
1275 | } | ||
1276 | |||
1277 | // InternalProblem.g:491:3: ( (lv_name_3_0= RULE_ID ) ) | ||
1278 | // InternalProblem.g:492:4: (lv_name_3_0= RULE_ID ) | ||
1279 | { | ||
1280 | // InternalProblem.g:492:4: (lv_name_3_0= RULE_ID ) | ||
1281 | // InternalProblem.g:493:5: lv_name_3_0= RULE_ID | ||
1282 | { | ||
1283 | lv_name_3_0=(Token)match(input,RULE_ID,FOLLOW_17); | ||
1284 | |||
1285 | newLeafNode(lv_name_3_0, grammarAccess.getPredicateDefinitionAccess().getNameIDTerminalRuleCall_1_0()); | ||
1286 | |||
1287 | |||
1288 | if (current==null) { | ||
1289 | current = createModelElement(grammarAccess.getPredicateDefinitionRule()); | ||
1290 | } | ||
1291 | setWithLastConsumed( | ||
1292 | current, | ||
1293 | "name", | ||
1294 | lv_name_3_0, | ||
1295 | "org.eclipse.xtext.common.Terminals.ID"); | ||
1296 | |||
1297 | |||
1298 | } | ||
1299 | |||
1300 | |||
1301 | } | ||
1302 | |||
1303 | otherlv_4=(Token)match(input,23,FOLLOW_18); | ||
1304 | |||
1305 | newLeafNode(otherlv_4, grammarAccess.getPredicateDefinitionAccess().getLeftParenthesisKeyword_2()); | ||
1306 | |||
1307 | // InternalProblem.g:513:3: ( ( (lv_parameters_5_0= ruleParameter ) ) (otherlv_6= ',' ( (lv_parameters_7_0= ruleParameter ) ) )* )? | ||
1308 | int alt14=2; | ||
1309 | int LA14_0 = input.LA(1); | ||
1310 | |||
1311 | if ( (LA14_0==RULE_ID) ) { | ||
1312 | alt14=1; | ||
1313 | } | ||
1314 | switch (alt14) { | ||
1315 | case 1 : | ||
1316 | // InternalProblem.g:514:4: ( (lv_parameters_5_0= ruleParameter ) ) (otherlv_6= ',' ( (lv_parameters_7_0= ruleParameter ) ) )* | ||
1317 | { | ||
1318 | // InternalProblem.g:514:4: ( (lv_parameters_5_0= ruleParameter ) ) | ||
1319 | // InternalProblem.g:515:5: (lv_parameters_5_0= ruleParameter ) | ||
1320 | { | ||
1321 | // InternalProblem.g:515:5: (lv_parameters_5_0= ruleParameter ) | ||
1322 | // InternalProblem.g:516:6: lv_parameters_5_0= ruleParameter | ||
1323 | { | ||
1324 | |||
1325 | newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getParametersParameterParserRuleCall_3_0_0()); | ||
1326 | |||
1327 | pushFollow(FOLLOW_19); | ||
1328 | lv_parameters_5_0=ruleParameter(); | ||
1329 | |||
1330 | state._fsp--; | ||
1331 | |||
1332 | |||
1333 | if (current==null) { | ||
1334 | current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); | ||
1335 | } | ||
1336 | add( | ||
1337 | current, | ||
1338 | "parameters", | ||
1339 | lv_parameters_5_0, | ||
1340 | "org.eclipse.viatra.solver.language.Problem.Parameter"); | ||
1341 | afterParserOrEnumRuleCall(); | ||
1342 | |||
1343 | |||
1344 | } | ||
1345 | |||
1346 | |||
1347 | } | ||
1348 | |||
1349 | // InternalProblem.g:533:4: (otherlv_6= ',' ( (lv_parameters_7_0= ruleParameter ) ) )* | ||
1350 | loop13: | ||
1351 | do { | ||
1352 | int alt13=2; | ||
1353 | int LA13_0 = input.LA(1); | ||
1354 | |||
1355 | if ( (LA13_0==15) ) { | ||
1356 | alt13=1; | ||
1357 | } | ||
1358 | |||
1359 | |||
1360 | switch (alt13) { | ||
1361 | case 1 : | ||
1362 | // InternalProblem.g:534:5: otherlv_6= ',' ( (lv_parameters_7_0= ruleParameter ) ) | ||
1363 | { | ||
1364 | otherlv_6=(Token)match(input,15,FOLLOW_5); | ||
1365 | |||
1366 | newLeafNode(otherlv_6, grammarAccess.getPredicateDefinitionAccess().getCommaKeyword_3_1_0()); | ||
1367 | |||
1368 | // InternalProblem.g:538:5: ( (lv_parameters_7_0= ruleParameter ) ) | ||
1369 | // InternalProblem.g:539:6: (lv_parameters_7_0= ruleParameter ) | ||
1370 | { | ||
1371 | // InternalProblem.g:539:6: (lv_parameters_7_0= ruleParameter ) | ||
1372 | // InternalProblem.g:540:7: lv_parameters_7_0= ruleParameter | ||
1373 | { | ||
1374 | |||
1375 | newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getParametersParameterParserRuleCall_3_1_1_0()); | ||
1376 | |||
1377 | pushFollow(FOLLOW_19); | ||
1378 | lv_parameters_7_0=ruleParameter(); | ||
1379 | |||
1380 | state._fsp--; | ||
1381 | |||
1382 | |||
1383 | if (current==null) { | ||
1384 | current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); | ||
1385 | } | ||
1386 | add( | ||
1387 | current, | ||
1388 | "parameters", | ||
1389 | lv_parameters_7_0, | ||
1390 | "org.eclipse.viatra.solver.language.Problem.Parameter"); | ||
1391 | afterParserOrEnumRuleCall(); | ||
1392 | |||
1393 | |||
1394 | } | ||
1395 | |||
1396 | |||
1397 | } | ||
1398 | |||
1399 | |||
1400 | } | ||
1401 | break; | ||
1402 | |||
1403 | default : | ||
1404 | break loop13; | ||
1405 | } | ||
1406 | } while (true); | ||
1407 | |||
1408 | |||
1409 | } | ||
1410 | break; | ||
1411 | |||
1412 | } | ||
1413 | |||
1414 | otherlv_8=(Token)match(input,24,FOLLOW_20); | ||
1415 | |||
1416 | newLeafNode(otherlv_8, grammarAccess.getPredicateDefinitionAccess().getRightParenthesisKeyword_4()); | ||
1417 | |||
1418 | // InternalProblem.g:563:3: (otherlv_9= ':=' ( (lv_bodies_10_0= ruleConjunction ) ) (otherlv_11= ';' ( (lv_bodies_12_0= ruleConjunction ) ) )* )? | ||
1419 | int alt16=2; | ||
1420 | int LA16_0 = input.LA(1); | ||
1421 | |||
1422 | if ( (LA16_0==25) ) { | ||
1423 | alt16=1; | ||
1424 | } | ||
1425 | switch (alt16) { | ||
1426 | case 1 : | ||
1427 | // InternalProblem.g:564:4: otherlv_9= ':=' ( (lv_bodies_10_0= ruleConjunction ) ) (otherlv_11= ';' ( (lv_bodies_12_0= ruleConjunction ) ) )* | ||
1428 | { | ||
1429 | otherlv_9=(Token)match(input,25,FOLLOW_21); | ||
1430 | |||
1431 | newLeafNode(otherlv_9, grammarAccess.getPredicateDefinitionAccess().getColonEqualsSignKeyword_5_0()); | ||
1432 | |||
1433 | // InternalProblem.g:568:4: ( (lv_bodies_10_0= ruleConjunction ) ) | ||
1434 | // InternalProblem.g:569:5: (lv_bodies_10_0= ruleConjunction ) | ||
1435 | { | ||
1436 | // InternalProblem.g:569:5: (lv_bodies_10_0= ruleConjunction ) | ||
1437 | // InternalProblem.g:570:6: lv_bodies_10_0= ruleConjunction | ||
1438 | { | ||
1439 | |||
1440 | newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getBodiesConjunctionParserRuleCall_5_1_0()); | ||
1441 | |||
1442 | pushFollow(FOLLOW_22); | ||
1443 | lv_bodies_10_0=ruleConjunction(); | ||
1444 | |||
1445 | state._fsp--; | ||
1446 | |||
1447 | |||
1448 | if (current==null) { | ||
1449 | current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); | ||
1450 | } | ||
1451 | add( | ||
1452 | current, | ||
1453 | "bodies", | ||
1454 | lv_bodies_10_0, | ||
1455 | "org.eclipse.viatra.solver.language.Problem.Conjunction"); | ||
1456 | afterParserOrEnumRuleCall(); | ||
1457 | |||
1458 | |||
1459 | } | ||
1460 | |||
1461 | |||
1462 | } | ||
1463 | |||
1464 | // InternalProblem.g:587:4: (otherlv_11= ';' ( (lv_bodies_12_0= ruleConjunction ) ) )* | ||
1465 | loop15: | ||
1466 | do { | ||
1467 | int alt15=2; | ||
1468 | int LA15_0 = input.LA(1); | ||
1469 | |||
1470 | if ( (LA15_0==26) ) { | ||
1471 | alt15=1; | ||
1472 | } | ||
1473 | |||
1474 | |||
1475 | switch (alt15) { | ||
1476 | case 1 : | ||
1477 | // InternalProblem.g:588:5: otherlv_11= ';' ( (lv_bodies_12_0= ruleConjunction ) ) | ||
1478 | { | ||
1479 | otherlv_11=(Token)match(input,26,FOLLOW_21); | ||
1480 | |||
1481 | newLeafNode(otherlv_11, grammarAccess.getPredicateDefinitionAccess().getSemicolonKeyword_5_2_0()); | ||
1482 | |||
1483 | // InternalProblem.g:592:5: ( (lv_bodies_12_0= ruleConjunction ) ) | ||
1484 | // InternalProblem.g:593:6: (lv_bodies_12_0= ruleConjunction ) | ||
1485 | { | ||
1486 | // InternalProblem.g:593:6: (lv_bodies_12_0= ruleConjunction ) | ||
1487 | // InternalProblem.g:594:7: lv_bodies_12_0= ruleConjunction | ||
1488 | { | ||
1489 | |||
1490 | newCompositeNode(grammarAccess.getPredicateDefinitionAccess().getBodiesConjunctionParserRuleCall_5_2_1_0()); | ||
1491 | |||
1492 | pushFollow(FOLLOW_22); | ||
1493 | lv_bodies_12_0=ruleConjunction(); | ||
1494 | |||
1495 | state._fsp--; | ||
1496 | |||
1497 | |||
1498 | if (current==null) { | ||
1499 | current = createModelElementForParent(grammarAccess.getPredicateDefinitionRule()); | ||
1500 | } | ||
1501 | add( | ||
1502 | current, | ||
1503 | "bodies", | ||
1504 | lv_bodies_12_0, | ||
1505 | "org.eclipse.viatra.solver.language.Problem.Conjunction"); | ||
1506 | afterParserOrEnumRuleCall(); | ||
1507 | |||
1508 | |||
1509 | } | ||
1510 | |||
1511 | |||
1512 | } | ||
1513 | |||
1514 | |||
1515 | } | ||
1516 | break; | ||
1517 | |||
1518 | default : | ||
1519 | break loop15; | ||
1520 | } | ||
1521 | } while (true); | ||
1522 | |||
1523 | |||
1524 | } | ||
1525 | break; | ||
1526 | |||
1527 | } | ||
1528 | |||
1529 | otherlv_13=(Token)match(input,17,FOLLOW_2); | ||
1530 | |||
1531 | newLeafNode(otherlv_13, grammarAccess.getPredicateDefinitionAccess().getFullStopKeyword_6()); | ||
1532 | |||
1533 | |||
1534 | } | ||
1535 | |||
1536 | |||
1537 | } | ||
1538 | |||
1539 | |||
1540 | leaveRule(); | ||
1541 | |||
1542 | } | ||
1543 | |||
1544 | catch (RecognitionException re) { | ||
1545 | recover(input,re); | ||
1546 | appendSkippedTokens(); | ||
1547 | } | ||
1548 | finally { | ||
1549 | } | ||
1550 | return current; | ||
1551 | } | ||
1552 | // $ANTLR end "rulePredicateDefinition" | ||
1553 | |||
1554 | |||
1555 | // $ANTLR start "entryRuleParameter" | ||
1556 | // InternalProblem.g:621:1: entryRuleParameter returns [EObject current=null] : iv_ruleParameter= ruleParameter EOF ; | ||
1557 | public final EObject entryRuleParameter() throws RecognitionException { | ||
1558 | EObject current = null; | ||
1559 | |||
1560 | EObject iv_ruleParameter = null; | ||
1561 | |||
1562 | |||
1563 | try { | ||
1564 | // InternalProblem.g:621:50: (iv_ruleParameter= ruleParameter EOF ) | ||
1565 | // InternalProblem.g:622:2: iv_ruleParameter= ruleParameter EOF | ||
1566 | { | ||
1567 | newCompositeNode(grammarAccess.getParameterRule()); | ||
1568 | pushFollow(FOLLOW_1); | ||
1569 | iv_ruleParameter=ruleParameter(); | ||
1570 | |||
1571 | state._fsp--; | ||
1572 | |||
1573 | current =iv_ruleParameter; | ||
1574 | match(input,EOF,FOLLOW_2); | ||
1575 | |||
1576 | } | ||
1577 | |||
1578 | } | ||
1579 | |||
1580 | catch (RecognitionException re) { | ||
1581 | recover(input,re); | ||
1582 | appendSkippedTokens(); | ||
1583 | } | ||
1584 | finally { | ||
1585 | } | ||
1586 | return current; | ||
1587 | } | ||
1588 | // $ANTLR end "entryRuleParameter" | ||
1589 | |||
1590 | |||
1591 | // $ANTLR start "ruleParameter" | ||
1592 | // InternalProblem.g:628:1: ruleParameter returns [EObject current=null] : ( ( (otherlv_0= RULE_ID ) ) ( (lv_name_1_0= RULE_ID ) ) ) ; | ||
1593 | public final EObject ruleParameter() throws RecognitionException { | ||
1594 | EObject current = null; | ||
1595 | |||
1596 | Token otherlv_0=null; | ||
1597 | Token lv_name_1_0=null; | ||
1598 | |||
1599 | |||
1600 | enterRule(); | ||
1601 | |||
1602 | try { | ||
1603 | // InternalProblem.g:634:2: ( ( ( (otherlv_0= RULE_ID ) ) ( (lv_name_1_0= RULE_ID ) ) ) ) | ||
1604 | // InternalProblem.g:635:2: ( ( (otherlv_0= RULE_ID ) ) ( (lv_name_1_0= RULE_ID ) ) ) | ||
1605 | { | ||
1606 | // InternalProblem.g:635:2: ( ( (otherlv_0= RULE_ID ) ) ( (lv_name_1_0= RULE_ID ) ) ) | ||
1607 | // InternalProblem.g:636:3: ( (otherlv_0= RULE_ID ) ) ( (lv_name_1_0= RULE_ID ) ) | ||
1608 | { | ||
1609 | // InternalProblem.g:636:3: ( (otherlv_0= RULE_ID ) ) | ||
1610 | // InternalProblem.g:637:4: (otherlv_0= RULE_ID ) | ||
1611 | { | ||
1612 | // InternalProblem.g:637:4: (otherlv_0= RULE_ID ) | ||
1613 | // InternalProblem.g:638:5: otherlv_0= RULE_ID | ||
1614 | { | ||
1615 | |||
1616 | if (current==null) { | ||
1617 | current = createModelElement(grammarAccess.getParameterRule()); | ||
1618 | } | ||
1619 | |||
1620 | otherlv_0=(Token)match(input,RULE_ID,FOLLOW_5); | ||
1621 | |||
1622 | newLeafNode(otherlv_0, grammarAccess.getParameterAccess().getParameterTypeClassDeclarationCrossReference_0_0()); | ||
1623 | |||
1624 | |||
1625 | } | ||
1626 | |||
1627 | |||
1628 | } | ||
1629 | |||
1630 | // InternalProblem.g:649:3: ( (lv_name_1_0= RULE_ID ) ) | ||
1631 | // InternalProblem.g:650:4: (lv_name_1_0= RULE_ID ) | ||
1632 | { | ||
1633 | // InternalProblem.g:650:4: (lv_name_1_0= RULE_ID ) | ||
1634 | // InternalProblem.g:651:5: lv_name_1_0= RULE_ID | ||
1635 | { | ||
1636 | lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_2); | ||
1637 | |||
1638 | newLeafNode(lv_name_1_0, grammarAccess.getParameterAccess().getNameIDTerminalRuleCall_1_0()); | ||
1639 | |||
1640 | |||
1641 | if (current==null) { | ||
1642 | current = createModelElement(grammarAccess.getParameterRule()); | ||
1643 | } | ||
1644 | setWithLastConsumed( | ||
1645 | current, | ||
1646 | "name", | ||
1647 | lv_name_1_0, | ||
1648 | "org.eclipse.xtext.common.Terminals.ID"); | ||
1649 | |||
1650 | |||
1651 | } | ||
1652 | |||
1653 | |||
1654 | } | ||
1655 | |||
1656 | |||
1657 | } | ||
1658 | |||
1659 | |||
1660 | } | ||
1661 | |||
1662 | |||
1663 | leaveRule(); | ||
1664 | |||
1665 | } | ||
1666 | |||
1667 | catch (RecognitionException re) { | ||
1668 | recover(input,re); | ||
1669 | appendSkippedTokens(); | ||
1670 | } | ||
1671 | finally { | ||
1672 | } | ||
1673 | return current; | ||
1674 | } | ||
1675 | // $ANTLR end "ruleParameter" | ||
1676 | |||
1677 | |||
1678 | // $ANTLR start "entryRuleConjunction" | ||
1679 | // InternalProblem.g:671:1: entryRuleConjunction returns [EObject current=null] : iv_ruleConjunction= ruleConjunction EOF ; | ||
1680 | public final EObject entryRuleConjunction() throws RecognitionException { | ||
1681 | EObject current = null; | ||
1682 | |||
1683 | EObject iv_ruleConjunction = null; | ||
1684 | |||
1685 | |||
1686 | try { | ||
1687 | // InternalProblem.g:671:52: (iv_ruleConjunction= ruleConjunction EOF ) | ||
1688 | // InternalProblem.g:672:2: iv_ruleConjunction= ruleConjunction EOF | ||
1689 | { | ||
1690 | newCompositeNode(grammarAccess.getConjunctionRule()); | ||
1691 | pushFollow(FOLLOW_1); | ||
1692 | iv_ruleConjunction=ruleConjunction(); | ||
1693 | |||
1694 | state._fsp--; | ||
1695 | |||
1696 | current =iv_ruleConjunction; | ||
1697 | match(input,EOF,FOLLOW_2); | ||
1698 | |||
1699 | } | ||
1700 | |||
1701 | } | ||
1702 | |||
1703 | catch (RecognitionException re) { | ||
1704 | recover(input,re); | ||
1705 | appendSkippedTokens(); | ||
1706 | } | ||
1707 | finally { | ||
1708 | } | ||
1709 | return current; | ||
1710 | } | ||
1711 | // $ANTLR end "entryRuleConjunction" | ||
1712 | |||
1713 | |||
1714 | // $ANTLR start "ruleConjunction" | ||
1715 | // InternalProblem.g:678:1: ruleConjunction returns [EObject current=null] : ( ( (lv_literals_0_0= ruleLiteral ) ) (otherlv_1= ',' ( (lv_literals_2_0= ruleLiteral ) ) )* ) ; | ||
1716 | public final EObject ruleConjunction() throws RecognitionException { | ||
1717 | EObject current = null; | ||
1718 | |||
1719 | Token otherlv_1=null; | ||
1720 | EObject lv_literals_0_0 = null; | ||
1721 | |||
1722 | EObject lv_literals_2_0 = null; | ||
1723 | |||
1724 | |||
1725 | |||
1726 | enterRule(); | ||
1727 | |||
1728 | try { | ||
1729 | // InternalProblem.g:684:2: ( ( ( (lv_literals_0_0= ruleLiteral ) ) (otherlv_1= ',' ( (lv_literals_2_0= ruleLiteral ) ) )* ) ) | ||
1730 | // InternalProblem.g:685:2: ( ( (lv_literals_0_0= ruleLiteral ) ) (otherlv_1= ',' ( (lv_literals_2_0= ruleLiteral ) ) )* ) | ||
1731 | { | ||
1732 | // InternalProblem.g:685:2: ( ( (lv_literals_0_0= ruleLiteral ) ) (otherlv_1= ',' ( (lv_literals_2_0= ruleLiteral ) ) )* ) | ||
1733 | // InternalProblem.g:686:3: ( (lv_literals_0_0= ruleLiteral ) ) (otherlv_1= ',' ( (lv_literals_2_0= ruleLiteral ) ) )* | ||
1734 | { | ||
1735 | // InternalProblem.g:686:3: ( (lv_literals_0_0= ruleLiteral ) ) | ||
1736 | // InternalProblem.g:687:4: (lv_literals_0_0= ruleLiteral ) | ||
1737 | { | ||
1738 | // InternalProblem.g:687:4: (lv_literals_0_0= ruleLiteral ) | ||
1739 | // InternalProblem.g:688:5: lv_literals_0_0= ruleLiteral | ||
1740 | { | ||
1741 | |||
1742 | newCompositeNode(grammarAccess.getConjunctionAccess().getLiteralsLiteralParserRuleCall_0_0()); | ||
1743 | |||
1744 | pushFollow(FOLLOW_23); | ||
1745 | lv_literals_0_0=ruleLiteral(); | ||
1746 | |||
1747 | state._fsp--; | ||
1748 | |||
1749 | |||
1750 | if (current==null) { | ||
1751 | current = createModelElementForParent(grammarAccess.getConjunctionRule()); | ||
1752 | } | ||
1753 | add( | ||
1754 | current, | ||
1755 | "literals", | ||
1756 | lv_literals_0_0, | ||
1757 | "org.eclipse.viatra.solver.language.Problem.Literal"); | ||
1758 | afterParserOrEnumRuleCall(); | ||
1759 | |||
1760 | |||
1761 | } | ||
1762 | |||
1763 | |||
1764 | } | ||
1765 | |||
1766 | // InternalProblem.g:705:3: (otherlv_1= ',' ( (lv_literals_2_0= ruleLiteral ) ) )* | ||
1767 | loop17: | ||
1768 | do { | ||
1769 | int alt17=2; | ||
1770 | int LA17_0 = input.LA(1); | ||
1771 | |||
1772 | if ( (LA17_0==15) ) { | ||
1773 | alt17=1; | ||
1774 | } | ||
1775 | |||
1776 | |||
1777 | switch (alt17) { | ||
1778 | case 1 : | ||
1779 | // InternalProblem.g:706:4: otherlv_1= ',' ( (lv_literals_2_0= ruleLiteral ) ) | ||
1780 | { | ||
1781 | otherlv_1=(Token)match(input,15,FOLLOW_21); | ||
1782 | |||
1783 | newLeafNode(otherlv_1, grammarAccess.getConjunctionAccess().getCommaKeyword_1_0()); | ||
1784 | |||
1785 | // InternalProblem.g:710:4: ( (lv_literals_2_0= ruleLiteral ) ) | ||
1786 | // InternalProblem.g:711:5: (lv_literals_2_0= ruleLiteral ) | ||
1787 | { | ||
1788 | // InternalProblem.g:711:5: (lv_literals_2_0= ruleLiteral ) | ||
1789 | // InternalProblem.g:712:6: lv_literals_2_0= ruleLiteral | ||
1790 | { | ||
1791 | |||
1792 | newCompositeNode(grammarAccess.getConjunctionAccess().getLiteralsLiteralParserRuleCall_1_1_0()); | ||
1793 | |||
1794 | pushFollow(FOLLOW_23); | ||
1795 | lv_literals_2_0=ruleLiteral(); | ||
1796 | |||
1797 | state._fsp--; | ||
1798 | |||
1799 | |||
1800 | if (current==null) { | ||
1801 | current = createModelElementForParent(grammarAccess.getConjunctionRule()); | ||
1802 | } | ||
1803 | add( | ||
1804 | current, | ||
1805 | "literals", | ||
1806 | lv_literals_2_0, | ||
1807 | "org.eclipse.viatra.solver.language.Problem.Literal"); | ||
1808 | afterParserOrEnumRuleCall(); | ||
1809 | |||
1810 | |||
1811 | } | ||
1812 | |||
1813 | |||
1814 | } | ||
1815 | |||
1816 | |||
1817 | } | ||
1818 | break; | ||
1819 | |||
1820 | default : | ||
1821 | break loop17; | ||
1822 | } | ||
1823 | } while (true); | ||
1824 | |||
1825 | |||
1826 | } | ||
1827 | |||
1828 | |||
1829 | } | ||
1830 | |||
1831 | |||
1832 | leaveRule(); | ||
1833 | |||
1834 | } | ||
1835 | |||
1836 | catch (RecognitionException re) { | ||
1837 | recover(input,re); | ||
1838 | appendSkippedTokens(); | ||
1839 | } | ||
1840 | finally { | ||
1841 | } | ||
1842 | return current; | ||
1843 | } | ||
1844 | // $ANTLR end "ruleConjunction" | ||
1845 | |||
1846 | |||
1847 | // $ANTLR start "entryRuleLiteral" | ||
1848 | // InternalProblem.g:734:1: entryRuleLiteral returns [EObject current=null] : iv_ruleLiteral= ruleLiteral EOF ; | ||
1849 | public final EObject entryRuleLiteral() throws RecognitionException { | ||
1850 | EObject current = null; | ||
1851 | |||
1852 | EObject iv_ruleLiteral = null; | ||
1853 | |||
1854 | |||
1855 | try { | ||
1856 | // InternalProblem.g:734:48: (iv_ruleLiteral= ruleLiteral EOF ) | ||
1857 | // InternalProblem.g:735:2: iv_ruleLiteral= ruleLiteral EOF | ||
1858 | { | ||
1859 | newCompositeNode(grammarAccess.getLiteralRule()); | ||
1860 | pushFollow(FOLLOW_1); | ||
1861 | iv_ruleLiteral=ruleLiteral(); | ||
1862 | |||
1863 | state._fsp--; | ||
1864 | |||
1865 | current =iv_ruleLiteral; | ||
1866 | match(input,EOF,FOLLOW_2); | ||
1867 | |||
1868 | } | ||
1869 | |||
1870 | } | ||
1871 | |||
1872 | catch (RecognitionException re) { | ||
1873 | recover(input,re); | ||
1874 | appendSkippedTokens(); | ||
1875 | } | ||
1876 | finally { | ||
1877 | } | ||
1878 | return current; | ||
1879 | } | ||
1880 | // $ANTLR end "entryRuleLiteral" | ||
1881 | |||
1882 | |||
1883 | // $ANTLR start "ruleLiteral" | ||
1884 | // InternalProblem.g:741:1: ruleLiteral returns [EObject current=null] : (this_Atom_0= ruleAtom | this_NegativeLiteral_1= ruleNegativeLiteral ) ; | ||
1885 | public final EObject ruleLiteral() throws RecognitionException { | ||
1886 | EObject current = null; | ||
1887 | |||
1888 | EObject this_Atom_0 = null; | ||
1889 | |||
1890 | EObject this_NegativeLiteral_1 = null; | ||
1891 | |||
1892 | |||
1893 | |||
1894 | enterRule(); | ||
1895 | |||
1896 | try { | ||
1897 | // InternalProblem.g:747:2: ( (this_Atom_0= ruleAtom | this_NegativeLiteral_1= ruleNegativeLiteral ) ) | ||
1898 | // InternalProblem.g:748:2: (this_Atom_0= ruleAtom | this_NegativeLiteral_1= ruleNegativeLiteral ) | ||
1899 | { | ||
1900 | // InternalProblem.g:748:2: (this_Atom_0= ruleAtom | this_NegativeLiteral_1= ruleNegativeLiteral ) | ||
1901 | int alt18=2; | ||
1902 | int LA18_0 = input.LA(1); | ||
1903 | |||
1904 | if ( (LA18_0==RULE_ID) ) { | ||
1905 | alt18=1; | ||
1906 | } | ||
1907 | else if ( (LA18_0==27) ) { | ||
1908 | alt18=2; | ||
1909 | } | ||
1910 | else { | ||
1911 | NoViableAltException nvae = | ||
1912 | new NoViableAltException("", 18, 0, input); | ||
1913 | |||
1914 | throw nvae; | ||
1915 | } | ||
1916 | switch (alt18) { | ||
1917 | case 1 : | ||
1918 | // InternalProblem.g:749:3: this_Atom_0= ruleAtom | ||
1919 | { | ||
1920 | |||
1921 | newCompositeNode(grammarAccess.getLiteralAccess().getAtomParserRuleCall_0()); | ||
1922 | |||
1923 | pushFollow(FOLLOW_2); | ||
1924 | this_Atom_0=ruleAtom(); | ||
1925 | |||
1926 | state._fsp--; | ||
1927 | |||
1928 | |||
1929 | current = this_Atom_0; | ||
1930 | afterParserOrEnumRuleCall(); | ||
1931 | |||
1932 | |||
1933 | } | ||
1934 | break; | ||
1935 | case 2 : | ||
1936 | // InternalProblem.g:758:3: this_NegativeLiteral_1= ruleNegativeLiteral | ||
1937 | { | ||
1938 | |||
1939 | newCompositeNode(grammarAccess.getLiteralAccess().getNegativeLiteralParserRuleCall_1()); | ||
1940 | |||
1941 | pushFollow(FOLLOW_2); | ||
1942 | this_NegativeLiteral_1=ruleNegativeLiteral(); | ||
1943 | |||
1944 | state._fsp--; | ||
1945 | |||
1946 | |||
1947 | current = this_NegativeLiteral_1; | ||
1948 | afterParserOrEnumRuleCall(); | ||
1949 | |||
1950 | |||
1951 | } | ||
1952 | break; | ||
1953 | |||
1954 | } | ||
1955 | |||
1956 | |||
1957 | } | ||
1958 | |||
1959 | |||
1960 | leaveRule(); | ||
1961 | |||
1962 | } | ||
1963 | |||
1964 | catch (RecognitionException re) { | ||
1965 | recover(input,re); | ||
1966 | appendSkippedTokens(); | ||
1967 | } | ||
1968 | finally { | ||
1969 | } | ||
1970 | return current; | ||
1971 | } | ||
1972 | // $ANTLR end "ruleLiteral" | ||
1973 | |||
1974 | |||
1975 | // $ANTLR start "entryRuleNegativeLiteral" | ||
1976 | // InternalProblem.g:770:1: entryRuleNegativeLiteral returns [EObject current=null] : iv_ruleNegativeLiteral= ruleNegativeLiteral EOF ; | ||
1977 | public final EObject entryRuleNegativeLiteral() throws RecognitionException { | ||
1978 | EObject current = null; | ||
1979 | |||
1980 | EObject iv_ruleNegativeLiteral = null; | ||
1981 | |||
1982 | |||
1983 | try { | ||
1984 | // InternalProblem.g:770:56: (iv_ruleNegativeLiteral= ruleNegativeLiteral EOF ) | ||
1985 | // InternalProblem.g:771:2: iv_ruleNegativeLiteral= ruleNegativeLiteral EOF | ||
1986 | { | ||
1987 | newCompositeNode(grammarAccess.getNegativeLiteralRule()); | ||
1988 | pushFollow(FOLLOW_1); | ||
1989 | iv_ruleNegativeLiteral=ruleNegativeLiteral(); | ||
1990 | |||
1991 | state._fsp--; | ||
1992 | |||
1993 | current =iv_ruleNegativeLiteral; | ||
1994 | match(input,EOF,FOLLOW_2); | ||
1995 | |||
1996 | } | ||
1997 | |||
1998 | } | ||
1999 | |||
2000 | catch (RecognitionException re) { | ||
2001 | recover(input,re); | ||
2002 | appendSkippedTokens(); | ||
2003 | } | ||
2004 | finally { | ||
2005 | } | ||
2006 | return current; | ||
2007 | } | ||
2008 | // $ANTLR end "entryRuleNegativeLiteral" | ||
2009 | |||
2010 | |||
2011 | // $ANTLR start "ruleNegativeLiteral" | ||
2012 | // InternalProblem.g:777:1: ruleNegativeLiteral returns [EObject current=null] : (otherlv_0= '!' ( (lv_atom_1_0= ruleAtom ) ) ) ; | ||
2013 | public final EObject ruleNegativeLiteral() throws RecognitionException { | ||
2014 | EObject current = null; | ||
2015 | |||
2016 | Token otherlv_0=null; | ||
2017 | EObject lv_atom_1_0 = null; | ||
2018 | |||
2019 | |||
2020 | |||
2021 | enterRule(); | ||
2022 | |||
2023 | try { | ||
2024 | // InternalProblem.g:783:2: ( (otherlv_0= '!' ( (lv_atom_1_0= ruleAtom ) ) ) ) | ||
2025 | // InternalProblem.g:784:2: (otherlv_0= '!' ( (lv_atom_1_0= ruleAtom ) ) ) | ||
2026 | { | ||
2027 | // InternalProblem.g:784:2: (otherlv_0= '!' ( (lv_atom_1_0= ruleAtom ) ) ) | ||
2028 | // InternalProblem.g:785:3: otherlv_0= '!' ( (lv_atom_1_0= ruleAtom ) ) | ||
2029 | { | ||
2030 | otherlv_0=(Token)match(input,27,FOLLOW_5); | ||
2031 | |||
2032 | newLeafNode(otherlv_0, grammarAccess.getNegativeLiteralAccess().getExclamationMarkKeyword_0()); | ||
2033 | |||
2034 | // InternalProblem.g:789:3: ( (lv_atom_1_0= ruleAtom ) ) | ||
2035 | // InternalProblem.g:790:4: (lv_atom_1_0= ruleAtom ) | ||
2036 | { | ||
2037 | // InternalProblem.g:790:4: (lv_atom_1_0= ruleAtom ) | ||
2038 | // InternalProblem.g:791:5: lv_atom_1_0= ruleAtom | ||
2039 | { | ||
2040 | |||
2041 | newCompositeNode(grammarAccess.getNegativeLiteralAccess().getAtomAtomParserRuleCall_1_0()); | ||
2042 | |||
2043 | pushFollow(FOLLOW_2); | ||
2044 | lv_atom_1_0=ruleAtom(); | ||
2045 | |||
2046 | state._fsp--; | ||
2047 | |||
2048 | |||
2049 | if (current==null) { | ||
2050 | current = createModelElementForParent(grammarAccess.getNegativeLiteralRule()); | ||
2051 | } | ||
2052 | set( | ||
2053 | current, | ||
2054 | "atom", | ||
2055 | lv_atom_1_0, | ||
2056 | "org.eclipse.viatra.solver.language.Problem.Atom"); | ||
2057 | afterParserOrEnumRuleCall(); | ||
2058 | |||
2059 | |||
2060 | } | ||
2061 | |||
2062 | |||
2063 | } | ||
2064 | |||
2065 | |||
2066 | } | ||
2067 | |||
2068 | |||
2069 | } | ||
2070 | |||
2071 | |||
2072 | leaveRule(); | ||
2073 | |||
2074 | } | ||
2075 | |||
2076 | catch (RecognitionException re) { | ||
2077 | recover(input,re); | ||
2078 | appendSkippedTokens(); | ||
2079 | } | ||
2080 | finally { | ||
2081 | } | ||
2082 | return current; | ||
2083 | } | ||
2084 | // $ANTLR end "ruleNegativeLiteral" | ||
2085 | |||
2086 | |||
2087 | // $ANTLR start "entryRuleAtom" | ||
2088 | // InternalProblem.g:812:1: entryRuleAtom returns [EObject current=null] : iv_ruleAtom= ruleAtom EOF ; | ||
2089 | public final EObject entryRuleAtom() throws RecognitionException { | ||
2090 | EObject current = null; | ||
2091 | |||
2092 | EObject iv_ruleAtom = null; | ||
2093 | |||
2094 | |||
2095 | try { | ||
2096 | // InternalProblem.g:812:45: (iv_ruleAtom= ruleAtom EOF ) | ||
2097 | // InternalProblem.g:813:2: iv_ruleAtom= ruleAtom EOF | ||
2098 | { | ||
2099 | newCompositeNode(grammarAccess.getAtomRule()); | ||
2100 | pushFollow(FOLLOW_1); | ||
2101 | iv_ruleAtom=ruleAtom(); | ||
2102 | |||
2103 | state._fsp--; | ||
2104 | |||
2105 | current =iv_ruleAtom; | ||
2106 | match(input,EOF,FOLLOW_2); | ||
2107 | |||
2108 | } | ||
2109 | |||
2110 | } | ||
2111 | |||
2112 | catch (RecognitionException re) { | ||
2113 | recover(input,re); | ||
2114 | appendSkippedTokens(); | ||
2115 | } | ||
2116 | finally { | ||
2117 | } | ||
2118 | return current; | ||
2119 | } | ||
2120 | // $ANTLR end "entryRuleAtom" | ||
2121 | |||
2122 | |||
2123 | // $ANTLR start "ruleAtom" | ||
2124 | // InternalProblem.g:819:1: ruleAtom returns [EObject current=null] : ( ( ( ruleQualifiedName ) ) ( (lv_transitiveClosure_1_0= '+' ) )? otherlv_2= '(' ( ( (otherlv_3= RULE_ID ) ) (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* )? otherlv_6= ')' ) ; | ||
2125 | public final EObject ruleAtom() throws RecognitionException { | ||
2126 | EObject current = null; | ||
2127 | |||
2128 | Token lv_transitiveClosure_1_0=null; | ||
2129 | Token otherlv_2=null; | ||
2130 | Token otherlv_3=null; | ||
2131 | Token otherlv_4=null; | ||
2132 | Token otherlv_5=null; | ||
2133 | Token otherlv_6=null; | ||
2134 | |||
2135 | |||
2136 | enterRule(); | ||
2137 | |||
2138 | try { | ||
2139 | // InternalProblem.g:825:2: ( ( ( ( ruleQualifiedName ) ) ( (lv_transitiveClosure_1_0= '+' ) )? otherlv_2= '(' ( ( (otherlv_3= RULE_ID ) ) (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* )? otherlv_6= ')' ) ) | ||
2140 | // InternalProblem.g:826:2: ( ( ( ruleQualifiedName ) ) ( (lv_transitiveClosure_1_0= '+' ) )? otherlv_2= '(' ( ( (otherlv_3= RULE_ID ) ) (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* )? otherlv_6= ')' ) | ||
2141 | { | ||
2142 | // InternalProblem.g:826:2: ( ( ( ruleQualifiedName ) ) ( (lv_transitiveClosure_1_0= '+' ) )? otherlv_2= '(' ( ( (otherlv_3= RULE_ID ) ) (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* )? otherlv_6= ')' ) | ||
2143 | // InternalProblem.g:827:3: ( ( ruleQualifiedName ) ) ( (lv_transitiveClosure_1_0= '+' ) )? otherlv_2= '(' ( ( (otherlv_3= RULE_ID ) ) (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* )? otherlv_6= ')' | ||
2144 | { | ||
2145 | // InternalProblem.g:827:3: ( ( ruleQualifiedName ) ) | ||
2146 | // InternalProblem.g:828:4: ( ruleQualifiedName ) | ||
2147 | { | ||
2148 | // InternalProblem.g:828:4: ( ruleQualifiedName ) | ||
2149 | // InternalProblem.g:829:5: ruleQualifiedName | ||
2150 | { | ||
2151 | |||
2152 | if (current==null) { | ||
2153 | current = createModelElement(grammarAccess.getAtomRule()); | ||
2154 | } | ||
2155 | |||
2156 | |||
2157 | newCompositeNode(grammarAccess.getAtomAccess().getRelationRelationCrossReference_0_0()); | ||
2158 | |||
2159 | pushFollow(FOLLOW_24); | ||
2160 | ruleQualifiedName(); | ||
2161 | |||
2162 | state._fsp--; | ||
2163 | |||
2164 | |||
2165 | afterParserOrEnumRuleCall(); | ||
2166 | |||
2167 | |||
2168 | } | ||
2169 | |||
2170 | |||
2171 | } | ||
2172 | |||
2173 | // InternalProblem.g:843:3: ( (lv_transitiveClosure_1_0= '+' ) )? | ||
2174 | int alt19=2; | ||
2175 | int LA19_0 = input.LA(1); | ||
2176 | |||
2177 | if ( (LA19_0==28) ) { | ||
2178 | alt19=1; | ||
2179 | } | ||
2180 | switch (alt19) { | ||
2181 | case 1 : | ||
2182 | // InternalProblem.g:844:4: (lv_transitiveClosure_1_0= '+' ) | ||
2183 | { | ||
2184 | // InternalProblem.g:844:4: (lv_transitiveClosure_1_0= '+' ) | ||
2185 | // InternalProblem.g:845:5: lv_transitiveClosure_1_0= '+' | ||
2186 | { | ||
2187 | lv_transitiveClosure_1_0=(Token)match(input,28,FOLLOW_17); | ||
2188 | |||
2189 | newLeafNode(lv_transitiveClosure_1_0, grammarAccess.getAtomAccess().getTransitiveClosurePlusSignKeyword_1_0()); | ||
2190 | |||
2191 | |||
2192 | if (current==null) { | ||
2193 | current = createModelElement(grammarAccess.getAtomRule()); | ||
2194 | } | ||
2195 | setWithLastConsumed(current, "transitiveClosure", lv_transitiveClosure_1_0 != null, "+"); | ||
2196 | |||
2197 | |||
2198 | } | ||
2199 | |||
2200 | |||
2201 | } | ||
2202 | break; | ||
2203 | |||
2204 | } | ||
2205 | |||
2206 | otherlv_2=(Token)match(input,23,FOLLOW_18); | ||
2207 | |||
2208 | newLeafNode(otherlv_2, grammarAccess.getAtomAccess().getLeftParenthesisKeyword_2()); | ||
2209 | |||
2210 | // InternalProblem.g:861:3: ( ( (otherlv_3= RULE_ID ) ) (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* )? | ||
2211 | int alt21=2; | ||
2212 | int LA21_0 = input.LA(1); | ||
2213 | |||
2214 | if ( (LA21_0==RULE_ID) ) { | ||
2215 | alt21=1; | ||
2216 | } | ||
2217 | switch (alt21) { | ||
2218 | case 1 : | ||
2219 | // InternalProblem.g:862:4: ( (otherlv_3= RULE_ID ) ) (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* | ||
2220 | { | ||
2221 | // InternalProblem.g:862:4: ( (otherlv_3= RULE_ID ) ) | ||
2222 | // InternalProblem.g:863:5: (otherlv_3= RULE_ID ) | ||
2223 | { | ||
2224 | // InternalProblem.g:863:5: (otherlv_3= RULE_ID ) | ||
2225 | // InternalProblem.g:864:6: otherlv_3= RULE_ID | ||
2226 | { | ||
2227 | |||
2228 | if (current==null) { | ||
2229 | current = createModelElement(grammarAccess.getAtomRule()); | ||
2230 | } | ||
2231 | |||
2232 | otherlv_3=(Token)match(input,RULE_ID,FOLLOW_19); | ||
2233 | |||
2234 | newLeafNode(otherlv_3, grammarAccess.getAtomAccess().getArgumentsVariableCrossReference_3_0_0()); | ||
2235 | |||
2236 | |||
2237 | } | ||
2238 | |||
2239 | |||
2240 | } | ||
2241 | |||
2242 | // InternalProblem.g:875:4: (otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) )* | ||
2243 | loop20: | ||
2244 | do { | ||
2245 | int alt20=2; | ||
2246 | int LA20_0 = input.LA(1); | ||
2247 | |||
2248 | if ( (LA20_0==15) ) { | ||
2249 | alt20=1; | ||
2250 | } | ||
2251 | |||
2252 | |||
2253 | switch (alt20) { | ||
2254 | case 1 : | ||
2255 | // InternalProblem.g:876:5: otherlv_4= ',' ( (otherlv_5= RULE_ID ) ) | ||
2256 | { | ||
2257 | otherlv_4=(Token)match(input,15,FOLLOW_5); | ||
2258 | |||
2259 | newLeafNode(otherlv_4, grammarAccess.getAtomAccess().getCommaKeyword_3_1_0()); | ||
2260 | |||
2261 | // InternalProblem.g:880:5: ( (otherlv_5= RULE_ID ) ) | ||
2262 | // InternalProblem.g:881:6: (otherlv_5= RULE_ID ) | ||
2263 | { | ||
2264 | // InternalProblem.g:881:6: (otherlv_5= RULE_ID ) | ||
2265 | // InternalProblem.g:882:7: otherlv_5= RULE_ID | ||
2266 | { | ||
2267 | |||
2268 | if (current==null) { | ||
2269 | current = createModelElement(grammarAccess.getAtomRule()); | ||
2270 | } | ||
2271 | |||
2272 | otherlv_5=(Token)match(input,RULE_ID,FOLLOW_19); | ||
2273 | |||
2274 | newLeafNode(otherlv_5, grammarAccess.getAtomAccess().getArgumentsVariableCrossReference_3_1_1_0()); | ||
2275 | |||
2276 | |||
2277 | } | ||
2278 | |||
2279 | |||
2280 | } | ||
2281 | |||
2282 | |||
2283 | } | ||
2284 | break; | ||
2285 | |||
2286 | default : | ||
2287 | break loop20; | ||
2288 | } | ||
2289 | } while (true); | ||
2290 | |||
2291 | |||
2292 | } | ||
2293 | break; | ||
2294 | |||
2295 | } | ||
2296 | |||
2297 | otherlv_6=(Token)match(input,24,FOLLOW_2); | ||
2298 | |||
2299 | newLeafNode(otherlv_6, grammarAccess.getAtomAccess().getRightParenthesisKeyword_4()); | ||
2300 | |||
2301 | |||
2302 | } | ||
2303 | |||
2304 | |||
2305 | } | ||
2306 | |||
2307 | |||
2308 | leaveRule(); | ||
2309 | |||
2310 | } | ||
2311 | |||
2312 | catch (RecognitionException re) { | ||
2313 | recover(input,re); | ||
2314 | appendSkippedTokens(); | ||
2315 | } | ||
2316 | finally { | ||
2317 | } | ||
2318 | return current; | ||
2319 | } | ||
2320 | // $ANTLR end "ruleAtom" | ||
2321 | |||
2322 | |||
2323 | // $ANTLR start "entryRuleAssertion" | ||
2324 | // InternalProblem.g:903:1: entryRuleAssertion returns [EObject current=null] : iv_ruleAssertion= ruleAssertion EOF ; | ||
2325 | public final EObject entryRuleAssertion() throws RecognitionException { | ||
2326 | EObject current = null; | ||
2327 | |||
2328 | EObject iv_ruleAssertion = null; | ||
2329 | |||
2330 | |||
2331 | try { | ||
2332 | // InternalProblem.g:903:50: (iv_ruleAssertion= ruleAssertion EOF ) | ||
2333 | // InternalProblem.g:904:2: iv_ruleAssertion= ruleAssertion EOF | ||
2334 | { | ||
2335 | newCompositeNode(grammarAccess.getAssertionRule()); | ||
2336 | pushFollow(FOLLOW_1); | ||
2337 | iv_ruleAssertion=ruleAssertion(); | ||
2338 | |||
2339 | state._fsp--; | ||
2340 | |||
2341 | current =iv_ruleAssertion; | ||
2342 | match(input,EOF,FOLLOW_2); | ||
2343 | |||
2344 | } | ||
2345 | |||
2346 | } | ||
2347 | |||
2348 | catch (RecognitionException re) { | ||
2349 | recover(input,re); | ||
2350 | appendSkippedTokens(); | ||
2351 | } | ||
2352 | finally { | ||
2353 | } | ||
2354 | return current; | ||
2355 | } | ||
2356 | // $ANTLR end "entryRuleAssertion" | ||
2357 | |||
2358 | |||
2359 | // $ANTLR start "ruleAssertion" | ||
2360 | // InternalProblem.g:910:1: ruleAssertion returns [EObject current=null] : ( ( ( ( ( ruleQualifiedName ) ) otherlv_1= '(' ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_5= ')' otherlv_6= ':' ( (lv_value_7_0= ruleLogicValue ) ) ) | ( ( (lv_value_8_0= ruleShortLogicValue ) )? ( ( ruleQualifiedName ) ) otherlv_10= '(' ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_14= ')' ) ) otherlv_15= '.' ) ; | ||
2361 | public final EObject ruleAssertion() throws RecognitionException { | ||
2362 | EObject current = null; | ||
2363 | |||
2364 | Token otherlv_1=null; | ||
2365 | Token otherlv_3=null; | ||
2366 | Token otherlv_5=null; | ||
2367 | Token otherlv_6=null; | ||
2368 | Token otherlv_10=null; | ||
2369 | Token otherlv_12=null; | ||
2370 | Token otherlv_14=null; | ||
2371 | Token otherlv_15=null; | ||
2372 | Enumerator lv_value_7_0 = null; | ||
2373 | |||
2374 | Enumerator lv_value_8_0 = null; | ||
2375 | |||
2376 | |||
2377 | |||
2378 | enterRule(); | ||
2379 | |||
2380 | try { | ||
2381 | // InternalProblem.g:916:2: ( ( ( ( ( ( ruleQualifiedName ) ) otherlv_1= '(' ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_5= ')' otherlv_6= ':' ( (lv_value_7_0= ruleLogicValue ) ) ) | ( ( (lv_value_8_0= ruleShortLogicValue ) )? ( ( ruleQualifiedName ) ) otherlv_10= '(' ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_14= ')' ) ) otherlv_15= '.' ) ) | ||
2382 | // InternalProblem.g:917:2: ( ( ( ( ( ruleQualifiedName ) ) otherlv_1= '(' ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_5= ')' otherlv_6= ':' ( (lv_value_7_0= ruleLogicValue ) ) ) | ( ( (lv_value_8_0= ruleShortLogicValue ) )? ( ( ruleQualifiedName ) ) otherlv_10= '(' ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_14= ')' ) ) otherlv_15= '.' ) | ||
2383 | { | ||
2384 | // InternalProblem.g:917:2: ( ( ( ( ( ruleQualifiedName ) ) otherlv_1= '(' ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_5= ')' otherlv_6= ':' ( (lv_value_7_0= ruleLogicValue ) ) ) | ( ( (lv_value_8_0= ruleShortLogicValue ) )? ( ( ruleQualifiedName ) ) otherlv_10= '(' ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_14= ')' ) ) otherlv_15= '.' ) | ||
2385 | // InternalProblem.g:918:3: ( ( ( ( ruleQualifiedName ) ) otherlv_1= '(' ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_5= ')' otherlv_6= ':' ( (lv_value_7_0= ruleLogicValue ) ) ) | ( ( (lv_value_8_0= ruleShortLogicValue ) )? ( ( ruleQualifiedName ) ) otherlv_10= '(' ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_14= ')' ) ) otherlv_15= '.' | ||
2386 | { | ||
2387 | // InternalProblem.g:918:3: ( ( ( ( ruleQualifiedName ) ) otherlv_1= '(' ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_5= ')' otherlv_6= ':' ( (lv_value_7_0= ruleLogicValue ) ) ) | ( ( (lv_value_8_0= ruleShortLogicValue ) )? ( ( ruleQualifiedName ) ) otherlv_10= '(' ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_14= ')' ) ) | ||
2388 | int alt27=2; | ||
2389 | alt27 = dfa27.predict(input); | ||
2390 | switch (alt27) { | ||
2391 | case 1 : | ||
2392 | // InternalProblem.g:919:4: ( ( ( ruleQualifiedName ) ) otherlv_1= '(' ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_5= ')' otherlv_6= ':' ( (lv_value_7_0= ruleLogicValue ) ) ) | ||
2393 | { | ||
2394 | // InternalProblem.g:919:4: ( ( ( ruleQualifiedName ) ) otherlv_1= '(' ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_5= ')' otherlv_6= ':' ( (lv_value_7_0= ruleLogicValue ) ) ) | ||
2395 | // InternalProblem.g:920:5: ( ( ruleQualifiedName ) ) otherlv_1= '(' ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_5= ')' otherlv_6= ':' ( (lv_value_7_0= ruleLogicValue ) ) | ||
2396 | { | ||
2397 | // InternalProblem.g:920:5: ( ( ruleQualifiedName ) ) | ||
2398 | // InternalProblem.g:921:6: ( ruleQualifiedName ) | ||
2399 | { | ||
2400 | // InternalProblem.g:921:6: ( ruleQualifiedName ) | ||
2401 | // InternalProblem.g:922:7: ruleQualifiedName | ||
2402 | { | ||
2403 | |||
2404 | if (current==null) { | ||
2405 | current = createModelElement(grammarAccess.getAssertionRule()); | ||
2406 | } | ||
2407 | |||
2408 | |||
2409 | newCompositeNode(grammarAccess.getAssertionAccess().getRelationRelationCrossReference_0_0_0_0()); | ||
2410 | |||
2411 | pushFollow(FOLLOW_17); | ||
2412 | ruleQualifiedName(); | ||
2413 | |||
2414 | state._fsp--; | ||
2415 | |||
2416 | |||
2417 | afterParserOrEnumRuleCall(); | ||
2418 | |||
2419 | |||
2420 | } | ||
2421 | |||
2422 | |||
2423 | } | ||
2424 | |||
2425 | otherlv_1=(Token)match(input,23,FOLLOW_18); | ||
2426 | |||
2427 | newLeafNode(otherlv_1, grammarAccess.getAssertionAccess().getLeftParenthesisKeyword_0_0_1()); | ||
2428 | |||
2429 | // InternalProblem.g:940:5: ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? | ||
2430 | int alt23=2; | ||
2431 | int LA23_0 = input.LA(1); | ||
2432 | |||
2433 | if ( (LA23_0==RULE_ID) ) { | ||
2434 | alt23=1; | ||
2435 | } | ||
2436 | switch (alt23) { | ||
2437 | case 1 : | ||
2438 | // InternalProblem.g:941:6: ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* | ||
2439 | { | ||
2440 | // InternalProblem.g:941:6: ( ( ruleQualifiedName ) ) | ||
2441 | // InternalProblem.g:942:7: ( ruleQualifiedName ) | ||
2442 | { | ||
2443 | // InternalProblem.g:942:7: ( ruleQualifiedName ) | ||
2444 | // InternalProblem.g:943:8: ruleQualifiedName | ||
2445 | { | ||
2446 | |||
2447 | if (current==null) { | ||
2448 | current = createModelElement(grammarAccess.getAssertionRule()); | ||
2449 | } | ||
2450 | |||
2451 | |||
2452 | newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_0_2_0_0()); | ||
2453 | |||
2454 | pushFollow(FOLLOW_19); | ||
2455 | ruleQualifiedName(); | ||
2456 | |||
2457 | state._fsp--; | ||
2458 | |||
2459 | |||
2460 | afterParserOrEnumRuleCall(); | ||
2461 | |||
2462 | |||
2463 | } | ||
2464 | |||
2465 | |||
2466 | } | ||
2467 | |||
2468 | // InternalProblem.g:957:6: (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* | ||
2469 | loop22: | ||
2470 | do { | ||
2471 | int alt22=2; | ||
2472 | int LA22_0 = input.LA(1); | ||
2473 | |||
2474 | if ( (LA22_0==15) ) { | ||
2475 | alt22=1; | ||
2476 | } | ||
2477 | |||
2478 | |||
2479 | switch (alt22) { | ||
2480 | case 1 : | ||
2481 | // InternalProblem.g:958:7: otherlv_3= ',' ( ( ruleQualifiedName ) ) | ||
2482 | { | ||
2483 | otherlv_3=(Token)match(input,15,FOLLOW_5); | ||
2484 | |||
2485 | newLeafNode(otherlv_3, grammarAccess.getAssertionAccess().getCommaKeyword_0_0_2_1_0()); | ||
2486 | |||
2487 | // InternalProblem.g:962:7: ( ( ruleQualifiedName ) ) | ||
2488 | // InternalProblem.g:963:8: ( ruleQualifiedName ) | ||
2489 | { | ||
2490 | // InternalProblem.g:963:8: ( ruleQualifiedName ) | ||
2491 | // InternalProblem.g:964:9: ruleQualifiedName | ||
2492 | { | ||
2493 | |||
2494 | if (current==null) { | ||
2495 | current = createModelElement(grammarAccess.getAssertionRule()); | ||
2496 | } | ||
2497 | |||
2498 | |||
2499 | newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_0_2_1_1_0()); | ||
2500 | |||
2501 | pushFollow(FOLLOW_19); | ||
2502 | ruleQualifiedName(); | ||
2503 | |||
2504 | state._fsp--; | ||
2505 | |||
2506 | |||
2507 | afterParserOrEnumRuleCall(); | ||
2508 | |||
2509 | |||
2510 | } | ||
2511 | |||
2512 | |||
2513 | } | ||
2514 | |||
2515 | |||
2516 | } | ||
2517 | break; | ||
2518 | |||
2519 | default : | ||
2520 | break loop22; | ||
2521 | } | ||
2522 | } while (true); | ||
2523 | |||
2524 | |||
2525 | } | ||
2526 | break; | ||
2527 | |||
2528 | } | ||
2529 | |||
2530 | otherlv_5=(Token)match(input,24,FOLLOW_25); | ||
2531 | |||
2532 | newLeafNode(otherlv_5, grammarAccess.getAssertionAccess().getRightParenthesisKeyword_0_0_3()); | ||
2533 | |||
2534 | otherlv_6=(Token)match(input,29,FOLLOW_26); | ||
2535 | |||
2536 | newLeafNode(otherlv_6, grammarAccess.getAssertionAccess().getColonKeyword_0_0_4()); | ||
2537 | |||
2538 | // InternalProblem.g:988:5: ( (lv_value_7_0= ruleLogicValue ) ) | ||
2539 | // InternalProblem.g:989:6: (lv_value_7_0= ruleLogicValue ) | ||
2540 | { | ||
2541 | // InternalProblem.g:989:6: (lv_value_7_0= ruleLogicValue ) | ||
2542 | // InternalProblem.g:990:7: lv_value_7_0= ruleLogicValue | ||
2543 | { | ||
2544 | |||
2545 | newCompositeNode(grammarAccess.getAssertionAccess().getValueLogicValueEnumRuleCall_0_0_5_0()); | ||
2546 | |||
2547 | pushFollow(FOLLOW_27); | ||
2548 | lv_value_7_0=ruleLogicValue(); | ||
2549 | |||
2550 | state._fsp--; | ||
2551 | |||
2552 | |||
2553 | if (current==null) { | ||
2554 | current = createModelElementForParent(grammarAccess.getAssertionRule()); | ||
2555 | } | ||
2556 | set( | ||
2557 | current, | ||
2558 | "value", | ||
2559 | lv_value_7_0, | ||
2560 | "org.eclipse.viatra.solver.language.Problem.LogicValue"); | ||
2561 | afterParserOrEnumRuleCall(); | ||
2562 | |||
2563 | |||
2564 | } | ||
2565 | |||
2566 | |||
2567 | } | ||
2568 | |||
2569 | |||
2570 | } | ||
2571 | |||
2572 | |||
2573 | } | ||
2574 | break; | ||
2575 | case 2 : | ||
2576 | // InternalProblem.g:1009:4: ( ( (lv_value_8_0= ruleShortLogicValue ) )? ( ( ruleQualifiedName ) ) otherlv_10= '(' ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_14= ')' ) | ||
2577 | { | ||
2578 | // InternalProblem.g:1009:4: ( ( (lv_value_8_0= ruleShortLogicValue ) )? ( ( ruleQualifiedName ) ) otherlv_10= '(' ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_14= ')' ) | ||
2579 | // InternalProblem.g:1010:5: ( (lv_value_8_0= ruleShortLogicValue ) )? ( ( ruleQualifiedName ) ) otherlv_10= '(' ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_14= ')' | ||
2580 | { | ||
2581 | // InternalProblem.g:1010:5: ( (lv_value_8_0= ruleShortLogicValue ) )? | ||
2582 | int alt24=2; | ||
2583 | int LA24_0 = input.LA(1); | ||
2584 | |||
2585 | if ( (LA24_0==27||LA24_0==39) ) { | ||
2586 | alt24=1; | ||
2587 | } | ||
2588 | switch (alt24) { | ||
2589 | case 1 : | ||
2590 | // InternalProblem.g:1011:6: (lv_value_8_0= ruleShortLogicValue ) | ||
2591 | { | ||
2592 | // InternalProblem.g:1011:6: (lv_value_8_0= ruleShortLogicValue ) | ||
2593 | // InternalProblem.g:1012:7: lv_value_8_0= ruleShortLogicValue | ||
2594 | { | ||
2595 | |||
2596 | newCompositeNode(grammarAccess.getAssertionAccess().getValueShortLogicValueEnumRuleCall_0_1_0_0()); | ||
2597 | |||
2598 | pushFollow(FOLLOW_5); | ||
2599 | lv_value_8_0=ruleShortLogicValue(); | ||
2600 | |||
2601 | state._fsp--; | ||
2602 | |||
2603 | |||
2604 | if (current==null) { | ||
2605 | current = createModelElementForParent(grammarAccess.getAssertionRule()); | ||
2606 | } | ||
2607 | set( | ||
2608 | current, | ||
2609 | "value", | ||
2610 | lv_value_8_0, | ||
2611 | "org.eclipse.viatra.solver.language.Problem.ShortLogicValue"); | ||
2612 | afterParserOrEnumRuleCall(); | ||
2613 | |||
2614 | |||
2615 | } | ||
2616 | |||
2617 | |||
2618 | } | ||
2619 | break; | ||
2620 | |||
2621 | } | ||
2622 | |||
2623 | // InternalProblem.g:1029:5: ( ( ruleQualifiedName ) ) | ||
2624 | // InternalProblem.g:1030:6: ( ruleQualifiedName ) | ||
2625 | { | ||
2626 | // InternalProblem.g:1030:6: ( ruleQualifiedName ) | ||
2627 | // InternalProblem.g:1031:7: ruleQualifiedName | ||
2628 | { | ||
2629 | |||
2630 | if (current==null) { | ||
2631 | current = createModelElement(grammarAccess.getAssertionRule()); | ||
2632 | } | ||
2633 | |||
2634 | |||
2635 | newCompositeNode(grammarAccess.getAssertionAccess().getRelationRelationCrossReference_0_1_1_0()); | ||
2636 | |||
2637 | pushFollow(FOLLOW_17); | ||
2638 | ruleQualifiedName(); | ||
2639 | |||
2640 | state._fsp--; | ||
2641 | |||
2642 | |||
2643 | afterParserOrEnumRuleCall(); | ||
2644 | |||
2645 | |||
2646 | } | ||
2647 | |||
2648 | |||
2649 | } | ||
2650 | |||
2651 | otherlv_10=(Token)match(input,23,FOLLOW_18); | ||
2652 | |||
2653 | newLeafNode(otherlv_10, grammarAccess.getAssertionAccess().getLeftParenthesisKeyword_0_1_2()); | ||
2654 | |||
2655 | // InternalProblem.g:1049:5: ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? | ||
2656 | int alt26=2; | ||
2657 | int LA26_0 = input.LA(1); | ||
2658 | |||
2659 | if ( (LA26_0==RULE_ID) ) { | ||
2660 | alt26=1; | ||
2661 | } | ||
2662 | switch (alt26) { | ||
2663 | case 1 : | ||
2664 | // InternalProblem.g:1050:6: ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* | ||
2665 | { | ||
2666 | // InternalProblem.g:1050:6: ( ( ruleQualifiedName ) ) | ||
2667 | // InternalProblem.g:1051:7: ( ruleQualifiedName ) | ||
2668 | { | ||
2669 | // InternalProblem.g:1051:7: ( ruleQualifiedName ) | ||
2670 | // InternalProblem.g:1052:8: ruleQualifiedName | ||
2671 | { | ||
2672 | |||
2673 | if (current==null) { | ||
2674 | current = createModelElement(grammarAccess.getAssertionRule()); | ||
2675 | } | ||
2676 | |||
2677 | |||
2678 | newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_1_3_0_0()); | ||
2679 | |||
2680 | pushFollow(FOLLOW_19); | ||
2681 | ruleQualifiedName(); | ||
2682 | |||
2683 | state._fsp--; | ||
2684 | |||
2685 | |||
2686 | afterParserOrEnumRuleCall(); | ||
2687 | |||
2688 | |||
2689 | } | ||
2690 | |||
2691 | |||
2692 | } | ||
2693 | |||
2694 | // InternalProblem.g:1066:6: (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* | ||
2695 | loop25: | ||
2696 | do { | ||
2697 | int alt25=2; | ||
2698 | int LA25_0 = input.LA(1); | ||
2699 | |||
2700 | if ( (LA25_0==15) ) { | ||
2701 | alt25=1; | ||
2702 | } | ||
2703 | |||
2704 | |||
2705 | switch (alt25) { | ||
2706 | case 1 : | ||
2707 | // InternalProblem.g:1067:7: otherlv_12= ',' ( ( ruleQualifiedName ) ) | ||
2708 | { | ||
2709 | otherlv_12=(Token)match(input,15,FOLLOW_5); | ||
2710 | |||
2711 | newLeafNode(otherlv_12, grammarAccess.getAssertionAccess().getCommaKeyword_0_1_3_1_0()); | ||
2712 | |||
2713 | // InternalProblem.g:1071:7: ( ( ruleQualifiedName ) ) | ||
2714 | // InternalProblem.g:1072:8: ( ruleQualifiedName ) | ||
2715 | { | ||
2716 | // InternalProblem.g:1072:8: ( ruleQualifiedName ) | ||
2717 | // InternalProblem.g:1073:9: ruleQualifiedName | ||
2718 | { | ||
2719 | |||
2720 | if (current==null) { | ||
2721 | current = createModelElement(grammarAccess.getAssertionRule()); | ||
2722 | } | ||
2723 | |||
2724 | |||
2725 | newCompositeNode(grammarAccess.getAssertionAccess().getArgumentsNodeCrossReference_0_1_3_1_1_0()); | ||
2726 | |||
2727 | pushFollow(FOLLOW_19); | ||
2728 | ruleQualifiedName(); | ||
2729 | |||
2730 | state._fsp--; | ||
2731 | |||
2732 | |||
2733 | afterParserOrEnumRuleCall(); | ||
2734 | |||
2735 | |||
2736 | } | ||
2737 | |||
2738 | |||
2739 | } | ||
2740 | |||
2741 | |||
2742 | } | ||
2743 | break; | ||
2744 | |||
2745 | default : | ||
2746 | break loop25; | ||
2747 | } | ||
2748 | } while (true); | ||
2749 | |||
2750 | |||
2751 | } | ||
2752 | break; | ||
2753 | |||
2754 | } | ||
2755 | |||
2756 | otherlv_14=(Token)match(input,24,FOLLOW_27); | ||
2757 | |||
2758 | newLeafNode(otherlv_14, grammarAccess.getAssertionAccess().getRightParenthesisKeyword_0_1_4()); | ||
2759 | |||
2760 | |||
2761 | } | ||
2762 | |||
2763 | |||
2764 | } | ||
2765 | break; | ||
2766 | |||
2767 | } | ||
2768 | |||
2769 | otherlv_15=(Token)match(input,17,FOLLOW_2); | ||
2770 | |||
2771 | newLeafNode(otherlv_15, grammarAccess.getAssertionAccess().getFullStopKeyword_1()); | ||
2772 | |||
2773 | |||
2774 | } | ||
2775 | |||
2776 | |||
2777 | } | ||
2778 | |||
2779 | |||
2780 | leaveRule(); | ||
2781 | |||
2782 | } | ||
2783 | |||
2784 | catch (RecognitionException re) { | ||
2785 | recover(input,re); | ||
2786 | appendSkippedTokens(); | ||
2787 | } | ||
2788 | finally { | ||
2789 | } | ||
2790 | return current; | ||
2791 | } | ||
2792 | // $ANTLR end "ruleAssertion" | ||
2793 | |||
2794 | |||
2795 | // $ANTLR start "entryRuleScopeDeclaration" | ||
2796 | // InternalProblem.g:1103:1: entryRuleScopeDeclaration returns [EObject current=null] : iv_ruleScopeDeclaration= ruleScopeDeclaration EOF ; | ||
2797 | public final EObject entryRuleScopeDeclaration() throws RecognitionException { | ||
2798 | EObject current = null; | ||
2799 | |||
2800 | EObject iv_ruleScopeDeclaration = null; | ||
2801 | |||
2802 | |||
2803 | try { | ||
2804 | // InternalProblem.g:1103:57: (iv_ruleScopeDeclaration= ruleScopeDeclaration EOF ) | ||
2805 | // InternalProblem.g:1104:2: iv_ruleScopeDeclaration= ruleScopeDeclaration EOF | ||
2806 | { | ||
2807 | newCompositeNode(grammarAccess.getScopeDeclarationRule()); | ||
2808 | pushFollow(FOLLOW_1); | ||
2809 | iv_ruleScopeDeclaration=ruleScopeDeclaration(); | ||
2810 | |||
2811 | state._fsp--; | ||
2812 | |||
2813 | current =iv_ruleScopeDeclaration; | ||
2814 | match(input,EOF,FOLLOW_2); | ||
2815 | |||
2816 | } | ||
2817 | |||
2818 | } | ||
2819 | |||
2820 | catch (RecognitionException re) { | ||
2821 | recover(input,re); | ||
2822 | appendSkippedTokens(); | ||
2823 | } | ||
2824 | finally { | ||
2825 | } | ||
2826 | return current; | ||
2827 | } | ||
2828 | // $ANTLR end "entryRuleScopeDeclaration" | ||
2829 | |||
2830 | |||
2831 | // $ANTLR start "ruleScopeDeclaration" | ||
2832 | // InternalProblem.g:1110:1: ruleScopeDeclaration returns [EObject current=null] : (otherlv_0= 'scope' ( (lv_typeScopes_1_0= ruleTypeScope ) ) (otherlv_2= ',' ( (lv_typeScopes_3_0= ruleTypeScope ) ) )* otherlv_4= '.' ) ; | ||
2833 | public final EObject ruleScopeDeclaration() throws RecognitionException { | ||
2834 | EObject current = null; | ||
2835 | |||
2836 | Token otherlv_0=null; | ||
2837 | Token otherlv_2=null; | ||
2838 | Token otherlv_4=null; | ||
2839 | EObject lv_typeScopes_1_0 = null; | ||
2840 | |||
2841 | EObject lv_typeScopes_3_0 = null; | ||
2842 | |||
2843 | |||
2844 | |||
2845 | enterRule(); | ||
2846 | |||
2847 | try { | ||
2848 | // InternalProblem.g:1116:2: ( (otherlv_0= 'scope' ( (lv_typeScopes_1_0= ruleTypeScope ) ) (otherlv_2= ',' ( (lv_typeScopes_3_0= ruleTypeScope ) ) )* otherlv_4= '.' ) ) | ||
2849 | // InternalProblem.g:1117:2: (otherlv_0= 'scope' ( (lv_typeScopes_1_0= ruleTypeScope ) ) (otherlv_2= ',' ( (lv_typeScopes_3_0= ruleTypeScope ) ) )* otherlv_4= '.' ) | ||
2850 | { | ||
2851 | // InternalProblem.g:1117:2: (otherlv_0= 'scope' ( (lv_typeScopes_1_0= ruleTypeScope ) ) (otherlv_2= ',' ( (lv_typeScopes_3_0= ruleTypeScope ) ) )* otherlv_4= '.' ) | ||
2852 | // InternalProblem.g:1118:3: otherlv_0= 'scope' ( (lv_typeScopes_1_0= ruleTypeScope ) ) (otherlv_2= ',' ( (lv_typeScopes_3_0= ruleTypeScope ) ) )* otherlv_4= '.' | ||
2853 | { | ||
2854 | otherlv_0=(Token)match(input,30,FOLLOW_5); | ||
2855 | |||
2856 | newLeafNode(otherlv_0, grammarAccess.getScopeDeclarationAccess().getScopeKeyword_0()); | ||
2857 | |||
2858 | // InternalProblem.g:1122:3: ( (lv_typeScopes_1_0= ruleTypeScope ) ) | ||
2859 | // InternalProblem.g:1123:4: (lv_typeScopes_1_0= ruleTypeScope ) | ||
2860 | { | ||
2861 | // InternalProblem.g:1123:4: (lv_typeScopes_1_0= ruleTypeScope ) | ||
2862 | // InternalProblem.g:1124:5: lv_typeScopes_1_0= ruleTypeScope | ||
2863 | { | ||
2864 | |||
2865 | newCompositeNode(grammarAccess.getScopeDeclarationAccess().getTypeScopesTypeScopeParserRuleCall_1_0()); | ||
2866 | |||
2867 | pushFollow(FOLLOW_8); | ||
2868 | lv_typeScopes_1_0=ruleTypeScope(); | ||
2869 | |||
2870 | state._fsp--; | ||
2871 | |||
2872 | |||
2873 | if (current==null) { | ||
2874 | current = createModelElementForParent(grammarAccess.getScopeDeclarationRule()); | ||
2875 | } | ||
2876 | add( | ||
2877 | current, | ||
2878 | "typeScopes", | ||
2879 | lv_typeScopes_1_0, | ||
2880 | "org.eclipse.viatra.solver.language.Problem.TypeScope"); | ||
2881 | afterParserOrEnumRuleCall(); | ||
2882 | |||
2883 | |||
2884 | } | ||
2885 | |||
2886 | |||
2887 | } | ||
2888 | |||
2889 | // InternalProblem.g:1141:3: (otherlv_2= ',' ( (lv_typeScopes_3_0= ruleTypeScope ) ) )* | ||
2890 | loop28: | ||
2891 | do { | ||
2892 | int alt28=2; | ||
2893 | int LA28_0 = input.LA(1); | ||
2894 | |||
2895 | if ( (LA28_0==15) ) { | ||
2896 | alt28=1; | ||
2897 | } | ||
2898 | |||
2899 | |||
2900 | switch (alt28) { | ||
2901 | case 1 : | ||
2902 | // InternalProblem.g:1142:4: otherlv_2= ',' ( (lv_typeScopes_3_0= ruleTypeScope ) ) | ||
2903 | { | ||
2904 | otherlv_2=(Token)match(input,15,FOLLOW_5); | ||
2905 | |||
2906 | newLeafNode(otherlv_2, grammarAccess.getScopeDeclarationAccess().getCommaKeyword_2_0()); | ||
2907 | |||
2908 | // InternalProblem.g:1146:4: ( (lv_typeScopes_3_0= ruleTypeScope ) ) | ||
2909 | // InternalProblem.g:1147:5: (lv_typeScopes_3_0= ruleTypeScope ) | ||
2910 | { | ||
2911 | // InternalProblem.g:1147:5: (lv_typeScopes_3_0= ruleTypeScope ) | ||
2912 | // InternalProblem.g:1148:6: lv_typeScopes_3_0= ruleTypeScope | ||
2913 | { | ||
2914 | |||
2915 | newCompositeNode(grammarAccess.getScopeDeclarationAccess().getTypeScopesTypeScopeParserRuleCall_2_1_0()); | ||
2916 | |||
2917 | pushFollow(FOLLOW_8); | ||
2918 | lv_typeScopes_3_0=ruleTypeScope(); | ||
2919 | |||
2920 | state._fsp--; | ||
2921 | |||
2922 | |||
2923 | if (current==null) { | ||
2924 | current = createModelElementForParent(grammarAccess.getScopeDeclarationRule()); | ||
2925 | } | ||
2926 | add( | ||
2927 | current, | ||
2928 | "typeScopes", | ||
2929 | lv_typeScopes_3_0, | ||
2930 | "org.eclipse.viatra.solver.language.Problem.TypeScope"); | ||
2931 | afterParserOrEnumRuleCall(); | ||
2932 | |||
2933 | |||
2934 | } | ||
2935 | |||
2936 | |||
2937 | } | ||
2938 | |||
2939 | |||
2940 | } | ||
2941 | break; | ||
2942 | |||
2943 | default : | ||
2944 | break loop28; | ||
2945 | } | ||
2946 | } while (true); | ||
2947 | |||
2948 | otherlv_4=(Token)match(input,17,FOLLOW_2); | ||
2949 | |||
2950 | newLeafNode(otherlv_4, grammarAccess.getScopeDeclarationAccess().getFullStopKeyword_3()); | ||
2951 | |||
2952 | |||
2953 | } | ||
2954 | |||
2955 | |||
2956 | } | ||
2957 | |||
2958 | |||
2959 | leaveRule(); | ||
2960 | |||
2961 | } | ||
2962 | |||
2963 | catch (RecognitionException re) { | ||
2964 | recover(input,re); | ||
2965 | appendSkippedTokens(); | ||
2966 | } | ||
2967 | finally { | ||
2968 | } | ||
2969 | return current; | ||
2970 | } | ||
2971 | // $ANTLR end "ruleScopeDeclaration" | ||
2972 | |||
2973 | |||
2974 | // $ANTLR start "entryRuleTypeScope" | ||
2975 | // InternalProblem.g:1174:1: entryRuleTypeScope returns [EObject current=null] : iv_ruleTypeScope= ruleTypeScope EOF ; | ||
2976 | public final EObject entryRuleTypeScope() throws RecognitionException { | ||
2977 | EObject current = null; | ||
2978 | |||
2979 | EObject iv_ruleTypeScope = null; | ||
2980 | |||
2981 | |||
2982 | try { | ||
2983 | // InternalProblem.g:1174:50: (iv_ruleTypeScope= ruleTypeScope EOF ) | ||
2984 | // InternalProblem.g:1175:2: iv_ruleTypeScope= ruleTypeScope EOF | ||
2985 | { | ||
2986 | newCompositeNode(grammarAccess.getTypeScopeRule()); | ||
2987 | pushFollow(FOLLOW_1); | ||
2988 | iv_ruleTypeScope=ruleTypeScope(); | ||
2989 | |||
2990 | state._fsp--; | ||
2991 | |||
2992 | current =iv_ruleTypeScope; | ||
2993 | match(input,EOF,FOLLOW_2); | ||
2994 | |||
2995 | } | ||
2996 | |||
2997 | } | ||
2998 | |||
2999 | catch (RecognitionException re) { | ||
3000 | recover(input,re); | ||
3001 | appendSkippedTokens(); | ||
3002 | } | ||
3003 | finally { | ||
3004 | } | ||
3005 | return current; | ||
3006 | } | ||
3007 | // $ANTLR end "entryRuleTypeScope" | ||
3008 | |||
3009 | |||
3010 | // $ANTLR start "ruleTypeScope" | ||
3011 | // InternalProblem.g:1181:1: ruleTypeScope returns [EObject current=null] : ( ( (otherlv_0= RULE_ID ) ) ( ( (lv_increment_1_0= '+=' ) ) | otherlv_2= '=' ) ( (lv_multiplicity_3_0= ruleMultiplicity ) ) ) ; | ||
3012 | public final EObject ruleTypeScope() throws RecognitionException { | ||
3013 | EObject current = null; | ||
3014 | |||
3015 | Token otherlv_0=null; | ||
3016 | Token lv_increment_1_0=null; | ||
3017 | Token otherlv_2=null; | ||
3018 | EObject lv_multiplicity_3_0 = null; | ||
3019 | |||
3020 | |||
3021 | |||
3022 | enterRule(); | ||
3023 | |||
3024 | try { | ||
3025 | // InternalProblem.g:1187:2: ( ( ( (otherlv_0= RULE_ID ) ) ( ( (lv_increment_1_0= '+=' ) ) | otherlv_2= '=' ) ( (lv_multiplicity_3_0= ruleMultiplicity ) ) ) ) | ||
3026 | // InternalProblem.g:1188:2: ( ( (otherlv_0= RULE_ID ) ) ( ( (lv_increment_1_0= '+=' ) ) | otherlv_2= '=' ) ( (lv_multiplicity_3_0= ruleMultiplicity ) ) ) | ||
3027 | { | ||
3028 | // InternalProblem.g:1188:2: ( ( (otherlv_0= RULE_ID ) ) ( ( (lv_increment_1_0= '+=' ) ) | otherlv_2= '=' ) ( (lv_multiplicity_3_0= ruleMultiplicity ) ) ) | ||
3029 | // InternalProblem.g:1189:3: ( (otherlv_0= RULE_ID ) ) ( ( (lv_increment_1_0= '+=' ) ) | otherlv_2= '=' ) ( (lv_multiplicity_3_0= ruleMultiplicity ) ) | ||
3030 | { | ||
3031 | // InternalProblem.g:1189:3: ( (otherlv_0= RULE_ID ) ) | ||
3032 | // InternalProblem.g:1190:4: (otherlv_0= RULE_ID ) | ||
3033 | { | ||
3034 | // InternalProblem.g:1190:4: (otherlv_0= RULE_ID ) | ||
3035 | // InternalProblem.g:1191:5: otherlv_0= RULE_ID | ||
3036 | { | ||
3037 | |||
3038 | if (current==null) { | ||
3039 | current = createModelElement(grammarAccess.getTypeScopeRule()); | ||
3040 | } | ||
3041 | |||
3042 | otherlv_0=(Token)match(input,RULE_ID,FOLLOW_28); | ||
3043 | |||
3044 | newLeafNode(otherlv_0, grammarAccess.getTypeScopeAccess().getTargetTypeClassDeclarationCrossReference_0_0()); | ||
3045 | |||
3046 | |||
3047 | } | ||
3048 | |||
3049 | |||
3050 | } | ||
3051 | |||
3052 | // InternalProblem.g:1202:3: ( ( (lv_increment_1_0= '+=' ) ) | otherlv_2= '=' ) | ||
3053 | int alt29=2; | ||
3054 | int LA29_0 = input.LA(1); | ||
3055 | |||
3056 | if ( (LA29_0==31) ) { | ||
3057 | alt29=1; | ||
3058 | } | ||
3059 | else if ( (LA29_0==32) ) { | ||
3060 | alt29=2; | ||
3061 | } | ||
3062 | else { | ||
3063 | NoViableAltException nvae = | ||
3064 | new NoViableAltException("", 29, 0, input); | ||
3065 | |||
3066 | throw nvae; | ||
3067 | } | ||
3068 | switch (alt29) { | ||
3069 | case 1 : | ||
3070 | // InternalProblem.g:1203:4: ( (lv_increment_1_0= '+=' ) ) | ||
3071 | { | ||
3072 | // InternalProblem.g:1203:4: ( (lv_increment_1_0= '+=' ) ) | ||
3073 | // InternalProblem.g:1204:5: (lv_increment_1_0= '+=' ) | ||
3074 | { | ||
3075 | // InternalProblem.g:1204:5: (lv_increment_1_0= '+=' ) | ||
3076 | // InternalProblem.g:1205:6: lv_increment_1_0= '+=' | ||
3077 | { | ||
3078 | lv_increment_1_0=(Token)match(input,31,FOLLOW_13); | ||
3079 | |||
3080 | newLeafNode(lv_increment_1_0, grammarAccess.getTypeScopeAccess().getIncrementPlusSignEqualsSignKeyword_1_0_0()); | ||
3081 | |||
3082 | |||
3083 | if (current==null) { | ||
3084 | current = createModelElement(grammarAccess.getTypeScopeRule()); | ||
3085 | } | ||
3086 | setWithLastConsumed(current, "increment", lv_increment_1_0 != null, "+="); | ||
3087 | |||
3088 | |||
3089 | } | ||
3090 | |||
3091 | |||
3092 | } | ||
3093 | |||
3094 | |||
3095 | } | ||
3096 | break; | ||
3097 | case 2 : | ||
3098 | // InternalProblem.g:1218:4: otherlv_2= '=' | ||
3099 | { | ||
3100 | otherlv_2=(Token)match(input,32,FOLLOW_13); | ||
3101 | |||
3102 | newLeafNode(otherlv_2, grammarAccess.getTypeScopeAccess().getEqualsSignKeyword_1_1()); | ||
3103 | |||
3104 | |||
3105 | } | ||
3106 | break; | ||
3107 | |||
3108 | } | ||
3109 | |||
3110 | // InternalProblem.g:1223:3: ( (lv_multiplicity_3_0= ruleMultiplicity ) ) | ||
3111 | // InternalProblem.g:1224:4: (lv_multiplicity_3_0= ruleMultiplicity ) | ||
3112 | { | ||
3113 | // InternalProblem.g:1224:4: (lv_multiplicity_3_0= ruleMultiplicity ) | ||
3114 | // InternalProblem.g:1225:5: lv_multiplicity_3_0= ruleMultiplicity | ||
3115 | { | ||
3116 | |||
3117 | newCompositeNode(grammarAccess.getTypeScopeAccess().getMultiplicityMultiplicityParserRuleCall_2_0()); | ||
3118 | |||
3119 | pushFollow(FOLLOW_2); | ||
3120 | lv_multiplicity_3_0=ruleMultiplicity(); | ||
3121 | |||
3122 | state._fsp--; | ||
3123 | |||
3124 | |||
3125 | if (current==null) { | ||
3126 | current = createModelElementForParent(grammarAccess.getTypeScopeRule()); | ||
3127 | } | ||
3128 | set( | ||
3129 | current, | ||
3130 | "multiplicity", | ||
3131 | lv_multiplicity_3_0, | ||
3132 | "org.eclipse.viatra.solver.language.Problem.Multiplicity"); | ||
3133 | afterParserOrEnumRuleCall(); | ||
3134 | |||
3135 | |||
3136 | } | ||
3137 | |||
3138 | |||
3139 | } | ||
3140 | |||
3141 | |||
3142 | } | ||
3143 | |||
3144 | |||
3145 | } | ||
3146 | |||
3147 | |||
3148 | leaveRule(); | ||
3149 | |||
3150 | } | ||
3151 | |||
3152 | catch (RecognitionException re) { | ||
3153 | recover(input,re); | ||
3154 | appendSkippedTokens(); | ||
3155 | } | ||
3156 | finally { | ||
3157 | } | ||
3158 | return current; | ||
3159 | } | ||
3160 | // $ANTLR end "ruleTypeScope" | ||
3161 | |||
3162 | |||
3163 | // $ANTLR start "entryRuleMultiplicity" | ||
3164 | // InternalProblem.g:1246:1: entryRuleMultiplicity returns [EObject current=null] : iv_ruleMultiplicity= ruleMultiplicity EOF ; | ||
3165 | public final EObject entryRuleMultiplicity() throws RecognitionException { | ||
3166 | EObject current = null; | ||
3167 | |||
3168 | EObject iv_ruleMultiplicity = null; | ||
3169 | |||
3170 | |||
3171 | try { | ||
3172 | // InternalProblem.g:1246:53: (iv_ruleMultiplicity= ruleMultiplicity EOF ) | ||
3173 | // InternalProblem.g:1247:2: iv_ruleMultiplicity= ruleMultiplicity EOF | ||
3174 | { | ||
3175 | newCompositeNode(grammarAccess.getMultiplicityRule()); | ||
3176 | pushFollow(FOLLOW_1); | ||
3177 | iv_ruleMultiplicity=ruleMultiplicity(); | ||
3178 | |||
3179 | state._fsp--; | ||
3180 | |||
3181 | current =iv_ruleMultiplicity; | ||
3182 | match(input,EOF,FOLLOW_2); | ||
3183 | |||
3184 | } | ||
3185 | |||
3186 | } | ||
3187 | |||
3188 | catch (RecognitionException re) { | ||
3189 | recover(input,re); | ||
3190 | appendSkippedTokens(); | ||
3191 | } | ||
3192 | finally { | ||
3193 | } | ||
3194 | return current; | ||
3195 | } | ||
3196 | // $ANTLR end "entryRuleMultiplicity" | ||
3197 | |||
3198 | |||
3199 | // $ANTLR start "ruleMultiplicity" | ||
3200 | // InternalProblem.g:1253:1: ruleMultiplicity returns [EObject current=null] : (this_RangeMultiplicity_0= ruleRangeMultiplicity | this_ExactMultiplicity_1= ruleExactMultiplicity ) ; | ||
3201 | public final EObject ruleMultiplicity() throws RecognitionException { | ||
3202 | EObject current = null; | ||
3203 | |||
3204 | EObject this_RangeMultiplicity_0 = null; | ||
3205 | |||
3206 | EObject this_ExactMultiplicity_1 = null; | ||
3207 | |||
3208 | |||
3209 | |||
3210 | enterRule(); | ||
3211 | |||
3212 | try { | ||
3213 | // InternalProblem.g:1259:2: ( (this_RangeMultiplicity_0= ruleRangeMultiplicity | this_ExactMultiplicity_1= ruleExactMultiplicity ) ) | ||
3214 | // InternalProblem.g:1260:2: (this_RangeMultiplicity_0= ruleRangeMultiplicity | this_ExactMultiplicity_1= ruleExactMultiplicity ) | ||
3215 | { | ||
3216 | // InternalProblem.g:1260:2: (this_RangeMultiplicity_0= ruleRangeMultiplicity | this_ExactMultiplicity_1= ruleExactMultiplicity ) | ||
3217 | int alt30=2; | ||
3218 | int LA30_0 = input.LA(1); | ||
3219 | |||
3220 | if ( (LA30_0==RULE_INT) ) { | ||
3221 | int LA30_1 = input.LA(2); | ||
3222 | |||
3223 | if ( (LA30_1==33) ) { | ||
3224 | alt30=1; | ||
3225 | } | ||
3226 | else if ( (LA30_1==EOF||(LA30_1>=15 && LA30_1<=17)) ) { | ||
3227 | alt30=2; | ||
3228 | } | ||
3229 | else { | ||
3230 | NoViableAltException nvae = | ||
3231 | new NoViableAltException("", 30, 1, input); | ||
3232 | |||
3233 | throw nvae; | ||
3234 | } | ||
3235 | } | ||
3236 | else { | ||
3237 | NoViableAltException nvae = | ||
3238 | new NoViableAltException("", 30, 0, input); | ||
3239 | |||
3240 | throw nvae; | ||
3241 | } | ||
3242 | switch (alt30) { | ||
3243 | case 1 : | ||
3244 | // InternalProblem.g:1261:3: this_RangeMultiplicity_0= ruleRangeMultiplicity | ||
3245 | { | ||
3246 | |||
3247 | newCompositeNode(grammarAccess.getMultiplicityAccess().getRangeMultiplicityParserRuleCall_0()); | ||
3248 | |||
3249 | pushFollow(FOLLOW_2); | ||
3250 | this_RangeMultiplicity_0=ruleRangeMultiplicity(); | ||
3251 | |||
3252 | state._fsp--; | ||
3253 | |||
3254 | |||
3255 | current = this_RangeMultiplicity_0; | ||
3256 | afterParserOrEnumRuleCall(); | ||
3257 | |||
3258 | |||
3259 | } | ||
3260 | break; | ||
3261 | case 2 : | ||
3262 | // InternalProblem.g:1270:3: this_ExactMultiplicity_1= ruleExactMultiplicity | ||
3263 | { | ||
3264 | |||
3265 | newCompositeNode(grammarAccess.getMultiplicityAccess().getExactMultiplicityParserRuleCall_1()); | ||
3266 | |||
3267 | pushFollow(FOLLOW_2); | ||
3268 | this_ExactMultiplicity_1=ruleExactMultiplicity(); | ||
3269 | |||
3270 | state._fsp--; | ||
3271 | |||
3272 | |||
3273 | current = this_ExactMultiplicity_1; | ||
3274 | afterParserOrEnumRuleCall(); | ||
3275 | |||
3276 | |||
3277 | } | ||
3278 | break; | ||
3279 | |||
3280 | } | ||
3281 | |||
3282 | |||
3283 | } | ||
3284 | |||
3285 | |||
3286 | leaveRule(); | ||
3287 | |||
3288 | } | ||
3289 | |||
3290 | catch (RecognitionException re) { | ||
3291 | recover(input,re); | ||
3292 | appendSkippedTokens(); | ||
3293 | } | ||
3294 | finally { | ||
3295 | } | ||
3296 | return current; | ||
3297 | } | ||
3298 | // $ANTLR end "ruleMultiplicity" | ||
3299 | |||
3300 | |||
3301 | // $ANTLR start "entryRuleRangeMultiplicity" | ||
3302 | // InternalProblem.g:1282:1: entryRuleRangeMultiplicity returns [EObject current=null] : iv_ruleRangeMultiplicity= ruleRangeMultiplicity EOF ; | ||
3303 | public final EObject entryRuleRangeMultiplicity() throws RecognitionException { | ||
3304 | EObject current = null; | ||
3305 | |||
3306 | EObject iv_ruleRangeMultiplicity = null; | ||
3307 | |||
3308 | |||
3309 | try { | ||
3310 | // InternalProblem.g:1282:58: (iv_ruleRangeMultiplicity= ruleRangeMultiplicity EOF ) | ||
3311 | // InternalProblem.g:1283:2: iv_ruleRangeMultiplicity= ruleRangeMultiplicity EOF | ||
3312 | { | ||
3313 | newCompositeNode(grammarAccess.getRangeMultiplicityRule()); | ||
3314 | pushFollow(FOLLOW_1); | ||
3315 | iv_ruleRangeMultiplicity=ruleRangeMultiplicity(); | ||
3316 | |||
3317 | state._fsp--; | ||
3318 | |||
3319 | current =iv_ruleRangeMultiplicity; | ||
3320 | match(input,EOF,FOLLOW_2); | ||
3321 | |||
3322 | } | ||
3323 | |||
3324 | } | ||
3325 | |||
3326 | catch (RecognitionException re) { | ||
3327 | recover(input,re); | ||
3328 | appendSkippedTokens(); | ||
3329 | } | ||
3330 | finally { | ||
3331 | } | ||
3332 | return current; | ||
3333 | } | ||
3334 | // $ANTLR end "entryRuleRangeMultiplicity" | ||
3335 | |||
3336 | |||
3337 | // $ANTLR start "ruleRangeMultiplicity" | ||
3338 | // InternalProblem.g:1289:1: ruleRangeMultiplicity returns [EObject current=null] : ( ( (lv_lowerBound_0_0= RULE_INT ) ) otherlv_1= '..' ( (lv_upperBound_2_0= ruleUpperBound ) ) ) ; | ||
3339 | public final EObject ruleRangeMultiplicity() throws RecognitionException { | ||
3340 | EObject current = null; | ||
3341 | |||
3342 | Token lv_lowerBound_0_0=null; | ||
3343 | Token otherlv_1=null; | ||
3344 | AntlrDatatypeRuleToken lv_upperBound_2_0 = null; | ||
3345 | |||
3346 | |||
3347 | |||
3348 | enterRule(); | ||
3349 | |||
3350 | try { | ||
3351 | // InternalProblem.g:1295:2: ( ( ( (lv_lowerBound_0_0= RULE_INT ) ) otherlv_1= '..' ( (lv_upperBound_2_0= ruleUpperBound ) ) ) ) | ||
3352 | // InternalProblem.g:1296:2: ( ( (lv_lowerBound_0_0= RULE_INT ) ) otherlv_1= '..' ( (lv_upperBound_2_0= ruleUpperBound ) ) ) | ||
3353 | { | ||
3354 | // InternalProblem.g:1296:2: ( ( (lv_lowerBound_0_0= RULE_INT ) ) otherlv_1= '..' ( (lv_upperBound_2_0= ruleUpperBound ) ) ) | ||
3355 | // InternalProblem.g:1297:3: ( (lv_lowerBound_0_0= RULE_INT ) ) otherlv_1= '..' ( (lv_upperBound_2_0= ruleUpperBound ) ) | ||
3356 | { | ||
3357 | // InternalProblem.g:1297:3: ( (lv_lowerBound_0_0= RULE_INT ) ) | ||
3358 | // InternalProblem.g:1298:4: (lv_lowerBound_0_0= RULE_INT ) | ||
3359 | { | ||
3360 | // InternalProblem.g:1298:4: (lv_lowerBound_0_0= RULE_INT ) | ||
3361 | // InternalProblem.g:1299:5: lv_lowerBound_0_0= RULE_INT | ||
3362 | { | ||
3363 | lv_lowerBound_0_0=(Token)match(input,RULE_INT,FOLLOW_29); | ||
3364 | |||
3365 | newLeafNode(lv_lowerBound_0_0, grammarAccess.getRangeMultiplicityAccess().getLowerBoundINTTerminalRuleCall_0_0()); | ||
3366 | |||
3367 | |||
3368 | if (current==null) { | ||
3369 | current = createModelElement(grammarAccess.getRangeMultiplicityRule()); | ||
3370 | } | ||
3371 | setWithLastConsumed( | ||
3372 | current, | ||
3373 | "lowerBound", | ||
3374 | lv_lowerBound_0_0, | ||
3375 | "org.eclipse.xtext.common.Terminals.INT"); | ||
3376 | |||
3377 | |||
3378 | } | ||
3379 | |||
3380 | |||
3381 | } | ||
3382 | |||
3383 | otherlv_1=(Token)match(input,33,FOLLOW_30); | ||
3384 | |||
3385 | newLeafNode(otherlv_1, grammarAccess.getRangeMultiplicityAccess().getFullStopFullStopKeyword_1()); | ||
3386 | |||
3387 | // InternalProblem.g:1319:3: ( (lv_upperBound_2_0= ruleUpperBound ) ) | ||
3388 | // InternalProblem.g:1320:4: (lv_upperBound_2_0= ruleUpperBound ) | ||
3389 | { | ||
3390 | // InternalProblem.g:1320:4: (lv_upperBound_2_0= ruleUpperBound ) | ||
3391 | // InternalProblem.g:1321:5: lv_upperBound_2_0= ruleUpperBound | ||
3392 | { | ||
3393 | |||
3394 | newCompositeNode(grammarAccess.getRangeMultiplicityAccess().getUpperBoundUpperBoundParserRuleCall_2_0()); | ||
3395 | |||
3396 | pushFollow(FOLLOW_2); | ||
3397 | lv_upperBound_2_0=ruleUpperBound(); | ||
3398 | |||
3399 | state._fsp--; | ||
3400 | |||
3401 | |||
3402 | if (current==null) { | ||
3403 | current = createModelElementForParent(grammarAccess.getRangeMultiplicityRule()); | ||
3404 | } | ||
3405 | set( | ||
3406 | current, | ||
3407 | "upperBound", | ||
3408 | lv_upperBound_2_0, | ||
3409 | "org.eclipse.viatra.solver.language.Problem.UpperBound"); | ||
3410 | afterParserOrEnumRuleCall(); | ||
3411 | |||
3412 | |||
3413 | } | ||
3414 | |||
3415 | |||
3416 | } | ||
3417 | |||
3418 | |||
3419 | } | ||
3420 | |||
3421 | |||
3422 | } | ||
3423 | |||
3424 | |||
3425 | leaveRule(); | ||
3426 | |||
3427 | } | ||
3428 | |||
3429 | catch (RecognitionException re) { | ||
3430 | recover(input,re); | ||
3431 | appendSkippedTokens(); | ||
3432 | } | ||
3433 | finally { | ||
3434 | } | ||
3435 | return current; | ||
3436 | } | ||
3437 | // $ANTLR end "ruleRangeMultiplicity" | ||
3438 | |||
3439 | |||
3440 | // $ANTLR start "entryRuleExactMultiplicity" | ||
3441 | // InternalProblem.g:1342:1: entryRuleExactMultiplicity returns [EObject current=null] : iv_ruleExactMultiplicity= ruleExactMultiplicity EOF ; | ||
3442 | public final EObject entryRuleExactMultiplicity() throws RecognitionException { | ||
3443 | EObject current = null; | ||
3444 | |||
3445 | EObject iv_ruleExactMultiplicity = null; | ||
3446 | |||
3447 | |||
3448 | try { | ||
3449 | // InternalProblem.g:1342:58: (iv_ruleExactMultiplicity= ruleExactMultiplicity EOF ) | ||
3450 | // InternalProblem.g:1343:2: iv_ruleExactMultiplicity= ruleExactMultiplicity EOF | ||
3451 | { | ||
3452 | newCompositeNode(grammarAccess.getExactMultiplicityRule()); | ||
3453 | pushFollow(FOLLOW_1); | ||
3454 | iv_ruleExactMultiplicity=ruleExactMultiplicity(); | ||
3455 | |||
3456 | state._fsp--; | ||
3457 | |||
3458 | current =iv_ruleExactMultiplicity; | ||
3459 | match(input,EOF,FOLLOW_2); | ||
3460 | |||
3461 | } | ||
3462 | |||
3463 | } | ||
3464 | |||
3465 | catch (RecognitionException re) { | ||
3466 | recover(input,re); | ||
3467 | appendSkippedTokens(); | ||
3468 | } | ||
3469 | finally { | ||
3470 | } | ||
3471 | return current; | ||
3472 | } | ||
3473 | // $ANTLR end "entryRuleExactMultiplicity" | ||
3474 | |||
3475 | |||
3476 | // $ANTLR start "ruleExactMultiplicity" | ||
3477 | // InternalProblem.g:1349:1: ruleExactMultiplicity returns [EObject current=null] : ( (lv_exactValue_0_0= RULE_INT ) ) ; | ||
3478 | public final EObject ruleExactMultiplicity() throws RecognitionException { | ||
3479 | EObject current = null; | ||
3480 | |||
3481 | Token lv_exactValue_0_0=null; | ||
3482 | |||
3483 | |||
3484 | enterRule(); | ||
3485 | |||
3486 | try { | ||
3487 | // InternalProblem.g:1355:2: ( ( (lv_exactValue_0_0= RULE_INT ) ) ) | ||
3488 | // InternalProblem.g:1356:2: ( (lv_exactValue_0_0= RULE_INT ) ) | ||
3489 | { | ||
3490 | // InternalProblem.g:1356:2: ( (lv_exactValue_0_0= RULE_INT ) ) | ||
3491 | // InternalProblem.g:1357:3: (lv_exactValue_0_0= RULE_INT ) | ||
3492 | { | ||
3493 | // InternalProblem.g:1357:3: (lv_exactValue_0_0= RULE_INT ) | ||
3494 | // InternalProblem.g:1358:4: lv_exactValue_0_0= RULE_INT | ||
3495 | { | ||
3496 | lv_exactValue_0_0=(Token)match(input,RULE_INT,FOLLOW_2); | ||
3497 | |||
3498 | newLeafNode(lv_exactValue_0_0, grammarAccess.getExactMultiplicityAccess().getExactValueINTTerminalRuleCall_0()); | ||
3499 | |||
3500 | |||
3501 | if (current==null) { | ||
3502 | current = createModelElement(grammarAccess.getExactMultiplicityRule()); | ||
3503 | } | ||
3504 | setWithLastConsumed( | ||
3505 | current, | ||
3506 | "exactValue", | ||
3507 | lv_exactValue_0_0, | ||
3508 | "org.eclipse.xtext.common.Terminals.INT"); | ||
3509 | |||
3510 | |||
3511 | } | ||
3512 | |||
3513 | |||
3514 | } | ||
3515 | |||
3516 | |||
3517 | } | ||
3518 | |||
3519 | |||
3520 | leaveRule(); | ||
3521 | |||
3522 | } | ||
3523 | |||
3524 | catch (RecognitionException re) { | ||
3525 | recover(input,re); | ||
3526 | appendSkippedTokens(); | ||
3527 | } | ||
3528 | finally { | ||
3529 | } | ||
3530 | return current; | ||
3531 | } | ||
3532 | // $ANTLR end "ruleExactMultiplicity" | ||
3533 | |||
3534 | |||
3535 | // $ANTLR start "entryRuleUpperBound" | ||
3536 | // InternalProblem.g:1377:1: entryRuleUpperBound returns [String current=null] : iv_ruleUpperBound= ruleUpperBound EOF ; | ||
3537 | public final String entryRuleUpperBound() throws RecognitionException { | ||
3538 | String current = null; | ||
3539 | |||
3540 | AntlrDatatypeRuleToken iv_ruleUpperBound = null; | ||
3541 | |||
3542 | |||
3543 | try { | ||
3544 | // InternalProblem.g:1377:50: (iv_ruleUpperBound= ruleUpperBound EOF ) | ||
3545 | // InternalProblem.g:1378:2: iv_ruleUpperBound= ruleUpperBound EOF | ||
3546 | { | ||
3547 | newCompositeNode(grammarAccess.getUpperBoundRule()); | ||
3548 | pushFollow(FOLLOW_1); | ||
3549 | iv_ruleUpperBound=ruleUpperBound(); | ||
3550 | |||
3551 | state._fsp--; | ||
3552 | |||
3553 | current =iv_ruleUpperBound.getText(); | ||
3554 | match(input,EOF,FOLLOW_2); | ||
3555 | |||
3556 | } | ||
3557 | |||
3558 | } | ||
3559 | |||
3560 | catch (RecognitionException re) { | ||
3561 | recover(input,re); | ||
3562 | appendSkippedTokens(); | ||
3563 | } | ||
3564 | finally { | ||
3565 | } | ||
3566 | return current; | ||
3567 | } | ||
3568 | // $ANTLR end "entryRuleUpperBound" | ||
3569 | |||
3570 | |||
3571 | // $ANTLR start "ruleUpperBound" | ||
3572 | // InternalProblem.g:1384:1: ruleUpperBound returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_INT_0= RULE_INT | kw= '*' ) ; | ||
3573 | public final AntlrDatatypeRuleToken ruleUpperBound() throws RecognitionException { | ||
3574 | AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); | ||
3575 | |||
3576 | Token this_INT_0=null; | ||
3577 | Token kw=null; | ||
3578 | |||
3579 | |||
3580 | enterRule(); | ||
3581 | |||
3582 | try { | ||
3583 | // InternalProblem.g:1390:2: ( (this_INT_0= RULE_INT | kw= '*' ) ) | ||
3584 | // InternalProblem.g:1391:2: (this_INT_0= RULE_INT | kw= '*' ) | ||
3585 | { | ||
3586 | // InternalProblem.g:1391:2: (this_INT_0= RULE_INT | kw= '*' ) | ||
3587 | int alt31=2; | ||
3588 | int LA31_0 = input.LA(1); | ||
3589 | |||
3590 | if ( (LA31_0==RULE_INT) ) { | ||
3591 | alt31=1; | ||
3592 | } | ||
3593 | else if ( (LA31_0==34) ) { | ||
3594 | alt31=2; | ||
3595 | } | ||
3596 | else { | ||
3597 | NoViableAltException nvae = | ||
3598 | new NoViableAltException("", 31, 0, input); | ||
3599 | |||
3600 | throw nvae; | ||
3601 | } | ||
3602 | switch (alt31) { | ||
3603 | case 1 : | ||
3604 | // InternalProblem.g:1392:3: this_INT_0= RULE_INT | ||
3605 | { | ||
3606 | this_INT_0=(Token)match(input,RULE_INT,FOLLOW_2); | ||
3607 | |||
3608 | current.merge(this_INT_0); | ||
3609 | |||
3610 | |||
3611 | newLeafNode(this_INT_0, grammarAccess.getUpperBoundAccess().getINTTerminalRuleCall_0()); | ||
3612 | |||
3613 | |||
3614 | } | ||
3615 | break; | ||
3616 | case 2 : | ||
3617 | // InternalProblem.g:1400:3: kw= '*' | ||
3618 | { | ||
3619 | kw=(Token)match(input,34,FOLLOW_2); | ||
3620 | |||
3621 | current.merge(kw); | ||
3622 | newLeafNode(kw, grammarAccess.getUpperBoundAccess().getAsteriskKeyword_1()); | ||
3623 | |||
3624 | |||
3625 | } | ||
3626 | break; | ||
3627 | |||
3628 | } | ||
3629 | |||
3630 | |||
3631 | } | ||
3632 | |||
3633 | |||
3634 | leaveRule(); | ||
3635 | |||
3636 | } | ||
3637 | |||
3638 | catch (RecognitionException re) { | ||
3639 | recover(input,re); | ||
3640 | appendSkippedTokens(); | ||
3641 | } | ||
3642 | finally { | ||
3643 | } | ||
3644 | return current; | ||
3645 | } | ||
3646 | // $ANTLR end "ruleUpperBound" | ||
3647 | |||
3648 | |||
3649 | // $ANTLR start "entryRuleQualifiedName" | ||
3650 | // InternalProblem.g:1409:1: entryRuleQualifiedName returns [String current=null] : iv_ruleQualifiedName= ruleQualifiedName EOF ; | ||
3651 | public final String entryRuleQualifiedName() throws RecognitionException { | ||
3652 | String current = null; | ||
3653 | |||
3654 | AntlrDatatypeRuleToken iv_ruleQualifiedName = null; | ||
3655 | |||
3656 | |||
3657 | try { | ||
3658 | // InternalProblem.g:1409:53: (iv_ruleQualifiedName= ruleQualifiedName EOF ) | ||
3659 | // InternalProblem.g:1410:2: iv_ruleQualifiedName= ruleQualifiedName EOF | ||
3660 | { | ||
3661 | newCompositeNode(grammarAccess.getQualifiedNameRule()); | ||
3662 | pushFollow(FOLLOW_1); | ||
3663 | iv_ruleQualifiedName=ruleQualifiedName(); | ||
3664 | |||
3665 | state._fsp--; | ||
3666 | |||
3667 | current =iv_ruleQualifiedName.getText(); | ||
3668 | match(input,EOF,FOLLOW_2); | ||
3669 | |||
3670 | } | ||
3671 | |||
3672 | } | ||
3673 | |||
3674 | catch (RecognitionException re) { | ||
3675 | recover(input,re); | ||
3676 | appendSkippedTokens(); | ||
3677 | } | ||
3678 | finally { | ||
3679 | } | ||
3680 | return current; | ||
3681 | } | ||
3682 | // $ANTLR end "entryRuleQualifiedName" | ||
3683 | |||
3684 | |||
3685 | // $ANTLR start "ruleQualifiedName" | ||
3686 | // InternalProblem.g:1416:1: ruleQualifiedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ID_0= RULE_ID (kw= '::' this_ID_2= RULE_ID )* ) ; | ||
3687 | public final AntlrDatatypeRuleToken ruleQualifiedName() throws RecognitionException { | ||
3688 | AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); | ||
3689 | |||
3690 | Token this_ID_0=null; | ||
3691 | Token kw=null; | ||
3692 | Token this_ID_2=null; | ||
3693 | |||
3694 | |||
3695 | enterRule(); | ||
3696 | |||
3697 | try { | ||
3698 | // InternalProblem.g:1422:2: ( (this_ID_0= RULE_ID (kw= '::' this_ID_2= RULE_ID )* ) ) | ||
3699 | // InternalProblem.g:1423:2: (this_ID_0= RULE_ID (kw= '::' this_ID_2= RULE_ID )* ) | ||
3700 | { | ||
3701 | // InternalProblem.g:1423:2: (this_ID_0= RULE_ID (kw= '::' this_ID_2= RULE_ID )* ) | ||
3702 | // InternalProblem.g:1424:3: this_ID_0= RULE_ID (kw= '::' this_ID_2= RULE_ID )* | ||
3703 | { | ||
3704 | this_ID_0=(Token)match(input,RULE_ID,FOLLOW_31); | ||
3705 | |||
3706 | current.merge(this_ID_0); | ||
3707 | |||
3708 | |||
3709 | newLeafNode(this_ID_0, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_0()); | ||
3710 | |||
3711 | // InternalProblem.g:1431:3: (kw= '::' this_ID_2= RULE_ID )* | ||
3712 | loop32: | ||
3713 | do { | ||
3714 | int alt32=2; | ||
3715 | int LA32_0 = input.LA(1); | ||
3716 | |||
3717 | if ( (LA32_0==35) ) { | ||
3718 | alt32=1; | ||
3719 | } | ||
3720 | |||
3721 | |||
3722 | switch (alt32) { | ||
3723 | case 1 : | ||
3724 | // InternalProblem.g:1432:4: kw= '::' this_ID_2= RULE_ID | ||
3725 | { | ||
3726 | kw=(Token)match(input,35,FOLLOW_5); | ||
3727 | |||
3728 | current.merge(kw); | ||
3729 | newLeafNode(kw, grammarAccess.getQualifiedNameAccess().getColonColonKeyword_1_0()); | ||
3730 | |||
3731 | this_ID_2=(Token)match(input,RULE_ID,FOLLOW_31); | ||
3732 | |||
3733 | current.merge(this_ID_2); | ||
3734 | |||
3735 | |||
3736 | newLeafNode(this_ID_2, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_1_1()); | ||
3737 | |||
3738 | |||
3739 | } | ||
3740 | break; | ||
3741 | |||
3742 | default : | ||
3743 | break loop32; | ||
3744 | } | ||
3745 | } while (true); | ||
3746 | |||
3747 | |||
3748 | } | ||
3749 | |||
3750 | |||
3751 | } | ||
3752 | |||
3753 | |||
3754 | leaveRule(); | ||
3755 | |||
3756 | } | ||
3757 | |||
3758 | catch (RecognitionException re) { | ||
3759 | recover(input,re); | ||
3760 | appendSkippedTokens(); | ||
3761 | } | ||
3762 | finally { | ||
3763 | } | ||
3764 | return current; | ||
3765 | } | ||
3766 | // $ANTLR end "ruleQualifiedName" | ||
3767 | |||
3768 | |||
3769 | // $ANTLR start "ruleLogicValue" | ||
3770 | // InternalProblem.g:1449:1: ruleLogicValue returns [Enumerator current=null] : ( (enumLiteral_0= 'true' ) | (enumLiteral_1= 'false' ) | (enumLiteral_2= 'unknown' ) ) ; | ||
3771 | public final Enumerator ruleLogicValue() throws RecognitionException { | ||
3772 | Enumerator current = null; | ||
3773 | |||
3774 | Token enumLiteral_0=null; | ||
3775 | Token enumLiteral_1=null; | ||
3776 | Token enumLiteral_2=null; | ||
3777 | |||
3778 | |||
3779 | enterRule(); | ||
3780 | |||
3781 | try { | ||
3782 | // InternalProblem.g:1455:2: ( ( (enumLiteral_0= 'true' ) | (enumLiteral_1= 'false' ) | (enumLiteral_2= 'unknown' ) ) ) | ||
3783 | // InternalProblem.g:1456:2: ( (enumLiteral_0= 'true' ) | (enumLiteral_1= 'false' ) | (enumLiteral_2= 'unknown' ) ) | ||
3784 | { | ||
3785 | // InternalProblem.g:1456:2: ( (enumLiteral_0= 'true' ) | (enumLiteral_1= 'false' ) | (enumLiteral_2= 'unknown' ) ) | ||
3786 | int alt33=3; | ||
3787 | switch ( input.LA(1) ) { | ||
3788 | case 36: | ||
3789 | { | ||
3790 | alt33=1; | ||
3791 | } | ||
3792 | break; | ||
3793 | case 37: | ||
3794 | { | ||
3795 | alt33=2; | ||
3796 | } | ||
3797 | break; | ||
3798 | case 38: | ||
3799 | { | ||
3800 | alt33=3; | ||
3801 | } | ||
3802 | break; | ||
3803 | default: | ||
3804 | NoViableAltException nvae = | ||
3805 | new NoViableAltException("", 33, 0, input); | ||
3806 | |||
3807 | throw nvae; | ||
3808 | } | ||
3809 | |||
3810 | switch (alt33) { | ||
3811 | case 1 : | ||
3812 | // InternalProblem.g:1457:3: (enumLiteral_0= 'true' ) | ||
3813 | { | ||
3814 | // InternalProblem.g:1457:3: (enumLiteral_0= 'true' ) | ||
3815 | // InternalProblem.g:1458:4: enumLiteral_0= 'true' | ||
3816 | { | ||
3817 | enumLiteral_0=(Token)match(input,36,FOLLOW_2); | ||
3818 | |||
3819 | current = grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); | ||
3820 | newLeafNode(enumLiteral_0, grammarAccess.getLogicValueAccess().getTRUEEnumLiteralDeclaration_0()); | ||
3821 | |||
3822 | |||
3823 | } | ||
3824 | |||
3825 | |||
3826 | } | ||
3827 | break; | ||
3828 | case 2 : | ||
3829 | // InternalProblem.g:1465:3: (enumLiteral_1= 'false' ) | ||
3830 | { | ||
3831 | // InternalProblem.g:1465:3: (enumLiteral_1= 'false' ) | ||
3832 | // InternalProblem.g:1466:4: enumLiteral_1= 'false' | ||
3833 | { | ||
3834 | enumLiteral_1=(Token)match(input,37,FOLLOW_2); | ||
3835 | |||
3836 | current = grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); | ||
3837 | newLeafNode(enumLiteral_1, grammarAccess.getLogicValueAccess().getFALSEEnumLiteralDeclaration_1()); | ||
3838 | |||
3839 | |||
3840 | } | ||
3841 | |||
3842 | |||
3843 | } | ||
3844 | break; | ||
3845 | case 3 : | ||
3846 | // InternalProblem.g:1473:3: (enumLiteral_2= 'unknown' ) | ||
3847 | { | ||
3848 | // InternalProblem.g:1473:3: (enumLiteral_2= 'unknown' ) | ||
3849 | // InternalProblem.g:1474:4: enumLiteral_2= 'unknown' | ||
3850 | { | ||
3851 | enumLiteral_2=(Token)match(input,38,FOLLOW_2); | ||
3852 | |||
3853 | current = grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2().getEnumLiteral().getInstance(); | ||
3854 | newLeafNode(enumLiteral_2, grammarAccess.getLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_2()); | ||
3855 | |||
3856 | |||
3857 | } | ||
3858 | |||
3859 | |||
3860 | } | ||
3861 | break; | ||
3862 | |||
3863 | } | ||
3864 | |||
3865 | |||
3866 | } | ||
3867 | |||
3868 | |||
3869 | leaveRule(); | ||
3870 | |||
3871 | } | ||
3872 | |||
3873 | catch (RecognitionException re) { | ||
3874 | recover(input,re); | ||
3875 | appendSkippedTokens(); | ||
3876 | } | ||
3877 | finally { | ||
3878 | } | ||
3879 | return current; | ||
3880 | } | ||
3881 | // $ANTLR end "ruleLogicValue" | ||
3882 | |||
3883 | |||
3884 | // $ANTLR start "ruleShortLogicValue" | ||
3885 | // InternalProblem.g:1484:1: ruleShortLogicValue returns [Enumerator current=null] : ( (enumLiteral_0= '!' ) | (enumLiteral_1= '?' ) ) ; | ||
3886 | public final Enumerator ruleShortLogicValue() throws RecognitionException { | ||
3887 | Enumerator current = null; | ||
3888 | |||
3889 | Token enumLiteral_0=null; | ||
3890 | Token enumLiteral_1=null; | ||
3891 | |||
3892 | |||
3893 | enterRule(); | ||
3894 | |||
3895 | try { | ||
3896 | // InternalProblem.g:1490:2: ( ( (enumLiteral_0= '!' ) | (enumLiteral_1= '?' ) ) ) | ||
3897 | // InternalProblem.g:1491:2: ( (enumLiteral_0= '!' ) | (enumLiteral_1= '?' ) ) | ||
3898 | { | ||
3899 | // InternalProblem.g:1491:2: ( (enumLiteral_0= '!' ) | (enumLiteral_1= '?' ) ) | ||
3900 | int alt34=2; | ||
3901 | int LA34_0 = input.LA(1); | ||
3902 | |||
3903 | if ( (LA34_0==27) ) { | ||
3904 | alt34=1; | ||
3905 | } | ||
3906 | else if ( (LA34_0==39) ) { | ||
3907 | alt34=2; | ||
3908 | } | ||
3909 | else { | ||
3910 | NoViableAltException nvae = | ||
3911 | new NoViableAltException("", 34, 0, input); | ||
3912 | |||
3913 | throw nvae; | ||
3914 | } | ||
3915 | switch (alt34) { | ||
3916 | case 1 : | ||
3917 | // InternalProblem.g:1492:3: (enumLiteral_0= '!' ) | ||
3918 | { | ||
3919 | // InternalProblem.g:1492:3: (enumLiteral_0= '!' ) | ||
3920 | // InternalProblem.g:1493:4: enumLiteral_0= '!' | ||
3921 | { | ||
3922 | enumLiteral_0=(Token)match(input,27,FOLLOW_2); | ||
3923 | |||
3924 | current = grammarAccess.getShortLogicValueAccess().getFALSEEnumLiteralDeclaration_0().getEnumLiteral().getInstance(); | ||
3925 | newLeafNode(enumLiteral_0, grammarAccess.getShortLogicValueAccess().getFALSEEnumLiteralDeclaration_0()); | ||
3926 | |||
3927 | |||
3928 | } | ||
3929 | |||
3930 | |||
3931 | } | ||
3932 | break; | ||
3933 | case 2 : | ||
3934 | // InternalProblem.g:1500:3: (enumLiteral_1= '?' ) | ||
3935 | { | ||
3936 | // InternalProblem.g:1500:3: (enumLiteral_1= '?' ) | ||
3937 | // InternalProblem.g:1501:4: enumLiteral_1= '?' | ||
3938 | { | ||
3939 | enumLiteral_1=(Token)match(input,39,FOLLOW_2); | ||
3940 | |||
3941 | current = grammarAccess.getShortLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_1().getEnumLiteral().getInstance(); | ||
3942 | newLeafNode(enumLiteral_1, grammarAccess.getShortLogicValueAccess().getUNKNOWNEnumLiteralDeclaration_1()); | ||
3943 | |||
3944 | |||
3945 | } | ||
3946 | |||
3947 | |||
3948 | } | ||
3949 | break; | ||
3950 | |||
3951 | } | ||
3952 | |||
3953 | |||
3954 | } | ||
3955 | |||
3956 | |||
3957 | leaveRule(); | ||
3958 | |||
3959 | } | ||
3960 | |||
3961 | catch (RecognitionException re) { | ||
3962 | recover(input,re); | ||
3963 | appendSkippedTokens(); | ||
3964 | } | ||
3965 | finally { | ||
3966 | } | ||
3967 | return current; | ||
3968 | } | ||
3969 | // $ANTLR end "ruleShortLogicValue" | ||
3970 | |||
3971 | // Delegated rules | ||
3972 | |||
3973 | |||
3974 | protected DFA27 dfa27 = new DFA27(this); | ||
3975 | static final String dfa_1s = "\17\uffff"; | ||
3976 | static final String dfa_2s = "\1\4\1\27\1\uffff\2\4\1\27\1\17\1\21\2\4\1\uffff\2\17\1\4\1\17"; | ||
3977 | static final String dfa_3s = "\1\47\1\43\1\uffff\1\4\1\30\2\43\1\35\2\4\1\uffff\2\43\1\4\1\43"; | ||
3978 | static final String dfa_4s = "\2\uffff\1\2\7\uffff\1\1\4\uffff"; | ||
3979 | static final String dfa_5s = "\17\uffff}>"; | ||
3980 | static final String[] dfa_6s = { | ||
3981 | "\1\1\26\uffff\1\2\13\uffff\1\2", | ||
3982 | "\1\4\13\uffff\1\3", | ||
3983 | "", | ||
3984 | "\1\5", | ||
3985 | "\1\6\23\uffff\1\7", | ||
3986 | "\1\4\13\uffff\1\3", | ||
3987 | "\1\11\10\uffff\1\7\12\uffff\1\10", | ||
3988 | "\1\2\13\uffff\1\12", | ||
3989 | "\1\13", | ||
3990 | "\1\14", | ||
3991 | "", | ||
3992 | "\1\11\10\uffff\1\7\12\uffff\1\10", | ||
3993 | "\1\11\10\uffff\1\7\12\uffff\1\15", | ||
3994 | "\1\16", | ||
3995 | "\1\11\10\uffff\1\7\12\uffff\1\15" | ||
3996 | }; | ||
3997 | |||
3998 | static final short[] dfa_1 = DFA.unpackEncodedString(dfa_1s); | ||
3999 | static final char[] dfa_2 = DFA.unpackEncodedStringToUnsignedChars(dfa_2s); | ||
4000 | static final char[] dfa_3 = DFA.unpackEncodedStringToUnsignedChars(dfa_3s); | ||
4001 | static final short[] dfa_4 = DFA.unpackEncodedString(dfa_4s); | ||
4002 | static final short[] dfa_5 = DFA.unpackEncodedString(dfa_5s); | ||
4003 | static final short[][] dfa_6 = unpackEncodedStringArray(dfa_6s); | ||
4004 | |||
4005 | class DFA27 extends DFA { | ||
4006 | |||
4007 | public DFA27(BaseRecognizer recognizer) { | ||
4008 | this.recognizer = recognizer; | ||
4009 | this.decisionNumber = 27; | ||
4010 | this.eot = dfa_1; | ||
4011 | this.eof = dfa_1; | ||
4012 | this.min = dfa_2; | ||
4013 | this.max = dfa_3; | ||
4014 | this.accept = dfa_4; | ||
4015 | this.special = dfa_5; | ||
4016 | this.transition = dfa_6; | ||
4017 | } | ||
4018 | public String getDescription() { | ||
4019 | return "918:3: ( ( ( ( ruleQualifiedName ) ) otherlv_1= '(' ( ( ( ruleQualifiedName ) ) (otherlv_3= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_5= ')' otherlv_6= ':' ( (lv_value_7_0= ruleLogicValue ) ) ) | ( ( (lv_value_8_0= ruleShortLogicValue ) )? ( ( ruleQualifiedName ) ) otherlv_10= '(' ( ( ( ruleQualifiedName ) ) (otherlv_12= ',' ( ( ruleQualifiedName ) ) )* )? otherlv_14= ')' ) )"; | ||
4020 | } | ||
4021 | } | ||
4022 | |||
4023 | |||
4024 | public static final BitSet FOLLOW_1 = new BitSet(new long[]{0x0000000000000000L}); | ||
4025 | public static final BitSet FOLLOW_2 = new BitSet(new long[]{0x0000000000000002L}); | ||
4026 | public static final BitSet FOLLOW_3 = new BitSet(new long[]{0x0000008048601812L}); | ||
4027 | public static final BitSet FOLLOW_4 = new BitSet(new long[]{0x0000000000001000L}); | ||
4028 | public static final BitSet FOLLOW_5 = new BitSet(new long[]{0x0000000000000010L}); | ||
4029 | public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x00000000000EA000L}); | ||
4030 | public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000000004010L}); | ||
4031 | public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x0000000000028000L}); | ||
4032 | public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x0000000000010010L}); | ||
4033 | public static final BitSet FOLLOW_10 = new BitSet(new long[]{0x0000000000018000L}); | ||
4034 | public static final BitSet FOLLOW_11 = new BitSet(new long[]{0x00000000000C0000L}); | ||
4035 | public static final BitSet FOLLOW_12 = new BitSet(new long[]{0x0000000000004000L}); | ||
4036 | public static final BitSet FOLLOW_13 = new BitSet(new long[]{0x0000000000000020L}); | ||
4037 | public static final BitSet FOLLOW_14 = new BitSet(new long[]{0x0000000000010000L}); | ||
4038 | public static final BitSet FOLLOW_15 = new BitSet(new long[]{0x0000000000100002L}); | ||
4039 | public static final BitSet FOLLOW_16 = new BitSet(new long[]{0x0000000000400010L}); | ||
4040 | public static final BitSet FOLLOW_17 = new BitSet(new long[]{0x0000000000800000L}); | ||
4041 | public static final BitSet FOLLOW_18 = new BitSet(new long[]{0x0000000001000010L}); | ||
4042 | public static final BitSet FOLLOW_19 = new BitSet(new long[]{0x0000000001008000L}); | ||
4043 | public static final BitSet FOLLOW_20 = new BitSet(new long[]{0x0000000002020000L}); | ||
4044 | public static final BitSet FOLLOW_21 = new BitSet(new long[]{0x0000000008000010L}); | ||
4045 | public static final BitSet FOLLOW_22 = new BitSet(new long[]{0x0000000004020000L}); | ||
4046 | public static final BitSet FOLLOW_23 = new BitSet(new long[]{0x0000000000008002L}); | ||
4047 | public static final BitSet FOLLOW_24 = new BitSet(new long[]{0x0000000010800000L}); | ||
4048 | public static final BitSet FOLLOW_25 = new BitSet(new long[]{0x0000000020000000L}); | ||
4049 | public static final BitSet FOLLOW_26 = new BitSet(new long[]{0x0000007000000000L}); | ||
4050 | public static final BitSet FOLLOW_27 = new BitSet(new long[]{0x0000000000020000L}); | ||
4051 | public static final BitSet FOLLOW_28 = new BitSet(new long[]{0x0000000180000000L}); | ||
4052 | public static final BitSet FOLLOW_29 = new BitSet(new long[]{0x0000000200000000L}); | ||
4053 | public static final BitSet FOLLOW_30 = new BitSet(new long[]{0x0000000400000020L}); | ||
4054 | public static final BitSet FOLLOW_31 = new BitSet(new long[]{0x0000000800000002L}); | ||
4055 | |||
4056 | } \ No newline at end of file | ||