diff options
Diffstat (limited to 'Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.g')
-rw-r--r-- | Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.g | 1332 |
1 files changed, 1332 insertions, 0 deletions
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.g b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.g new file mode 100644 index 00000000..ff509b0a --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.g | |||
@@ -0,0 +1,1332 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.16.0 | ||
3 | */ | ||
4 | grammar InternalCftLanguage; | ||
5 | |||
6 | options { | ||
7 | superClass=AbstractInternalAntlrParser; | ||
8 | } | ||
9 | |||
10 | @lexer::header { | ||
11 | package hu.bme.mit.inf.dslreasoner.faulttree.components.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 hu.bme.mit.inf.dslreasoner.faulttree.components.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.xtext.parser.antlr.AbstractInternalAntlrParser; | ||
27 | import org.eclipse.xtext.parser.antlr.XtextTokenStream; | ||
28 | import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens; | ||
29 | import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken; | ||
30 | import hu.bme.mit.inf.dslreasoner.faulttree.components.services.CftLanguageGrammarAccess; | ||
31 | |||
32 | } | ||
33 | |||
34 | @parser::members { | ||
35 | |||
36 | private CftLanguageGrammarAccess grammarAccess; | ||
37 | |||
38 | public InternalCftLanguageParser(TokenStream input, CftLanguageGrammarAccess grammarAccess) { | ||
39 | this(input); | ||
40 | this.grammarAccess = grammarAccess; | ||
41 | registerRules(grammarAccess.getGrammar()); | ||
42 | } | ||
43 | |||
44 | @Override | ||
45 | protected String getFirstRuleName() { | ||
46 | return "CftModel"; | ||
47 | } | ||
48 | |||
49 | @Override | ||
50 | protected CftLanguageGrammarAccess getGrammarAccess() { | ||
51 | return grammarAccess; | ||
52 | } | ||
53 | |||
54 | } | ||
55 | |||
56 | @rulecatch { | ||
57 | catch (RecognitionException re) { | ||
58 | recover(input,re); | ||
59 | appendSkippedTokens(); | ||
60 | } | ||
61 | } | ||
62 | |||
63 | // Entry rule entryRuleCftModel | ||
64 | entryRuleCftModel returns [EObject current=null]: | ||
65 | { newCompositeNode(grammarAccess.getCftModelRule()); } | ||
66 | iv_ruleCftModel=ruleCftModel | ||
67 | { $current=$iv_ruleCftModel.current; } | ||
68 | EOF; | ||
69 | |||
70 | // Rule CftModel | ||
71 | ruleCftModel returns [EObject current=null] | ||
72 | @init { | ||
73 | enterRule(); | ||
74 | } | ||
75 | @after { | ||
76 | leaveRule(); | ||
77 | }: | ||
78 | ( | ||
79 | otherlv_0='package' | ||
80 | { | ||
81 | newLeafNode(otherlv_0, grammarAccess.getCftModelAccess().getPackageKeyword_0()); | ||
82 | } | ||
83 | ( | ||
84 | ( | ||
85 | { | ||
86 | newCompositeNode(grammarAccess.getCftModelAccess().getPackageNameQualifiedNameParserRuleCall_1_0()); | ||
87 | } | ||
88 | lv_packageName_1_0=ruleQualifiedName | ||
89 | { | ||
90 | if ($current==null) { | ||
91 | $current = createModelElementForParent(grammarAccess.getCftModelRule()); | ||
92 | } | ||
93 | set( | ||
94 | $current, | ||
95 | "packageName", | ||
96 | lv_packageName_1_0, | ||
97 | "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.QualifiedName"); | ||
98 | afterParserOrEnumRuleCall(); | ||
99 | } | ||
100 | ) | ||
101 | ) | ||
102 | ( | ||
103 | otherlv_2=';' | ||
104 | { | ||
105 | newLeafNode(otherlv_2, grammarAccess.getCftModelAccess().getSemicolonKeyword_2()); | ||
106 | } | ||
107 | )? | ||
108 | ( | ||
109 | ( | ||
110 | { | ||
111 | newCompositeNode(grammarAccess.getCftModelAccess().getImportsImportDeclarationParserRuleCall_3_0()); | ||
112 | } | ||
113 | lv_imports_3_0=ruleImportDeclaration | ||
114 | { | ||
115 | if ($current==null) { | ||
116 | $current = createModelElementForParent(grammarAccess.getCftModelRule()); | ||
117 | } | ||
118 | add( | ||
119 | $current, | ||
120 | "imports", | ||
121 | lv_imports_3_0, | ||
122 | "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.ImportDeclaration"); | ||
123 | afterParserOrEnumRuleCall(); | ||
124 | } | ||
125 | ) | ||
126 | )* | ||
127 | ( | ||
128 | ( | ||
129 | ( | ||
130 | { | ||
131 | newCompositeNode(grammarAccess.getCftModelAccess().getComponentDefinitionsComponentDefinitionParserRuleCall_4_0_0()); | ||
132 | } | ||
133 | lv_componentDefinitions_4_0=ruleComponentDefinition | ||
134 | { | ||
135 | if ($current==null) { | ||
136 | $current = createModelElementForParent(grammarAccess.getCftModelRule()); | ||
137 | } | ||
138 | add( | ||
139 | $current, | ||
140 | "componentDefinitions", | ||
141 | lv_componentDefinitions_4_0, | ||
142 | "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.ComponentDefinition"); | ||
143 | afterParserOrEnumRuleCall(); | ||
144 | } | ||
145 | ) | ||
146 | ) | ||
147 | | | ||
148 | ( | ||
149 | ( | ||
150 | { | ||
151 | newCompositeNode(grammarAccess.getCftModelAccess().getTransformationDefinitionsTransformationDefinitionParserRuleCall_4_1_0()); | ||
152 | } | ||
153 | lv_transformationDefinitions_5_0=ruleTransformationDefinition | ||
154 | { | ||
155 | if ($current==null) { | ||
156 | $current = createModelElementForParent(grammarAccess.getCftModelRule()); | ||
157 | } | ||
158 | add( | ||
159 | $current, | ||
160 | "transformationDefinitions", | ||
161 | lv_transformationDefinitions_5_0, | ||
162 | "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.TransformationDefinition"); | ||
163 | afterParserOrEnumRuleCall(); | ||
164 | } | ||
165 | ) | ||
166 | ) | ||
167 | )* | ||
168 | ) | ||
169 | ; | ||
170 | |||
171 | // Entry rule entryRuleImportDeclaration | ||
172 | entryRuleImportDeclaration returns [EObject current=null]: | ||
173 | { newCompositeNode(grammarAccess.getImportDeclarationRule()); } | ||
174 | iv_ruleImportDeclaration=ruleImportDeclaration | ||
175 | { $current=$iv_ruleImportDeclaration.current; } | ||
176 | EOF; | ||
177 | |||
178 | // Rule ImportDeclaration | ||
179 | ruleImportDeclaration returns [EObject current=null] | ||
180 | @init { | ||
181 | enterRule(); | ||
182 | } | ||
183 | @after { | ||
184 | leaveRule(); | ||
185 | }: | ||
186 | ( | ||
187 | otherlv_0='import' | ||
188 | { | ||
189 | newLeafNode(otherlv_0, grammarAccess.getImportDeclarationAccess().getImportKeyword_0()); | ||
190 | } | ||
191 | ( | ||
192 | ( | ||
193 | { | ||
194 | newCompositeNode(grammarAccess.getImportDeclarationAccess().getImportedNamespaceQualifiedNameWithWildcardParserRuleCall_1_0()); | ||
195 | } | ||
196 | lv_importedNamespace_1_0=ruleQualifiedNameWithWildcard | ||
197 | { | ||
198 | if ($current==null) { | ||
199 | $current = createModelElementForParent(grammarAccess.getImportDeclarationRule()); | ||
200 | } | ||
201 | set( | ||
202 | $current, | ||
203 | "importedNamespace", | ||
204 | lv_importedNamespace_1_0, | ||
205 | "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.QualifiedNameWithWildcard"); | ||
206 | afterParserOrEnumRuleCall(); | ||
207 | } | ||
208 | ) | ||
209 | ) | ||
210 | ( | ||
211 | otherlv_2=';' | ||
212 | { | ||
213 | newLeafNode(otherlv_2, grammarAccess.getImportDeclarationAccess().getSemicolonKeyword_2()); | ||
214 | } | ||
215 | )? | ||
216 | ) | ||
217 | ; | ||
218 | |||
219 | // Entry rule entryRuleComponentDefinition | ||
220 | entryRuleComponentDefinition returns [EObject current=null]: | ||
221 | { newCompositeNode(grammarAccess.getComponentDefinitionRule()); } | ||
222 | iv_ruleComponentDefinition=ruleComponentDefinition | ||
223 | { $current=$iv_ruleComponentDefinition.current; } | ||
224 | EOF; | ||
225 | |||
226 | // Rule ComponentDefinition | ||
227 | ruleComponentDefinition returns [EObject current=null] | ||
228 | @init { | ||
229 | enterRule(); | ||
230 | } | ||
231 | @after { | ||
232 | leaveRule(); | ||
233 | }: | ||
234 | ( | ||
235 | otherlv_0='cft' | ||
236 | { | ||
237 | newLeafNode(otherlv_0, grammarAccess.getComponentDefinitionAccess().getCftKeyword_0()); | ||
238 | } | ||
239 | ( | ||
240 | ( | ||
241 | lv_name_1_0=RULE_ID | ||
242 | { | ||
243 | newLeafNode(lv_name_1_0, grammarAccess.getComponentDefinitionAccess().getNameIDTerminalRuleCall_1_0()); | ||
244 | } | ||
245 | { | ||
246 | if ($current==null) { | ||
247 | $current = createModelElement(grammarAccess.getComponentDefinitionRule()); | ||
248 | } | ||
249 | setWithLastConsumed( | ||
250 | $current, | ||
251 | "name", | ||
252 | lv_name_1_0, | ||
253 | "org.eclipse.xtext.common.Terminals.ID"); | ||
254 | } | ||
255 | ) | ||
256 | ) | ||
257 | otherlv_2='{' | ||
258 | { | ||
259 | newLeafNode(otherlv_2, grammarAccess.getComponentDefinitionAccess().getLeftCurlyBracketKeyword_2()); | ||
260 | } | ||
261 | ( | ||
262 | ( | ||
263 | { | ||
264 | getUnorderedGroupHelper().enter(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3()); | ||
265 | } | ||
266 | ( | ||
267 | ( | ||
268 | ( | ||
269 | {getUnorderedGroupHelper().canSelect(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3(), 0)}?=>( | ||
270 | { | ||
271 | getUnorderedGroupHelper().select(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3(), 0); | ||
272 | } | ||
273 | ({true}?=>(otherlv_4='in' | ||
274 | { | ||
275 | newLeafNode(otherlv_4, grammarAccess.getComponentDefinitionAccess().getInKeyword_3_0_0()); | ||
276 | } | ||
277 | ( | ||
278 | ( | ||
279 | { | ||
280 | newCompositeNode(grammarAccess.getComponentDefinitionAccess().getInputEventsInputEventParserRuleCall_3_0_1_0()); | ||
281 | } | ||
282 | lv_inputEvents_5_0=ruleInputEvent | ||
283 | { | ||
284 | if ($current==null) { | ||
285 | $current = createModelElementForParent(grammarAccess.getComponentDefinitionRule()); | ||
286 | } | ||
287 | add( | ||
288 | $current, | ||
289 | "inputEvents", | ||
290 | lv_inputEvents_5_0, | ||
291 | "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.InputEvent"); | ||
292 | afterParserOrEnumRuleCall(); | ||
293 | } | ||
294 | ) | ||
295 | )* | ||
296 | otherlv_6=';' | ||
297 | { | ||
298 | newLeafNode(otherlv_6, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_0_2()); | ||
299 | } | ||
300 | )) | ||
301 | { | ||
302 | getUnorderedGroupHelper().returnFromSelection(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3()); | ||
303 | } | ||
304 | ) | ||
305 | )| | ||
306 | ( | ||
307 | {getUnorderedGroupHelper().canSelect(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3(), 1)}?=>( | ||
308 | { | ||
309 | getUnorderedGroupHelper().select(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3(), 1); | ||
310 | } | ||
311 | ({true}?=>(otherlv_7='out' | ||
312 | { | ||
313 | newLeafNode(otherlv_7, grammarAccess.getComponentDefinitionAccess().getOutKeyword_3_1_0()); | ||
314 | } | ||
315 | ( | ||
316 | ( | ||
317 | { | ||
318 | if ($current==null) { | ||
319 | $current = createModelElement(grammarAccess.getComponentDefinitionRule()); | ||
320 | } | ||
321 | } | ||
322 | otherlv_8=RULE_ID | ||
323 | { | ||
324 | newLeafNode(otherlv_8, grammarAccess.getComponentDefinitionAccess().getOutputEventsEventDeclarationCrossReference_3_1_1_0()); | ||
325 | } | ||
326 | ) | ||
327 | )* | ||
328 | otherlv_9=';' | ||
329 | { | ||
330 | newLeafNode(otherlv_9, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_3_1_2()); | ||
331 | } | ||
332 | )) | ||
333 | { | ||
334 | getUnorderedGroupHelper().returnFromSelection(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3()); | ||
335 | } | ||
336 | ) | ||
337 | ) | ||
338 | )* | ||
339 | ) | ||
340 | ) | ||
341 | { | ||
342 | getUnorderedGroupHelper().leave(grammarAccess.getComponentDefinitionAccess().getUnorderedGroup_3()); | ||
343 | } | ||
344 | ) | ||
345 | ( | ||
346 | ( | ||
347 | ( | ||
348 | { | ||
349 | newCompositeNode(grammarAccess.getComponentDefinitionAccess().getEventDefinitionsEventDefinitionParserRuleCall_4_0_0()); | ||
350 | } | ||
351 | lv_eventDefinitions_10_0=ruleEventDefinition | ||
352 | { | ||
353 | if ($current==null) { | ||
354 | $current = createModelElementForParent(grammarAccess.getComponentDefinitionRule()); | ||
355 | } | ||
356 | add( | ||
357 | $current, | ||
358 | "eventDefinitions", | ||
359 | lv_eventDefinitions_10_0, | ||
360 | "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.EventDefinition"); | ||
361 | afterParserOrEnumRuleCall(); | ||
362 | } | ||
363 | ) | ||
364 | ) | ||
365 | otherlv_11=';' | ||
366 | { | ||
367 | newLeafNode(otherlv_11, grammarAccess.getComponentDefinitionAccess().getSemicolonKeyword_4_1()); | ||
368 | } | ||
369 | )* | ||
370 | otherlv_12='}' | ||
371 | { | ||
372 | newLeafNode(otherlv_12, grammarAccess.getComponentDefinitionAccess().getRightCurlyBracketKeyword_5()); | ||
373 | } | ||
374 | ) | ||
375 | ; | ||
376 | |||
377 | // Entry rule entryRuleInputEvent | ||
378 | entryRuleInputEvent returns [EObject current=null]: | ||
379 | { newCompositeNode(grammarAccess.getInputEventRule()); } | ||
380 | iv_ruleInputEvent=ruleInputEvent | ||
381 | { $current=$iv_ruleInputEvent.current; } | ||
382 | EOF; | ||
383 | |||
384 | // Rule InputEvent | ||
385 | ruleInputEvent returns [EObject current=null] | ||
386 | @init { | ||
387 | enterRule(); | ||
388 | } | ||
389 | @after { | ||
390 | leaveRule(); | ||
391 | }: | ||
392 | ( | ||
393 | ( | ||
394 | ( | ||
395 | lv_name_0_0=RULE_ID | ||
396 | { | ||
397 | newLeafNode(lv_name_0_0, grammarAccess.getInputEventAccess().getNameIDTerminalRuleCall_0_0()); | ||
398 | } | ||
399 | { | ||
400 | if ($current==null) { | ||
401 | $current = createModelElement(grammarAccess.getInputEventRule()); | ||
402 | } | ||
403 | setWithLastConsumed( | ||
404 | $current, | ||
405 | "name", | ||
406 | lv_name_0_0, | ||
407 | "org.eclipse.xtext.common.Terminals.ID"); | ||
408 | } | ||
409 | ) | ||
410 | ) | ||
411 | ( | ||
412 | ( | ||
413 | lv_multiple_1_0='[]' | ||
414 | { | ||
415 | newLeafNode(lv_multiple_1_0, grammarAccess.getInputEventAccess().getMultipleLeftSquareBracketRightSquareBracketKeyword_1_0()); | ||
416 | } | ||
417 | { | ||
418 | if ($current==null) { | ||
419 | $current = createModelElement(grammarAccess.getInputEventRule()); | ||
420 | } | ||
421 | setWithLastConsumed($current, "multiple", true, "[]"); | ||
422 | } | ||
423 | ) | ||
424 | )? | ||
425 | ) | ||
426 | ; | ||
427 | |||
428 | // Entry rule entryRuleEventDefinition | ||
429 | entryRuleEventDefinition returns [EObject current=null]: | ||
430 | { newCompositeNode(grammarAccess.getEventDefinitionRule()); } | ||
431 | iv_ruleEventDefinition=ruleEventDefinition | ||
432 | { $current=$iv_ruleEventDefinition.current; } | ||
433 | EOF; | ||
434 | |||
435 | // Rule EventDefinition | ||
436 | ruleEventDefinition returns [EObject current=null] | ||
437 | @init { | ||
438 | enterRule(); | ||
439 | } | ||
440 | @after { | ||
441 | leaveRule(); | ||
442 | }: | ||
443 | ( | ||
444 | { | ||
445 | newCompositeNode(grammarAccess.getEventDefinitionAccess().getBasicEventDefinitionParserRuleCall_0()); | ||
446 | } | ||
447 | this_BasicEventDefinition_0=ruleBasicEventDefinition | ||
448 | { | ||
449 | $current = $this_BasicEventDefinition_0.current; | ||
450 | afterParserOrEnumRuleCall(); | ||
451 | } | ||
452 | | | ||
453 | { | ||
454 | newCompositeNode(grammarAccess.getEventDefinitionAccess().getGateDefinitionParserRuleCall_1()); | ||
455 | } | ||
456 | this_GateDefinition_1=ruleGateDefinition | ||
457 | { | ||
458 | $current = $this_GateDefinition_1.current; | ||
459 | afterParserOrEnumRuleCall(); | ||
460 | } | ||
461 | ) | ||
462 | ; | ||
463 | |||
464 | // Entry rule entryRuleBasicEventDefinition | ||
465 | entryRuleBasicEventDefinition returns [EObject current=null]: | ||
466 | { newCompositeNode(grammarAccess.getBasicEventDefinitionRule()); } | ||
467 | iv_ruleBasicEventDefinition=ruleBasicEventDefinition | ||
468 | { $current=$iv_ruleBasicEventDefinition.current; } | ||
469 | EOF; | ||
470 | |||
471 | // Rule BasicEventDefinition | ||
472 | ruleBasicEventDefinition returns [EObject current=null] | ||
473 | @init { | ||
474 | enterRule(); | ||
475 | } | ||
476 | @after { | ||
477 | leaveRule(); | ||
478 | }: | ||
479 | ( | ||
480 | ( | ||
481 | ( | ||
482 | lv_name_0_0=RULE_ID | ||
483 | { | ||
484 | newLeafNode(lv_name_0_0, grammarAccess.getBasicEventDefinitionAccess().getNameIDTerminalRuleCall_0_0()); | ||
485 | } | ||
486 | { | ||
487 | if ($current==null) { | ||
488 | $current = createModelElement(grammarAccess.getBasicEventDefinitionRule()); | ||
489 | } | ||
490 | setWithLastConsumed( | ||
491 | $current, | ||
492 | "name", | ||
493 | lv_name_0_0, | ||
494 | "org.eclipse.xtext.common.Terminals.ID"); | ||
495 | } | ||
496 | ) | ||
497 | ) | ||
498 | otherlv_1='lambda' | ||
499 | { | ||
500 | newLeafNode(otherlv_1, grammarAccess.getBasicEventDefinitionAccess().getLambdaKeyword_1()); | ||
501 | } | ||
502 | otherlv_2='=' | ||
503 | { | ||
504 | newLeafNode(otherlv_2, grammarAccess.getBasicEventDefinitionAccess().getEqualsSignKeyword_2()); | ||
505 | } | ||
506 | ( | ||
507 | ( | ||
508 | lv_rate_3_0=RULE_DOULBE | ||
509 | { | ||
510 | newLeafNode(lv_rate_3_0, grammarAccess.getBasicEventDefinitionAccess().getRateDOULBETerminalRuleCall_3_0()); | ||
511 | } | ||
512 | { | ||
513 | if ($current==null) { | ||
514 | $current = createModelElement(grammarAccess.getBasicEventDefinitionRule()); | ||
515 | } | ||
516 | setWithLastConsumed( | ||
517 | $current, | ||
518 | "rate", | ||
519 | lv_rate_3_0, | ||
520 | "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.DOULBE"); | ||
521 | } | ||
522 | ) | ||
523 | ) | ||
524 | ) | ||
525 | ; | ||
526 | |||
527 | // Entry rule entryRuleGateDefinition | ||
528 | entryRuleGateDefinition returns [EObject current=null]: | ||
529 | { newCompositeNode(grammarAccess.getGateDefinitionRule()); } | ||
530 | iv_ruleGateDefinition=ruleGateDefinition | ||
531 | { $current=$iv_ruleGateDefinition.current; } | ||
532 | EOF; | ||
533 | |||
534 | // Rule GateDefinition | ||
535 | ruleGateDefinition returns [EObject current=null] | ||
536 | @init { | ||
537 | enterRule(); | ||
538 | } | ||
539 | @after { | ||
540 | leaveRule(); | ||
541 | }: | ||
542 | ( | ||
543 | { | ||
544 | newCompositeNode(grammarAccess.getGateDefinitionAccess().getAndGateParserRuleCall_0()); | ||
545 | } | ||
546 | this_AndGate_0=ruleAndGate | ||
547 | { | ||
548 | $current = $this_AndGate_0.current; | ||
549 | afterParserOrEnumRuleCall(); | ||
550 | } | ||
551 | | | ||
552 | { | ||
553 | newCompositeNode(grammarAccess.getGateDefinitionAccess().getOrGateParserRuleCall_1()); | ||
554 | } | ||
555 | this_OrGate_1=ruleOrGate | ||
556 | { | ||
557 | $current = $this_OrGate_1.current; | ||
558 | afterParserOrEnumRuleCall(); | ||
559 | } | ||
560 | ) | ||
561 | ; | ||
562 | |||
563 | // Entry rule entryRuleAndGate | ||
564 | entryRuleAndGate returns [EObject current=null]: | ||
565 | { newCompositeNode(grammarAccess.getAndGateRule()); } | ||
566 | iv_ruleAndGate=ruleAndGate | ||
567 | { $current=$iv_ruleAndGate.current; } | ||
568 | EOF; | ||
569 | |||
570 | // Rule AndGate | ||
571 | ruleAndGate returns [EObject current=null] | ||
572 | @init { | ||
573 | enterRule(); | ||
574 | } | ||
575 | @after { | ||
576 | leaveRule(); | ||
577 | }: | ||
578 | ( | ||
579 | ( | ||
580 | ( | ||
581 | lv_name_0_0=RULE_ID | ||
582 | { | ||
583 | newLeafNode(lv_name_0_0, grammarAccess.getAndGateAccess().getNameIDTerminalRuleCall_0_0()); | ||
584 | } | ||
585 | { | ||
586 | if ($current==null) { | ||
587 | $current = createModelElement(grammarAccess.getAndGateRule()); | ||
588 | } | ||
589 | setWithLastConsumed( | ||
590 | $current, | ||
591 | "name", | ||
592 | lv_name_0_0, | ||
593 | "org.eclipse.xtext.common.Terminals.ID"); | ||
594 | } | ||
595 | ) | ||
596 | ) | ||
597 | otherlv_1='and' | ||
598 | { | ||
599 | newLeafNode(otherlv_1, grammarAccess.getAndGateAccess().getAndKeyword_1()); | ||
600 | } | ||
601 | ( | ||
602 | ( | ||
603 | { | ||
604 | if ($current==null) { | ||
605 | $current = createModelElement(grammarAccess.getAndGateRule()); | ||
606 | } | ||
607 | } | ||
608 | otherlv_2=RULE_ID | ||
609 | { | ||
610 | newLeafNode(otherlv_2, grammarAccess.getAndGateAccess().getInputEventsEventDeclarationCrossReference_2_0()); | ||
611 | } | ||
612 | ) | ||
613 | )* | ||
614 | ) | ||
615 | ; | ||
616 | |||
617 | // Entry rule entryRuleOrGate | ||
618 | entryRuleOrGate returns [EObject current=null]: | ||
619 | { newCompositeNode(grammarAccess.getOrGateRule()); } | ||
620 | iv_ruleOrGate=ruleOrGate | ||
621 | { $current=$iv_ruleOrGate.current; } | ||
622 | EOF; | ||
623 | |||
624 | // Rule OrGate | ||
625 | ruleOrGate returns [EObject current=null] | ||
626 | @init { | ||
627 | enterRule(); | ||
628 | } | ||
629 | @after { | ||
630 | leaveRule(); | ||
631 | }: | ||
632 | ( | ||
633 | ( | ||
634 | ( | ||
635 | lv_name_0_0=RULE_ID | ||
636 | { | ||
637 | newLeafNode(lv_name_0_0, grammarAccess.getOrGateAccess().getNameIDTerminalRuleCall_0_0()); | ||
638 | } | ||
639 | { | ||
640 | if ($current==null) { | ||
641 | $current = createModelElement(grammarAccess.getOrGateRule()); | ||
642 | } | ||
643 | setWithLastConsumed( | ||
644 | $current, | ||
645 | "name", | ||
646 | lv_name_0_0, | ||
647 | "org.eclipse.xtext.common.Terminals.ID"); | ||
648 | } | ||
649 | ) | ||
650 | ) | ||
651 | otherlv_1='or' | ||
652 | { | ||
653 | newLeafNode(otherlv_1, grammarAccess.getOrGateAccess().getOrKeyword_1()); | ||
654 | } | ||
655 | ( | ||
656 | ( | ||
657 | { | ||
658 | if ($current==null) { | ||
659 | $current = createModelElement(grammarAccess.getOrGateRule()); | ||
660 | } | ||
661 | } | ||
662 | otherlv_2=RULE_ID | ||
663 | { | ||
664 | newLeafNode(otherlv_2, grammarAccess.getOrGateAccess().getInputEventsEventDeclarationCrossReference_2_0()); | ||
665 | } | ||
666 | ) | ||
667 | )* | ||
668 | ) | ||
669 | ; | ||
670 | |||
671 | // Entry rule entryRuleTransformationDefinition | ||
672 | entryRuleTransformationDefinition returns [EObject current=null]: | ||
673 | { newCompositeNode(grammarAccess.getTransformationDefinitionRule()); } | ||
674 | iv_ruleTransformationDefinition=ruleTransformationDefinition | ||
675 | { $current=$iv_ruleTransformationDefinition.current; } | ||
676 | EOF; | ||
677 | |||
678 | // Rule TransformationDefinition | ||
679 | ruleTransformationDefinition returns [EObject current=null] | ||
680 | @init { | ||
681 | enterRule(); | ||
682 | } | ||
683 | @after { | ||
684 | leaveRule(); | ||
685 | }: | ||
686 | ( | ||
687 | otherlv_0='transformation' | ||
688 | { | ||
689 | newLeafNode(otherlv_0, grammarAccess.getTransformationDefinitionAccess().getTransformationKeyword_0()); | ||
690 | } | ||
691 | ( | ||
692 | ( | ||
693 | lv_name_1_0=RULE_ID | ||
694 | { | ||
695 | newLeafNode(lv_name_1_0, grammarAccess.getTransformationDefinitionAccess().getNameIDTerminalRuleCall_1_0()); | ||
696 | } | ||
697 | { | ||
698 | if ($current==null) { | ||
699 | $current = createModelElement(grammarAccess.getTransformationDefinitionRule()); | ||
700 | } | ||
701 | setWithLastConsumed( | ||
702 | $current, | ||
703 | "name", | ||
704 | lv_name_1_0, | ||
705 | "org.eclipse.xtext.common.Terminals.ID"); | ||
706 | } | ||
707 | ) | ||
708 | ) | ||
709 | otherlv_2='{' | ||
710 | { | ||
711 | newLeafNode(otherlv_2, grammarAccess.getTransformationDefinitionAccess().getLeftCurlyBracketKeyword_2()); | ||
712 | } | ||
713 | ( | ||
714 | ( | ||
715 | { | ||
716 | newCompositeNode(grammarAccess.getTransformationDefinitionAccess().getMappingDefinitionsMappingDefinitionParserRuleCall_3_0()); | ||
717 | } | ||
718 | lv_mappingDefinitions_3_0=ruleMappingDefinition | ||
719 | { | ||
720 | if ($current==null) { | ||
721 | $current = createModelElementForParent(grammarAccess.getTransformationDefinitionRule()); | ||
722 | } | ||
723 | add( | ||
724 | $current, | ||
725 | "mappingDefinitions", | ||
726 | lv_mappingDefinitions_3_0, | ||
727 | "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.MappingDefinition"); | ||
728 | afterParserOrEnumRuleCall(); | ||
729 | } | ||
730 | ) | ||
731 | )* | ||
732 | otherlv_4='}' | ||
733 | { | ||
734 | newLeafNode(otherlv_4, grammarAccess.getTransformationDefinitionAccess().getRightCurlyBracketKeyword_4()); | ||
735 | } | ||
736 | ) | ||
737 | ; | ||
738 | |||
739 | // Entry rule entryRuleMappingDefinition | ||
740 | entryRuleMappingDefinition returns [EObject current=null]: | ||
741 | { newCompositeNode(grammarAccess.getMappingDefinitionRule()); } | ||
742 | iv_ruleMappingDefinition=ruleMappingDefinition | ||
743 | { $current=$iv_ruleMappingDefinition.current; } | ||
744 | EOF; | ||
745 | |||
746 | // Rule MappingDefinition | ||
747 | ruleMappingDefinition returns [EObject current=null] | ||
748 | @init { | ||
749 | enterRule(); | ||
750 | } | ||
751 | @after { | ||
752 | leaveRule(); | ||
753 | }: | ||
754 | ( | ||
755 | ( | ||
756 | ( | ||
757 | lv_topLevel_0_0='toplevel' | ||
758 | { | ||
759 | newLeafNode(lv_topLevel_0_0, grammarAccess.getMappingDefinitionAccess().getTopLevelToplevelKeyword_0_0()); | ||
760 | } | ||
761 | { | ||
762 | if ($current==null) { | ||
763 | $current = createModelElement(grammarAccess.getMappingDefinitionRule()); | ||
764 | } | ||
765 | setWithLastConsumed($current, "topLevel", true, "toplevel"); | ||
766 | } | ||
767 | ) | ||
768 | )? | ||
769 | otherlv_1='mapping' | ||
770 | { | ||
771 | newLeafNode(otherlv_1, grammarAccess.getMappingDefinitionAccess().getMappingKeyword_1()); | ||
772 | } | ||
773 | ( | ||
774 | ( | ||
775 | { | ||
776 | if ($current==null) { | ||
777 | $current = createModelElement(grammarAccess.getMappingDefinitionRule()); | ||
778 | } | ||
779 | } | ||
780 | { | ||
781 | newCompositeNode(grammarAccess.getMappingDefinitionAccess().getPatternPatternCrossReference_2_0()); | ||
782 | } | ||
783 | ruleQualifiedName | ||
784 | { | ||
785 | afterParserOrEnumRuleCall(); | ||
786 | } | ||
787 | ) | ||
788 | ) | ||
789 | otherlv_3='(' | ||
790 | { | ||
791 | newLeafNode(otherlv_3, grammarAccess.getMappingDefinitionAccess().getLeftParenthesisKeyword_3()); | ||
792 | } | ||
793 | ( | ||
794 | ( | ||
795 | { | ||
796 | newCompositeNode(grammarAccess.getMappingDefinitionAccess().getParametersMappingParameterParserRuleCall_4_0()); | ||
797 | } | ||
798 | lv_parameters_4_0=ruleMappingParameter | ||
799 | { | ||
800 | if ($current==null) { | ||
801 | $current = createModelElementForParent(grammarAccess.getMappingDefinitionRule()); | ||
802 | } | ||
803 | add( | ||
804 | $current, | ||
805 | "parameters", | ||
806 | lv_parameters_4_0, | ||
807 | "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.MappingParameter"); | ||
808 | afterParserOrEnumRuleCall(); | ||
809 | } | ||
810 | ) | ||
811 | ) | ||
812 | ( | ||
813 | otherlv_5=',' | ||
814 | { | ||
815 | newLeafNode(otherlv_5, grammarAccess.getMappingDefinitionAccess().getCommaKeyword_5_0()); | ||
816 | } | ||
817 | ( | ||
818 | ( | ||
819 | { | ||
820 | newCompositeNode(grammarAccess.getMappingDefinitionAccess().getParametersMappingParameterParserRuleCall_5_1_0()); | ||
821 | } | ||
822 | lv_parameters_6_0=ruleMappingParameter | ||
823 | { | ||
824 | if ($current==null) { | ||
825 | $current = createModelElementForParent(grammarAccess.getMappingDefinitionRule()); | ||
826 | } | ||
827 | add( | ||
828 | $current, | ||
829 | "parameters", | ||
830 | lv_parameters_6_0, | ||
831 | "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.MappingParameter"); | ||
832 | afterParserOrEnumRuleCall(); | ||
833 | } | ||
834 | ) | ||
835 | ) | ||
836 | )* | ||
837 | otherlv_7=')' | ||
838 | { | ||
839 | newLeafNode(otherlv_7, grammarAccess.getMappingDefinitionAccess().getRightParenthesisKeyword_6()); | ||
840 | } | ||
841 | ( | ||
842 | ( | ||
843 | { | ||
844 | newCompositeNode(grammarAccess.getMappingDefinitionAccess().getComponentInstanceComponentInstanceParserRuleCall_7_0()); | ||
845 | } | ||
846 | lv_componentInstance_8_0=ruleComponentInstance | ||
847 | { | ||
848 | if ($current==null) { | ||
849 | $current = createModelElementForParent(grammarAccess.getMappingDefinitionRule()); | ||
850 | } | ||
851 | set( | ||
852 | $current, | ||
853 | "componentInstance", | ||
854 | lv_componentInstance_8_0, | ||
855 | "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.ComponentInstance"); | ||
856 | afterParserOrEnumRuleCall(); | ||
857 | } | ||
858 | ) | ||
859 | )? | ||
860 | ( | ||
861 | otherlv_9='{' | ||
862 | { | ||
863 | newLeafNode(otherlv_9, grammarAccess.getMappingDefinitionAccess().getLeftCurlyBracketKeyword_8_0()); | ||
864 | } | ||
865 | ( | ||
866 | ( | ||
867 | ( | ||
868 | ( | ||
869 | { | ||
870 | newCompositeNode(grammarAccess.getMappingDefinitionAccess().getLookupDefinitionsLookupDefinitionParserRuleCall_8_1_0_0_0()); | ||
871 | } | ||
872 | lv_lookupDefinitions_10_0=ruleLookupDefinition | ||
873 | { | ||
874 | if ($current==null) { | ||
875 | $current = createModelElementForParent(grammarAccess.getMappingDefinitionRule()); | ||
876 | } | ||
877 | add( | ||
878 | $current, | ||
879 | "lookupDefinitions", | ||
880 | lv_lookupDefinitions_10_0, | ||
881 | "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.LookupDefinition"); | ||
882 | afterParserOrEnumRuleCall(); | ||
883 | } | ||
884 | ) | ||
885 | ) | ||
886 | | | ||
887 | ( | ||
888 | ( | ||
889 | { | ||
890 | newCompositeNode(grammarAccess.getMappingDefinitionAccess().getAssignmentsAssignmentParserRuleCall_8_1_0_1_0()); | ||
891 | } | ||
892 | lv_assignments_11_0=ruleAssignment | ||
893 | { | ||
894 | if ($current==null) { | ||
895 | $current = createModelElementForParent(grammarAccess.getMappingDefinitionRule()); | ||
896 | } | ||
897 | add( | ||
898 | $current, | ||
899 | "assignments", | ||
900 | lv_assignments_11_0, | ||
901 | "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.Assignment"); | ||
902 | afterParserOrEnumRuleCall(); | ||
903 | } | ||
904 | ) | ||
905 | ) | ||
906 | ) | ||
907 | otherlv_12=';' | ||
908 | { | ||
909 | newLeafNode(otherlv_12, grammarAccess.getMappingDefinitionAccess().getSemicolonKeyword_8_1_1()); | ||
910 | } | ||
911 | )* | ||
912 | otherlv_13='}' | ||
913 | { | ||
914 | newLeafNode(otherlv_13, grammarAccess.getMappingDefinitionAccess().getRightCurlyBracketKeyword_8_2()); | ||
915 | } | ||
916 | )? | ||
917 | ) | ||
918 | ; | ||
919 | |||
920 | // Entry rule entryRuleMappingParameter | ||
921 | entryRuleMappingParameter returns [EObject current=null]: | ||
922 | { newCompositeNode(grammarAccess.getMappingParameterRule()); } | ||
923 | iv_ruleMappingParameter=ruleMappingParameter | ||
924 | { $current=$iv_ruleMappingParameter.current; } | ||
925 | EOF; | ||
926 | |||
927 | // Rule MappingParameter | ||
928 | ruleMappingParameter returns [EObject current=null] | ||
929 | @init { | ||
930 | enterRule(); | ||
931 | } | ||
932 | @after { | ||
933 | leaveRule(); | ||
934 | }: | ||
935 | ( | ||
936 | ( | ||
937 | lv_name_0_0=RULE_ID | ||
938 | { | ||
939 | newLeafNode(lv_name_0_0, grammarAccess.getMappingParameterAccess().getNameIDTerminalRuleCall_0()); | ||
940 | } | ||
941 | { | ||
942 | if ($current==null) { | ||
943 | $current = createModelElement(grammarAccess.getMappingParameterRule()); | ||
944 | } | ||
945 | setWithLastConsumed( | ||
946 | $current, | ||
947 | "name", | ||
948 | lv_name_0_0, | ||
949 | "org.eclipse.xtext.common.Terminals.ID"); | ||
950 | } | ||
951 | ) | ||
952 | ) | ||
953 | ; | ||
954 | |||
955 | // Entry rule entryRuleLookupDefinition | ||
956 | entryRuleLookupDefinition returns [EObject current=null]: | ||
957 | { newCompositeNode(grammarAccess.getLookupDefinitionRule()); } | ||
958 | iv_ruleLookupDefinition=ruleLookupDefinition | ||
959 | { $current=$iv_ruleLookupDefinition.current; } | ||
960 | EOF; | ||
961 | |||
962 | // Rule LookupDefinition | ||
963 | ruleLookupDefinition returns [EObject current=null] | ||
964 | @init { | ||
965 | enterRule(); | ||
966 | } | ||
967 | @after { | ||
968 | leaveRule(); | ||
969 | }: | ||
970 | ( | ||
971 | otherlv_0='lookup' | ||
972 | { | ||
973 | newLeafNode(otherlv_0, grammarAccess.getLookupDefinitionAccess().getLookupKeyword_0()); | ||
974 | } | ||
975 | ( | ||
976 | ( | ||
977 | { | ||
978 | if ($current==null) { | ||
979 | $current = createModelElement(grammarAccess.getLookupDefinitionRule()); | ||
980 | } | ||
981 | } | ||
982 | otherlv_1=RULE_ID | ||
983 | { | ||
984 | newLeafNode(otherlv_1, grammarAccess.getLookupDefinitionAccess().getMappingMappingDefinitionCrossReference_1_0()); | ||
985 | } | ||
986 | ) | ||
987 | ) | ||
988 | otherlv_2='(' | ||
989 | { | ||
990 | newLeafNode(otherlv_2, grammarAccess.getLookupDefinitionAccess().getLeftParenthesisKeyword_2()); | ||
991 | } | ||
992 | ( | ||
993 | ( | ||
994 | { | ||
995 | if ($current==null) { | ||
996 | $current = createModelElement(grammarAccess.getLookupDefinitionRule()); | ||
997 | } | ||
998 | } | ||
999 | otherlv_3=RULE_ID | ||
1000 | { | ||
1001 | newLeafNode(otherlv_3, grammarAccess.getLookupDefinitionAccess().getArgumentsMappingParameterCrossReference_3_0()); | ||
1002 | } | ||
1003 | ) | ||
1004 | ) | ||
1005 | ( | ||
1006 | otherlv_4=',' | ||
1007 | { | ||
1008 | newLeafNode(otherlv_4, grammarAccess.getLookupDefinitionAccess().getCommaKeyword_4_0()); | ||
1009 | } | ||
1010 | ( | ||
1011 | ( | ||
1012 | { | ||
1013 | if ($current==null) { | ||
1014 | $current = createModelElement(grammarAccess.getLookupDefinitionRule()); | ||
1015 | } | ||
1016 | } | ||
1017 | otherlv_5=RULE_ID | ||
1018 | { | ||
1019 | newLeafNode(otherlv_5, grammarAccess.getLookupDefinitionAccess().getArgumentsMappingParameterCrossReference_4_1_0()); | ||
1020 | } | ||
1021 | ) | ||
1022 | ) | ||
1023 | )* | ||
1024 | otherlv_6=')' | ||
1025 | { | ||
1026 | newLeafNode(otherlv_6, grammarAccess.getLookupDefinitionAccess().getRightParenthesisKeyword_5()); | ||
1027 | } | ||
1028 | otherlv_7='as' | ||
1029 | { | ||
1030 | newLeafNode(otherlv_7, grammarAccess.getLookupDefinitionAccess().getAsKeyword_6()); | ||
1031 | } | ||
1032 | ( | ||
1033 | ( | ||
1034 | lv_name_8_0=RULE_ID | ||
1035 | { | ||
1036 | newLeafNode(lv_name_8_0, grammarAccess.getLookupDefinitionAccess().getNameIDTerminalRuleCall_7_0()); | ||
1037 | } | ||
1038 | { | ||
1039 | if ($current==null) { | ||
1040 | $current = createModelElement(grammarAccess.getLookupDefinitionRule()); | ||
1041 | } | ||
1042 | setWithLastConsumed( | ||
1043 | $current, | ||
1044 | "name", | ||
1045 | lv_name_8_0, | ||
1046 | "org.eclipse.xtext.common.Terminals.ID"); | ||
1047 | } | ||
1048 | ) | ||
1049 | ) | ||
1050 | ) | ||
1051 | ; | ||
1052 | |||
1053 | // Entry rule entryRuleAssignment | ||
1054 | entryRuleAssignment returns [EObject current=null]: | ||
1055 | { newCompositeNode(grammarAccess.getAssignmentRule()); } | ||
1056 | iv_ruleAssignment=ruleAssignment | ||
1057 | { $current=$iv_ruleAssignment.current; } | ||
1058 | EOF; | ||
1059 | |||
1060 | // Rule Assignment | ||
1061 | ruleAssignment returns [EObject current=null] | ||
1062 | @init { | ||
1063 | enterRule(); | ||
1064 | } | ||
1065 | @after { | ||
1066 | leaveRule(); | ||
1067 | }: | ||
1068 | ( | ||
1069 | ( | ||
1070 | ( | ||
1071 | { | ||
1072 | newCompositeNode(grammarAccess.getAssignmentAccess().getInputEventReferenceParserRuleCall_0_0()); | ||
1073 | } | ||
1074 | lv_input_0_0=ruleEventReference | ||
1075 | { | ||
1076 | if ($current==null) { | ||
1077 | $current = createModelElementForParent(grammarAccess.getAssignmentRule()); | ||
1078 | } | ||
1079 | set( | ||
1080 | $current, | ||
1081 | "input", | ||
1082 | lv_input_0_0, | ||
1083 | "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.EventReference"); | ||
1084 | afterParserOrEnumRuleCall(); | ||
1085 | } | ||
1086 | ) | ||
1087 | ) | ||
1088 | ( | ||
1089 | ( | ||
1090 | ( | ||
1091 | lv_multiple_1_0='+=' | ||
1092 | { | ||
1093 | newLeafNode(lv_multiple_1_0, grammarAccess.getAssignmentAccess().getMultiplePlusSignEqualsSignKeyword_1_0_0()); | ||
1094 | } | ||
1095 | { | ||
1096 | if ($current==null) { | ||
1097 | $current = createModelElement(grammarAccess.getAssignmentRule()); | ||
1098 | } | ||
1099 | setWithLastConsumed($current, "multiple", true, "+="); | ||
1100 | } | ||
1101 | ) | ||
1102 | ) | ||
1103 | | | ||
1104 | otherlv_2=':=' | ||
1105 | { | ||
1106 | newLeafNode(otherlv_2, grammarAccess.getAssignmentAccess().getColonEqualsSignKeyword_1_1()); | ||
1107 | } | ||
1108 | ) | ||
1109 | ( | ||
1110 | ( | ||
1111 | { | ||
1112 | newCompositeNode(grammarAccess.getAssignmentAccess().getOutputEventReferenceParserRuleCall_2_0()); | ||
1113 | } | ||
1114 | lv_output_3_0=ruleEventReference | ||
1115 | { | ||
1116 | if ($current==null) { | ||
1117 | $current = createModelElementForParent(grammarAccess.getAssignmentRule()); | ||
1118 | } | ||
1119 | set( | ||
1120 | $current, | ||
1121 | "output", | ||
1122 | lv_output_3_0, | ||
1123 | "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.EventReference"); | ||
1124 | afterParserOrEnumRuleCall(); | ||
1125 | } | ||
1126 | ) | ||
1127 | ) | ||
1128 | ) | ||
1129 | ; | ||
1130 | |||
1131 | // Entry rule entryRuleEventReference | ||
1132 | entryRuleEventReference returns [EObject current=null]: | ||
1133 | { newCompositeNode(grammarAccess.getEventReferenceRule()); } | ||
1134 | iv_ruleEventReference=ruleEventReference | ||
1135 | { $current=$iv_ruleEventReference.current; } | ||
1136 | EOF; | ||
1137 | |||
1138 | // Rule EventReference | ||
1139 | ruleEventReference returns [EObject current=null] | ||
1140 | @init { | ||
1141 | enterRule(); | ||
1142 | } | ||
1143 | @after { | ||
1144 | leaveRule(); | ||
1145 | }: | ||
1146 | ( | ||
1147 | ( | ||
1148 | ( | ||
1149 | { | ||
1150 | if ($current==null) { | ||
1151 | $current = createModelElement(grammarAccess.getEventReferenceRule()); | ||
1152 | } | ||
1153 | } | ||
1154 | otherlv_0=RULE_ID | ||
1155 | { | ||
1156 | newLeafNode(otherlv_0, grammarAccess.getEventReferenceAccess().getComponentVariableCrossReference_0_0()); | ||
1157 | } | ||
1158 | ) | ||
1159 | ) | ||
1160 | otherlv_1='.' | ||
1161 | { | ||
1162 | newLeafNode(otherlv_1, grammarAccess.getEventReferenceAccess().getFullStopKeyword_1()); | ||
1163 | } | ||
1164 | ( | ||
1165 | ( | ||
1166 | { | ||
1167 | if ($current==null) { | ||
1168 | $current = createModelElement(grammarAccess.getEventReferenceRule()); | ||
1169 | } | ||
1170 | } | ||
1171 | otherlv_2=RULE_ID | ||
1172 | { | ||
1173 | newLeafNode(otherlv_2, grammarAccess.getEventReferenceAccess().getEventEventDeclarationCrossReference_2_0()); | ||
1174 | } | ||
1175 | ) | ||
1176 | ) | ||
1177 | ) | ||
1178 | ; | ||
1179 | |||
1180 | // Entry rule entryRuleComponentInstance | ||
1181 | entryRuleComponentInstance returns [EObject current=null]: | ||
1182 | { newCompositeNode(grammarAccess.getComponentInstanceRule()); } | ||
1183 | iv_ruleComponentInstance=ruleComponentInstance | ||
1184 | { $current=$iv_ruleComponentInstance.current; } | ||
1185 | EOF; | ||
1186 | |||
1187 | // Rule ComponentInstance | ||
1188 | ruleComponentInstance returns [EObject current=null] | ||
1189 | @init { | ||
1190 | enterRule(); | ||
1191 | } | ||
1192 | @after { | ||
1193 | leaveRule(); | ||
1194 | }: | ||
1195 | ( | ||
1196 | otherlv_0='=>' | ||
1197 | { | ||
1198 | newLeafNode(otherlv_0, grammarAccess.getComponentInstanceAccess().getEqualsSignGreaterThanSignKeyword_0()); | ||
1199 | } | ||
1200 | ( | ||
1201 | ( | ||
1202 | { | ||
1203 | if ($current==null) { | ||
1204 | $current = createModelElement(grammarAccess.getComponentInstanceRule()); | ||
1205 | } | ||
1206 | } | ||
1207 | { | ||
1208 | newCompositeNode(grammarAccess.getComponentInstanceAccess().getComponentTypeComponentDefinitionCrossReference_1_0()); | ||
1209 | } | ||
1210 | ruleQualifiedName | ||
1211 | { | ||
1212 | afterParserOrEnumRuleCall(); | ||
1213 | } | ||
1214 | ) | ||
1215 | ) | ||
1216 | ( | ||
1217 | ( | ||
1218 | lv_name_2_0=RULE_ID | ||
1219 | { | ||
1220 | newLeafNode(lv_name_2_0, grammarAccess.getComponentInstanceAccess().getNameIDTerminalRuleCall_2_0()); | ||
1221 | } | ||
1222 | { | ||
1223 | if ($current==null) { | ||
1224 | $current = createModelElement(grammarAccess.getComponentInstanceRule()); | ||
1225 | } | ||
1226 | setWithLastConsumed( | ||
1227 | $current, | ||
1228 | "name", | ||
1229 | lv_name_2_0, | ||
1230 | "org.eclipse.xtext.common.Terminals.ID"); | ||
1231 | } | ||
1232 | ) | ||
1233 | )? | ||
1234 | ) | ||
1235 | ; | ||
1236 | |||
1237 | // Entry rule entryRuleQualifiedName | ||
1238 | entryRuleQualifiedName returns [String current=null]: | ||
1239 | { newCompositeNode(grammarAccess.getQualifiedNameRule()); } | ||
1240 | iv_ruleQualifiedName=ruleQualifiedName | ||
1241 | { $current=$iv_ruleQualifiedName.current.getText(); } | ||
1242 | EOF; | ||
1243 | |||
1244 | // Rule QualifiedName | ||
1245 | ruleQualifiedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] | ||
1246 | @init { | ||
1247 | enterRule(); | ||
1248 | } | ||
1249 | @after { | ||
1250 | leaveRule(); | ||
1251 | }: | ||
1252 | ( | ||
1253 | this_ID_0=RULE_ID | ||
1254 | { | ||
1255 | $current.merge(this_ID_0); | ||
1256 | } | ||
1257 | { | ||
1258 | newLeafNode(this_ID_0, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_0()); | ||
1259 | } | ||
1260 | ( | ||
1261 | kw='.' | ||
1262 | { | ||
1263 | $current.merge(kw); | ||
1264 | newLeafNode(kw, grammarAccess.getQualifiedNameAccess().getFullStopKeyword_1_0()); | ||
1265 | } | ||
1266 | this_ID_2=RULE_ID | ||
1267 | { | ||
1268 | $current.merge(this_ID_2); | ||
1269 | } | ||
1270 | { | ||
1271 | newLeafNode(this_ID_2, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_1_1()); | ||
1272 | } | ||
1273 | )* | ||
1274 | ) | ||
1275 | ; | ||
1276 | |||
1277 | // Entry rule entryRuleQualifiedNameWithWildcard | ||
1278 | entryRuleQualifiedNameWithWildcard returns [String current=null]: | ||
1279 | { newCompositeNode(grammarAccess.getQualifiedNameWithWildcardRule()); } | ||
1280 | iv_ruleQualifiedNameWithWildcard=ruleQualifiedNameWithWildcard | ||
1281 | { $current=$iv_ruleQualifiedNameWithWildcard.current.getText(); } | ||
1282 | EOF; | ||
1283 | |||
1284 | // Rule QualifiedNameWithWildcard | ||
1285 | ruleQualifiedNameWithWildcard returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] | ||
1286 | @init { | ||
1287 | enterRule(); | ||
1288 | } | ||
1289 | @after { | ||
1290 | leaveRule(); | ||
1291 | }: | ||
1292 | ( | ||
1293 | { | ||
1294 | newCompositeNode(grammarAccess.getQualifiedNameWithWildcardAccess().getQualifiedNameParserRuleCall_0()); | ||
1295 | } | ||
1296 | this_QualifiedName_0=ruleQualifiedName | ||
1297 | { | ||
1298 | $current.merge(this_QualifiedName_0); | ||
1299 | } | ||
1300 | { | ||
1301 | afterParserOrEnumRuleCall(); | ||
1302 | } | ||
1303 | ( | ||
1304 | kw='.' | ||
1305 | { | ||
1306 | $current.merge(kw); | ||
1307 | newLeafNode(kw, grammarAccess.getQualifiedNameWithWildcardAccess().getFullStopKeyword_1_0()); | ||
1308 | } | ||
1309 | kw='*' | ||
1310 | { | ||
1311 | $current.merge(kw); | ||
1312 | newLeafNode(kw, grammarAccess.getQualifiedNameWithWildcardAccess().getAsteriskKeyword_1_1()); | ||
1313 | } | ||
1314 | )? | ||
1315 | ) | ||
1316 | ; | ||
1317 | |||
1318 | RULE_DOULBE : ('0'..'9')+ ('.' ('0'..'9')+|('.' ('0'..'9')+)? ('e'|'E') ('+'|'-')? ('0'..'9')+); | ||
1319 | |||
1320 | RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*; | ||
1321 | |||
1322 | RULE_INT : ('0'..'9')+; | ||
1323 | |||
1324 | RULE_STRING : ('"' ('\\' .|~(('\\'|'"')))* '"'|'\'' ('\\' .|~(('\\'|'\'')))* '\''); | ||
1325 | |||
1326 | RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/'; | ||
1327 | |||
1328 | RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?; | ||
1329 | |||
1330 | RULE_WS : (' '|'\t'|'\r'|'\n')+; | ||
1331 | |||
1332 | RULE_ANY_OTHER : .; | ||