blob: 5d0282b6260f353110e69b8a9ca1edc20eac663c [file] [log] [blame]
Ed Willink8435f242016-01-04 21:04:04 +00001/*******************************************************************************
Ed Willink11a5e962022-01-06 11:45:45 +00002 * Copyright (c) 2011, 2022 Willink Transformations and others.
Ed Willink8435f242016-01-04 21:04:04 +00003 * All rights reserved. This program and the accompanying materials
Ed Willink2b4d8be2018-06-13 11:53:02 +01004 * are made available under the terms of the Eclipse Public License v2.0
Ed Willink8435f242016-01-04 21:04:04 +00005 * which accompanies this distribution, and is available at
Ed Willink2b4d8be2018-06-13 11:53:02 +01006 * http://www.eclipse.org/legal/epl-v20.html
Ed Willink8435f242016-01-04 21:04:04 +00007 *
8 * Contributors:
9 * E.D.Willink - initial API and implementation
10 *******************************************************************************/
Ed Willink8db0fed2015-02-25 21:51:05 +000011grammar InternalBase;
12
13options {
14 superClass=AbstractInternalAntlrParser;
15 backtrack=true;
Ed Willinkc5a2bb02020-12-08 10:49:52 +000016
Ed Willink8db0fed2015-02-25 21:51:05 +000017}
18
19@lexer::header {
20package org.eclipse.ocl.xtext.base.parser.antlr.internal;
21
Ed Willink74831882016-12-08 12:24:05 +000022// Hack: Use our own Lexer superclass by means of import.
Ed Willink8db0fed2015-02-25 21:51:05 +000023// Currently there is no other way to specify the superclass for the lexer.
24import org.eclipse.xtext.parser.antlr.Lexer;
25}
26
27@parser::header {
Ed Willink74831882016-12-08 12:24:05 +000028package org.eclipse.ocl.xtext.base.parser.antlr.internal;
Ed Willink8db0fed2015-02-25 21:51:05 +000029
30import org.eclipse.xtext.*;
31import org.eclipse.xtext.parser.*;
32import org.eclipse.xtext.parser.impl.*;
33import org.eclipse.emf.ecore.util.EcoreUtil;
34import org.eclipse.emf.ecore.EObject;
35import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
36import org.eclipse.xtext.parser.antlr.XtextTokenStream;
37import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
38import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
39import org.eclipse.ocl.xtext.base.services.BaseGrammarAccess;
40
41}
42
43@parser::members {
44
45/*
46 This grammar contains a lot of empty actions to work around a bug in ANTLR.
47 Otherwise the ANTLR tool will create synpreds that cannot be compiled in some rare cases.
48*/
Ed Willink74831882016-12-08 12:24:05 +000049
Ed Willink8db0fed2015-02-25 21:51:05 +000050 private BaseGrammarAccess grammarAccess;
Ed Willink74831882016-12-08 12:24:05 +000051
Ed Willink8db0fed2015-02-25 21:51:05 +000052 public InternalBaseParser(TokenStream input, BaseGrammarAccess grammarAccess) {
53 this(input);
54 this.grammarAccess = grammarAccess;
55 registerRules(grammarAccess.getGrammar());
56 }
Ed Willink74831882016-12-08 12:24:05 +000057
Ed Willink8db0fed2015-02-25 21:51:05 +000058 @Override
59 protected String getFirstRuleName() {
Ed Willink74831882016-12-08 12:24:05 +000060 return "MultiplicityBoundsCS";
Ed Willink8db0fed2015-02-25 21:51:05 +000061 }
Ed Willink74831882016-12-08 12:24:05 +000062
Ed Willink8db0fed2015-02-25 21:51:05 +000063 @Override
64 protected BaseGrammarAccess getGrammarAccess() {
65 return grammarAccess;
66 }
67}
68
Ed Willink74831882016-12-08 12:24:05 +000069@rulecatch {
70 catch (RecognitionException re) {
71 recover(input,re);
Ed Willink8db0fed2015-02-25 21:51:05 +000072 appendSkippedTokens();
Ed Willink74831882016-12-08 12:24:05 +000073 }
Ed Willink8db0fed2015-02-25 21:51:05 +000074}
75
Ed Willinkc5a2bb02020-12-08 10:49:52 +000076
77
78
Ed Willink8db0fed2015-02-25 21:51:05 +000079// Entry rule entryRuleMultiplicityBoundsCS
Ed Willinkc5a2bb02020-12-08 10:49:52 +000080entryRuleMultiplicityBoundsCS returns [EObject current=null]
81 :
Ed Willink8db0fed2015-02-25 21:51:05 +000082 { newCompositeNode(grammarAccess.getMultiplicityBoundsCSRule()); }
Ed Willinkc5a2bb02020-12-08 10:49:52 +000083 iv_ruleMultiplicityBoundsCS=ruleMultiplicityBoundsCS
84 { $current=$iv_ruleMultiplicityBoundsCS.current; }
85 EOF
86;
Ed Willink8db0fed2015-02-25 21:51:05 +000087
88// Rule MultiplicityBoundsCS
Ed Willink74831882016-12-08 12:24:05 +000089ruleMultiplicityBoundsCS returns [EObject current=null]
Ed Willinkc5a2bb02020-12-08 10:49:52 +000090 @init { enterRule();
91 }
92 @after { leaveRule(); }:
93((
94(
95 {
96 newCompositeNode(grammarAccess.getMultiplicityBoundsCSAccess().getLowerBoundLOWERParserRuleCall_0_0());
97 }
98 lv_lowerBound_0_0=ruleLOWER {
99 if ($current==null) {
100 $current = createModelElementForParent(grammarAccess.getMultiplicityBoundsCSRule());
101 }
102 set(
103 $current,
104 "lowerBound",
105 lv_lowerBound_0_0,
106 "org.eclipse.ocl.xtext.base.Base.LOWER");
107 afterParserOrEnumRuleCall();
108 }
109
110)
111)( otherlv_1='..'
112 {
113 newLeafNode(otherlv_1, grammarAccess.getMultiplicityBoundsCSAccess().getFullStopFullStopKeyword_1_0());
114 }
115(
116(
117 {
118 newCompositeNode(grammarAccess.getMultiplicityBoundsCSAccess().getUpperBoundUPPERParserRuleCall_1_1_0());
119 }
120 lv_upperBound_2_0=ruleUPPER {
121 if ($current==null) {
122 $current = createModelElementForParent(grammarAccess.getMultiplicityBoundsCSRule());
123 }
124 set(
125 $current,
126 "upperBound",
127 lv_upperBound_2_0,
128 "org.eclipse.ocl.xtext.base.Base.UPPER");
129 afterParserOrEnumRuleCall();
130 }
131
132)
133))?)
Ed Willink8db0fed2015-02-25 21:51:05 +0000134;
135
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000136
137
138
139
Ed Willinkef313fe2015-05-16 16:21:02 +0100140// Entry rule entryRuleMultiplicityCS
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000141entryRuleMultiplicityCS returns [EObject current=null]
142 :
Ed Willinkef313fe2015-05-16 16:21:02 +0100143 { newCompositeNode(grammarAccess.getMultiplicityCSRule()); }
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000144 iv_ruleMultiplicityCS=ruleMultiplicityCS
145 { $current=$iv_ruleMultiplicityCS.current; }
146 EOF
147;
Ed Willinkef313fe2015-05-16 16:21:02 +0100148
149// Rule MultiplicityCS
Ed Willink74831882016-12-08 12:24:05 +0000150ruleMultiplicityCS returns [EObject current=null]
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000151 @init { enterRule();
152 }
153 @after { leaveRule(); }:
154( otherlv_0='['
155 {
156 newLeafNode(otherlv_0, grammarAccess.getMultiplicityCSAccess().getLeftSquareBracketKeyword_0());
157 }
158(
159 {
160 /* */
161 }
162 {
163 newCompositeNode(grammarAccess.getMultiplicityCSAccess().getMultiplicityBoundsCSParserRuleCall_1_0());
164 }
165 this_MultiplicityBoundsCS_1=ruleMultiplicityBoundsCS
166 {
167 $current = $this_MultiplicityBoundsCS_1.current;
168 afterParserOrEnumRuleCall();
169 }
170
171 |
172 {
173 /* */
174 }
175 {
176 newCompositeNode(grammarAccess.getMultiplicityCSAccess().getMultiplicityStringCSParserRuleCall_1_1());
177 }
178 this_MultiplicityStringCS_2=ruleMultiplicityStringCS
179 {
180 $current = $this_MultiplicityStringCS_2.current;
181 afterParserOrEnumRuleCall();
182 }
183)( otherlv_3='|?'
184 {
185 newLeafNode(otherlv_3, grammarAccess.getMultiplicityCSAccess().getVerticalLineQuestionMarkKeyword_2_0());
186 }
187
188 |(
189(
190 lv_isNullFree_4_0= '|1'
191 {
192 newLeafNode(lv_isNullFree_4_0, grammarAccess.getMultiplicityCSAccess().getIsNullFree1Keyword_2_1_0());
193 }
194
195 {
196 if ($current==null) {
197 $current = createModelElement(grammarAccess.getMultiplicityCSRule());
198 }
199 setWithLastConsumed($current, "isNullFree", true, "|1");
200 }
201
202)
203))? otherlv_5=']'
204 {
205 newLeafNode(otherlv_5, grammarAccess.getMultiplicityCSAccess().getRightSquareBracketKeyword_3());
206 }
207)
Ed Willinkef313fe2015-05-16 16:21:02 +0100208;
209
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000210
211
212
213
Ed Willink8db0fed2015-02-25 21:51:05 +0000214// Entry rule entryRuleMultiplicityStringCS
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000215entryRuleMultiplicityStringCS returns [EObject current=null]
216 :
Ed Willink8db0fed2015-02-25 21:51:05 +0000217 { newCompositeNode(grammarAccess.getMultiplicityStringCSRule()); }
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000218 iv_ruleMultiplicityStringCS=ruleMultiplicityStringCS
219 { $current=$iv_ruleMultiplicityStringCS.current; }
220 EOF
221;
Ed Willink8db0fed2015-02-25 21:51:05 +0000222
223// Rule MultiplicityStringCS
Ed Willink74831882016-12-08 12:24:05 +0000224ruleMultiplicityStringCS returns [EObject current=null]
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000225 @init { enterRule();
226 }
227 @after { leaveRule(); }:
228(
229(
230(
231 lv_stringBounds_0_1= '*'
232 {
233 newLeafNode(lv_stringBounds_0_1, grammarAccess.getMultiplicityStringCSAccess().getStringBoundsAsteriskKeyword_0_0());
234 }
235
236 {
237 if ($current==null) {
238 $current = createModelElement(grammarAccess.getMultiplicityStringCSRule());
239 }
240 setWithLastConsumed($current, "stringBounds", lv_stringBounds_0_1, null);
241 }
242
243 | lv_stringBounds_0_2= '+'
244 {
245 newLeafNode(lv_stringBounds_0_2, grammarAccess.getMultiplicityStringCSAccess().getStringBoundsPlusSignKeyword_0_1());
246 }
247
248 {
249 if ($current==null) {
250 $current = createModelElement(grammarAccess.getMultiplicityStringCSRule());
251 }
252 setWithLastConsumed($current, "stringBounds", lv_stringBounds_0_2, null);
253 }
254
255 | lv_stringBounds_0_3= '?'
256 {
257 newLeafNode(lv_stringBounds_0_3, grammarAccess.getMultiplicityStringCSAccess().getStringBoundsQuestionMarkKeyword_0_2());
258 }
259
260 {
261 if ($current==null) {
262 $current = createModelElement(grammarAccess.getMultiplicityStringCSRule());
263 }
264 setWithLastConsumed($current, "stringBounds", lv_stringBounds_0_3, null);
265 }
266
267)
268
269)
270)
Ed Willink8db0fed2015-02-25 21:51:05 +0000271;
272
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000273
274
275
276
Ed Willink8db0fed2015-02-25 21:51:05 +0000277// Entry rule entryRulePathNameCS
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000278entryRulePathNameCS returns [EObject current=null]
279 :
Ed Willink8db0fed2015-02-25 21:51:05 +0000280 { newCompositeNode(grammarAccess.getPathNameCSRule()); }
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000281 iv_rulePathNameCS=rulePathNameCS
282 { $current=$iv_rulePathNameCS.current; }
283 EOF
284;
Ed Willink8db0fed2015-02-25 21:51:05 +0000285
286// Rule PathNameCS
Ed Willink74831882016-12-08 12:24:05 +0000287rulePathNameCS returns [EObject current=null]
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000288 @init { enterRule();
289 }
290 @after { leaveRule(); }:
291((
292(
293 {
294 newCompositeNode(grammarAccess.getPathNameCSAccess().getOwnedPathElementsFirstPathElementCSParserRuleCall_0_0());
295 }
296 lv_ownedPathElements_0_0=ruleFirstPathElementCS {
297 if ($current==null) {
298 $current = createModelElementForParent(grammarAccess.getPathNameCSRule());
299 }
300 add(
301 $current,
302 "ownedPathElements",
303 lv_ownedPathElements_0_0,
304 "org.eclipse.ocl.xtext.base.Base.FirstPathElementCS");
305 afterParserOrEnumRuleCall();
306 }
307
308)
309)( otherlv_1='::'
310 {
311 newLeafNode(otherlv_1, grammarAccess.getPathNameCSAccess().getColonColonKeyword_1_0());
312 }
313(
314(
315 {
316 newCompositeNode(grammarAccess.getPathNameCSAccess().getOwnedPathElementsNextPathElementCSParserRuleCall_1_1_0());
317 }
318 lv_ownedPathElements_2_0=ruleNextPathElementCS {
319 if ($current==null) {
320 $current = createModelElementForParent(grammarAccess.getPathNameCSRule());
321 }
322 add(
323 $current,
324 "ownedPathElements",
325 lv_ownedPathElements_2_0,
326 "org.eclipse.ocl.xtext.base.Base.NextPathElementCS");
327 afterParserOrEnumRuleCall();
328 }
329
330)
331))*)
Ed Willink8db0fed2015-02-25 21:51:05 +0000332;
333
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000334
335
336
337
Ed Willink7c470422021-06-28 06:53:01 +0100338
339
Ed Willink8db0fed2015-02-25 21:51:05 +0000340// Entry rule entryRuleFirstPathElementCS
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000341entryRuleFirstPathElementCS returns [EObject current=null]
342 :
Ed Willink8db0fed2015-02-25 21:51:05 +0000343 { newCompositeNode(grammarAccess.getFirstPathElementCSRule()); }
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000344 iv_ruleFirstPathElementCS=ruleFirstPathElementCS
345 { $current=$iv_ruleFirstPathElementCS.current; }
346 EOF
347;
Ed Willink8db0fed2015-02-25 21:51:05 +0000348
349// Rule FirstPathElementCS
Ed Willink74831882016-12-08 12:24:05 +0000350ruleFirstPathElementCS returns [EObject current=null]
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000351 @init { enterRule();
352 }
353 @after { leaveRule(); }:
354(
355(
356 {
357 /* */
358 }
359 {
360 if ($current==null) {
361 $current = createModelElement(grammarAccess.getFirstPathElementCSRule());
362 }
363 }
364 {
365 newCompositeNode(grammarAccess.getFirstPathElementCSAccess().getReferredElementNamedElementCrossReference_0());
366 }
367 ruleUnrestrictedName {
368 afterParserOrEnumRuleCall();
369 }
370
371)
372)
Ed Willink8db0fed2015-02-25 21:51:05 +0000373;
374
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000375
376
377
378
Ed Willink8db0fed2015-02-25 21:51:05 +0000379// Entry rule entryRuleNextPathElementCS
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000380entryRuleNextPathElementCS returns [EObject current=null]
381 :
Ed Willink8db0fed2015-02-25 21:51:05 +0000382 { newCompositeNode(grammarAccess.getNextPathElementCSRule()); }
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000383 iv_ruleNextPathElementCS=ruleNextPathElementCS
384 { $current=$iv_ruleNextPathElementCS.current; }
385 EOF
386;
Ed Willink8db0fed2015-02-25 21:51:05 +0000387
388// Rule NextPathElementCS
Ed Willink74831882016-12-08 12:24:05 +0000389ruleNextPathElementCS returns [EObject current=null]
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000390 @init { enterRule();
391 }
392 @after { leaveRule(); }:
393(
394(
395 {
396 /* */
397 }
398 {
399 if ($current==null) {
400 $current = createModelElement(grammarAccess.getNextPathElementCSRule());
401 }
402 }
403 {
404 newCompositeNode(grammarAccess.getNextPathElementCSAccess().getReferredElementNamedElementCrossReference_0());
405 }
406 ruleUnreservedName {
407 afterParserOrEnumRuleCall();
408 }
409
410)
411)
Ed Willink8db0fed2015-02-25 21:51:05 +0000412;
413
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000414
415
416
417
Ed Willink8db0fed2015-02-25 21:51:05 +0000418// Entry rule entryRuleTemplateBindingCS
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000419entryRuleTemplateBindingCS returns [EObject current=null]
420 :
Ed Willink8db0fed2015-02-25 21:51:05 +0000421 { newCompositeNode(grammarAccess.getTemplateBindingCSRule()); }
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000422 iv_ruleTemplateBindingCS=ruleTemplateBindingCS
423 { $current=$iv_ruleTemplateBindingCS.current; }
424 EOF
425;
Ed Willink8db0fed2015-02-25 21:51:05 +0000426
427// Rule TemplateBindingCS
Ed Willink74831882016-12-08 12:24:05 +0000428ruleTemplateBindingCS returns [EObject current=null]
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000429 @init { enterRule();
430 }
431 @after { leaveRule(); }:
432((
433(
434 {
435 newCompositeNode(grammarAccess.getTemplateBindingCSAccess().getOwnedSubstitutionsTemplateParameterSubstitutionCSParserRuleCall_0_0());
436 }
437 lv_ownedSubstitutions_0_0=ruleTemplateParameterSubstitutionCS {
438 if ($current==null) {
439 $current = createModelElementForParent(grammarAccess.getTemplateBindingCSRule());
440 }
441 add(
442 $current,
443 "ownedSubstitutions",
444 lv_ownedSubstitutions_0_0,
445 "org.eclipse.ocl.xtext.base.Base.TemplateParameterSubstitutionCS");
446 afterParserOrEnumRuleCall();
447 }
448
449)
450)( otherlv_1=','
451 {
452 newLeafNode(otherlv_1, grammarAccess.getTemplateBindingCSAccess().getCommaKeyword_1_0());
453 }
454(
455(
456 {
457 newCompositeNode(grammarAccess.getTemplateBindingCSAccess().getOwnedSubstitutionsTemplateParameterSubstitutionCSParserRuleCall_1_1_0());
458 }
459 lv_ownedSubstitutions_2_0=ruleTemplateParameterSubstitutionCS {
460 if ($current==null) {
461 $current = createModelElementForParent(grammarAccess.getTemplateBindingCSRule());
462 }
463 add(
464 $current,
465 "ownedSubstitutions",
466 lv_ownedSubstitutions_2_0,
467 "org.eclipse.ocl.xtext.base.Base.TemplateParameterSubstitutionCS");
468 afterParserOrEnumRuleCall();
469 }
470
471)
472))*(
473(
474 {
475 newCompositeNode(grammarAccess.getTemplateBindingCSAccess().getOwnedMultiplicityMultiplicityCSParserRuleCall_2_0());
476 }
477 lv_ownedMultiplicity_3_0=ruleMultiplicityCS {
478 if ($current==null) {
479 $current = createModelElementForParent(grammarAccess.getTemplateBindingCSRule());
480 }
481 set(
482 $current,
483 "ownedMultiplicity",
484 lv_ownedMultiplicity_3_0,
485 "org.eclipse.ocl.xtext.base.Base.MultiplicityCS");
486 afterParserOrEnumRuleCall();
487 }
488
489)
490)?)
Ed Willink8db0fed2015-02-25 21:51:05 +0000491;
492
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000493
494
495
496
Ed Willink8db0fed2015-02-25 21:51:05 +0000497// Entry rule entryRuleTemplateParameterSubstitutionCS
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000498entryRuleTemplateParameterSubstitutionCS returns [EObject current=null]
499 :
Ed Willink8db0fed2015-02-25 21:51:05 +0000500 { newCompositeNode(grammarAccess.getTemplateParameterSubstitutionCSRule()); }
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000501 iv_ruleTemplateParameterSubstitutionCS=ruleTemplateParameterSubstitutionCS
502 { $current=$iv_ruleTemplateParameterSubstitutionCS.current; }
503 EOF
504;
Ed Willink8db0fed2015-02-25 21:51:05 +0000505
506// Rule TemplateParameterSubstitutionCS
Ed Willink74831882016-12-08 12:24:05 +0000507ruleTemplateParameterSubstitutionCS returns [EObject current=null]
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000508 @init { enterRule();
509 }
510 @after { leaveRule(); }:
511(
512(
513 {
514 newCompositeNode(grammarAccess.getTemplateParameterSubstitutionCSAccess().getOwnedActualParameterTypeRefCSParserRuleCall_0());
515 }
516 lv_ownedActualParameter_0_0=ruleTypeRefCS {
517 if ($current==null) {
518 $current = createModelElementForParent(grammarAccess.getTemplateParameterSubstitutionCSRule());
519 }
520 set(
521 $current,
522 "ownedActualParameter",
523 lv_ownedActualParameter_0_0,
524 "org.eclipse.ocl.xtext.base.Base.TypeRefCS");
525 afterParserOrEnumRuleCall();
526 }
527
528)
529)
Ed Willink8db0fed2015-02-25 21:51:05 +0000530;
531
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000532
533
534
535
536
537
Ed Willink8db0fed2015-02-25 21:51:05 +0000538// Entry rule entryRuleTypeParameterCS
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000539entryRuleTypeParameterCS returns [EObject current=null]
540 :
Ed Willink8db0fed2015-02-25 21:51:05 +0000541 { newCompositeNode(grammarAccess.getTypeParameterCSRule()); }
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000542 iv_ruleTypeParameterCS=ruleTypeParameterCS
543 { $current=$iv_ruleTypeParameterCS.current; }
544 EOF
545;
Ed Willink8db0fed2015-02-25 21:51:05 +0000546
547// Rule TypeParameterCS
Ed Willink74831882016-12-08 12:24:05 +0000548ruleTypeParameterCS returns [EObject current=null]
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000549 @init { enterRule();
550 }
551 @after { leaveRule(); }:
552((
553(
554 {
555 newCompositeNode(grammarAccess.getTypeParameterCSAccess().getNameUnrestrictedNameParserRuleCall_0_0());
556 }
557 lv_name_0_0=ruleUnrestrictedName {
558 if ($current==null) {
559 $current = createModelElementForParent(grammarAccess.getTypeParameterCSRule());
560 }
561 set(
562 $current,
563 "name",
564 lv_name_0_0,
565 "org.eclipse.ocl.xtext.base.Base.UnrestrictedName");
566 afterParserOrEnumRuleCall();
567 }
568
569)
570)( otherlv_1='extends'
571 {
572 newLeafNode(otherlv_1, grammarAccess.getTypeParameterCSAccess().getExtendsKeyword_1_0());
573 }
574(
575(
576 {
577 newCompositeNode(grammarAccess.getTypeParameterCSAccess().getOwnedExtendsTypedRefCSParserRuleCall_1_1_0());
578 }
579 lv_ownedExtends_2_0=ruleTypedRefCS {
580 if ($current==null) {
581 $current = createModelElementForParent(grammarAccess.getTypeParameterCSRule());
582 }
583 add(
584 $current,
585 "ownedExtends",
586 lv_ownedExtends_2_0,
587 "org.eclipse.ocl.xtext.base.Base.TypedRefCS");
588 afterParserOrEnumRuleCall();
589 }
590
591)
592)( otherlv_3='&&'
593 {
594 newLeafNode(otherlv_3, grammarAccess.getTypeParameterCSAccess().getAmpersandAmpersandKeyword_1_2_0());
595 }
596(
597(
598 {
599 newCompositeNode(grammarAccess.getTypeParameterCSAccess().getOwnedExtendsTypedRefCSParserRuleCall_1_2_1_0());
600 }
601 lv_ownedExtends_4_0=ruleTypedRefCS {
602 if ($current==null) {
603 $current = createModelElementForParent(grammarAccess.getTypeParameterCSRule());
604 }
605 add(
606 $current,
607 "ownedExtends",
608 lv_ownedExtends_4_0,
609 "org.eclipse.ocl.xtext.base.Base.TypedRefCS");
610 afterParserOrEnumRuleCall();
611 }
612
613)
614))*)?)
Ed Willink8db0fed2015-02-25 21:51:05 +0000615;
616
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000617
618
619
620
Ed Willink8db0fed2015-02-25 21:51:05 +0000621// Entry rule entryRuleTypeRefCS
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000622entryRuleTypeRefCS returns [EObject current=null]
623 :
Ed Willink8db0fed2015-02-25 21:51:05 +0000624 { newCompositeNode(grammarAccess.getTypeRefCSRule()); }
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000625 iv_ruleTypeRefCS=ruleTypeRefCS
626 { $current=$iv_ruleTypeRefCS.current; }
627 EOF
628;
Ed Willink8db0fed2015-02-25 21:51:05 +0000629
630// Rule TypeRefCS
Ed Willink74831882016-12-08 12:24:05 +0000631ruleTypeRefCS returns [EObject current=null]
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000632 @init { enterRule();
633 }
634 @after { leaveRule(); }:
635(
636 {
637 /* */
638 }
639 {
640 newCompositeNode(grammarAccess.getTypeRefCSAccess().getTypedRefCSParserRuleCall_0());
641 }
642 this_TypedRefCS_0=ruleTypedRefCS
643 {
644 $current = $this_TypedRefCS_0.current;
645 afterParserOrEnumRuleCall();
646 }
647
648 |
649 {
650 /* */
651 }
652 {
653 newCompositeNode(grammarAccess.getTypeRefCSAccess().getWildcardTypeRefCSParserRuleCall_1());
654 }
655 this_WildcardTypeRefCS_1=ruleWildcardTypeRefCS
656 {
657 $current = $this_WildcardTypeRefCS_1.current;
658 afterParserOrEnumRuleCall();
659 }
660)
Ed Willink8db0fed2015-02-25 21:51:05 +0000661;
662
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000663
664
665
666
Ed Willink8db0fed2015-02-25 21:51:05 +0000667// Entry rule entryRuleTypedRefCS
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000668entryRuleTypedRefCS returns [EObject current=null]
669 :
Ed Willink8db0fed2015-02-25 21:51:05 +0000670 { newCompositeNode(grammarAccess.getTypedRefCSRule()); }
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000671 iv_ruleTypedRefCS=ruleTypedRefCS
672 { $current=$iv_ruleTypedRefCS.current; }
673 EOF
674;
Ed Willink8db0fed2015-02-25 21:51:05 +0000675
676// Rule TypedRefCS
Ed Willink74831882016-12-08 12:24:05 +0000677ruleTypedRefCS returns [EObject current=null]
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000678 @init { enterRule();
679 }
680 @after { leaveRule(); }:
681
Ed Willink74831882016-12-08 12:24:05 +0000682 {
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000683 /* */
Ed Willink8db0fed2015-02-25 21:51:05 +0000684 }
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000685 {
686 newCompositeNode(grammarAccess.getTypedRefCSAccess().getTypedTypeRefCSParserRuleCall());
687 }
688 this_TypedTypeRefCS_0=ruleTypedTypeRefCS
689 {
690 $current = $this_TypedTypeRefCS_0.current;
691 afterParserOrEnumRuleCall();
692 }
693
Ed Willink8db0fed2015-02-25 21:51:05 +0000694;
695
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000696
697
698
699
Ed Willink8db0fed2015-02-25 21:51:05 +0000700// Entry rule entryRuleTypedTypeRefCS
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000701entryRuleTypedTypeRefCS returns [EObject current=null]
702 :
Ed Willink8db0fed2015-02-25 21:51:05 +0000703 { newCompositeNode(grammarAccess.getTypedTypeRefCSRule()); }
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000704 iv_ruleTypedTypeRefCS=ruleTypedTypeRefCS
705 { $current=$iv_ruleTypedTypeRefCS.current; }
706 EOF
707;
Ed Willink8db0fed2015-02-25 21:51:05 +0000708
709// Rule TypedTypeRefCS
Ed Willink74831882016-12-08 12:24:05 +0000710ruleTypedTypeRefCS returns [EObject current=null]
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000711 @init { enterRule();
712 }
713 @after { leaveRule(); }:
714((
715(
716 {
717 newCompositeNode(grammarAccess.getTypedTypeRefCSAccess().getOwnedPathNamePathNameCSParserRuleCall_0_0());
718 }
719 lv_ownedPathName_0_0=rulePathNameCS {
720 if ($current==null) {
721 $current = createModelElementForParent(grammarAccess.getTypedTypeRefCSRule());
722 }
723 set(
724 $current,
725 "ownedPathName",
726 lv_ownedPathName_0_0,
727 "org.eclipse.ocl.xtext.base.Base.PathNameCS");
728 afterParserOrEnumRuleCall();
729 }
730
731)
732)( otherlv_1='('
733 {
734 newLeafNode(otherlv_1, grammarAccess.getTypedTypeRefCSAccess().getLeftParenthesisKeyword_1_0());
735 }
736(
737(
738 {
739 newCompositeNode(grammarAccess.getTypedTypeRefCSAccess().getOwnedBindingTemplateBindingCSParserRuleCall_1_1_0());
740 }
741 lv_ownedBinding_2_0=ruleTemplateBindingCS {
742 if ($current==null) {
743 $current = createModelElementForParent(grammarAccess.getTypedTypeRefCSRule());
744 }
745 set(
746 $current,
747 "ownedBinding",
748 lv_ownedBinding_2_0,
749 "org.eclipse.ocl.xtext.base.Base.TemplateBindingCS");
750 afterParserOrEnumRuleCall();
751 }
752
753)
754) otherlv_3=')'
755 {
756 newLeafNode(otherlv_3, grammarAccess.getTypedTypeRefCSAccess().getRightParenthesisKeyword_1_2());
757 }
758)?)
Ed Willink8db0fed2015-02-25 21:51:05 +0000759;
760
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000761
762
763
764
Ed Willink8db0fed2015-02-25 21:51:05 +0000765// Entry rule entryRuleUnreservedName
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000766entryRuleUnreservedName returns [String current=null]
767 :
Ed Willink74831882016-12-08 12:24:05 +0000768 { newCompositeNode(grammarAccess.getUnreservedNameRule()); }
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000769 iv_ruleUnreservedName=ruleUnreservedName
770 { $current=$iv_ruleUnreservedName.current.getText(); }
771 EOF
772;
Ed Willink8db0fed2015-02-25 21:51:05 +0000773
774// Rule UnreservedName
Ed Willink74831882016-12-08 12:24:05 +0000775ruleUnreservedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000776 @init { enterRule();
777 }
778 @after { leaveRule(); }:
779
780 {
781 newCompositeNode(grammarAccess.getUnreservedNameAccess().getUnrestrictedNameParserRuleCall());
782 }
783 this_UnrestrictedName_0=ruleUnrestrictedName {
Ed Willink8db0fed2015-02-25 21:51:05 +0000784 $current.merge(this_UnrestrictedName_0);
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000785 }
786
787 {
788 afterParserOrEnumRuleCall();
789 }
790
791 ;
792
793
794
795
Ed Willink8db0fed2015-02-25 21:51:05 +0000796
797// Entry rule entryRuleUnrestrictedName
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000798entryRuleUnrestrictedName returns [String current=null]
799 :
Ed Willink74831882016-12-08 12:24:05 +0000800 { newCompositeNode(grammarAccess.getUnrestrictedNameRule()); }
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000801 iv_ruleUnrestrictedName=ruleUnrestrictedName
802 { $current=$iv_ruleUnrestrictedName.current.getText(); }
803 EOF
804;
Ed Willink8db0fed2015-02-25 21:51:05 +0000805
806// Rule UnrestrictedName
Ed Willink74831882016-12-08 12:24:05 +0000807ruleUnrestrictedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000808 @init { enterRule();
809 }
810 @after { leaveRule(); }:
811
812 {
813 newCompositeNode(grammarAccess.getUnrestrictedNameAccess().getIdentifierParserRuleCall());
814 }
815 this_Identifier_0=ruleIdentifier {
Ed Willink8db0fed2015-02-25 21:51:05 +0000816 $current.merge(this_Identifier_0);
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000817 }
818
819 {
820 afterParserOrEnumRuleCall();
821 }
822
823 ;
824
825
826
827
Ed Willink8db0fed2015-02-25 21:51:05 +0000828
829// Entry rule entryRuleWildcardTypeRefCS
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000830entryRuleWildcardTypeRefCS returns [EObject current=null]
831 :
Ed Willink8db0fed2015-02-25 21:51:05 +0000832 { newCompositeNode(grammarAccess.getWildcardTypeRefCSRule()); }
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000833 iv_ruleWildcardTypeRefCS=ruleWildcardTypeRefCS
834 { $current=$iv_ruleWildcardTypeRefCS.current; }
835 EOF
836;
Ed Willink8db0fed2015-02-25 21:51:05 +0000837
838// Rule WildcardTypeRefCS
Ed Willink74831882016-12-08 12:24:05 +0000839ruleWildcardTypeRefCS returns [EObject current=null]
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000840 @init { enterRule();
841 }
842 @after { leaveRule(); }:
843((
844 {
845 /* */
846 }
847 {
848 $current = forceCreateModelElement(
849 grammarAccess.getWildcardTypeRefCSAccess().getWildcardTypeRefCSAction_0(),
850 $current);
851 }
852) otherlv_1='?'
853 {
854 newLeafNode(otherlv_1, grammarAccess.getWildcardTypeRefCSAccess().getQuestionMarkKeyword_1());
855 }
856( otherlv_2='extends'
857 {
858 newLeafNode(otherlv_2, grammarAccess.getWildcardTypeRefCSAccess().getExtendsKeyword_2_0());
859 }
860(
861(
Ed Willink74831882016-12-08 12:24:05 +0000862 {
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000863 newCompositeNode(grammarAccess.getWildcardTypeRefCSAccess().getOwnedExtendsTypedRefCSParserRuleCall_2_1_0());
864 }
865 lv_ownedExtends_3_0=ruleTypedRefCS {
866 if ($current==null) {
867 $current = createModelElementForParent(grammarAccess.getWildcardTypeRefCSRule());
868 }
869 set(
870 $current,
871 "ownedExtends",
872 lv_ownedExtends_3_0,
873 "org.eclipse.ocl.xtext.base.Base.TypedRefCS");
874 afterParserOrEnumRuleCall();
875 }
876
877)
878))?)
Ed Willink8db0fed2015-02-25 21:51:05 +0000879;
880
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000881
882
883
884
Ed Willink8db0fed2015-02-25 21:51:05 +0000885// Entry rule entryRuleID
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000886entryRuleID returns [String current=null]
887 :
Ed Willink74831882016-12-08 12:24:05 +0000888 { newCompositeNode(grammarAccess.getIDRule()); }
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000889 iv_ruleID=ruleID
890 { $current=$iv_ruleID.current.getText(); }
891 EOF
892;
Ed Willink8db0fed2015-02-25 21:51:05 +0000893
894// Rule ID
Ed Willink74831882016-12-08 12:24:05 +0000895ruleID returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000896 @init { enterRule();
897 }
898 @after { leaveRule(); }:
899( this_SIMPLE_ID_0=RULE_SIMPLE_ID {
900 $current.merge(this_SIMPLE_ID_0);
901 }
902
903 {
904 newLeafNode(this_SIMPLE_ID_0, grammarAccess.getIDAccess().getSIMPLE_IDTerminalRuleCall_0());
905 }
906
907 | this_ESCAPED_ID_1=RULE_ESCAPED_ID {
908 $current.merge(this_ESCAPED_ID_1);
909 }
910
911 {
912 newLeafNode(this_ESCAPED_ID_1, grammarAccess.getIDAccess().getESCAPED_IDTerminalRuleCall_1());
913 }
914)
915 ;
916
917
918
919
Ed Willink8db0fed2015-02-25 21:51:05 +0000920
921// Entry rule entryRuleIdentifier
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000922entryRuleIdentifier returns [String current=null]
923 :
Ed Willink74831882016-12-08 12:24:05 +0000924 { newCompositeNode(grammarAccess.getIdentifierRule()); }
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000925 iv_ruleIdentifier=ruleIdentifier
926 { $current=$iv_ruleIdentifier.current.getText(); }
927 EOF
928;
Ed Willink8db0fed2015-02-25 21:51:05 +0000929
930// Rule Identifier
Ed Willink74831882016-12-08 12:24:05 +0000931ruleIdentifier returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000932 @init { enterRule();
933 }
934 @after { leaveRule(); }:
935
936 {
937 newCompositeNode(grammarAccess.getIdentifierAccess().getIDParserRuleCall());
938 }
939 this_ID_0=ruleID {
Ed Willink8db0fed2015-02-25 21:51:05 +0000940 $current.merge(this_ID_0);
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000941 }
942
943 {
944 afterParserOrEnumRuleCall();
945 }
946
947 ;
948
949
950
951
Ed Willink8db0fed2015-02-25 21:51:05 +0000952
953// Entry rule entryRuleLOWER
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000954entryRuleLOWER returns [String current=null]
955 :
Ed Willink74831882016-12-08 12:24:05 +0000956 { newCompositeNode(grammarAccess.getLOWERRule()); }
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000957 iv_ruleLOWER=ruleLOWER
958 { $current=$iv_ruleLOWER.current.getText(); }
959 EOF
960;
Ed Willink8db0fed2015-02-25 21:51:05 +0000961
962// Rule LOWER
Ed Willink74831882016-12-08 12:24:05 +0000963ruleLOWER returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000964 @init { enterRule();
965 }
966 @after { leaveRule(); }:
967 this_INT_0=RULE_INT {
Ed Willink8db0fed2015-02-25 21:51:05 +0000968 $current.merge(this_INT_0);
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000969 }
970
971 {
972 newLeafNode(this_INT_0, grammarAccess.getLOWERAccess().getINTTerminalRuleCall());
973 }
974
975 ;
976
977
978
979
980
981
982
983
Ed Willink8db0fed2015-02-25 21:51:05 +0000984
985// Entry rule entryRuleUPPER
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000986entryRuleUPPER returns [String current=null]
987 :
Ed Willink74831882016-12-08 12:24:05 +0000988 { newCompositeNode(grammarAccess.getUPPERRule()); }
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000989 iv_ruleUPPER=ruleUPPER
990 { $current=$iv_ruleUPPER.current.getText(); }
991 EOF
992;
Ed Willink8db0fed2015-02-25 21:51:05 +0000993
994// Rule UPPER
Ed Willink74831882016-12-08 12:24:05 +0000995ruleUPPER returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
Ed Willinkc5a2bb02020-12-08 10:49:52 +0000996 @init { enterRule();
997 }
998 @after { leaveRule(); }:
999( this_INT_0=RULE_INT {
1000 $current.merge(this_INT_0);
1001 }
1002
1003 {
1004 newLeafNode(this_INT_0, grammarAccess.getUPPERAccess().getINTTerminalRuleCall_0());
1005 }
1006
1007 |
1008 kw='*'
1009 {
1010 $current.merge(kw);
1011 newLeafNode(kw, grammarAccess.getUPPERAccess().getAsteriskKeyword_1());
1012 }
1013)
1014 ;
1015
1016
1017
1018
1019
1020
Ed Willink8db0fed2015-02-25 21:51:05 +00001021
1022fragment RULE_ESCAPED_CHARACTER : '\\' ('b'|'t'|'n'|'f'|'r'|'u'|'"'|'\''|'\\');
1023
1024fragment RULE_LETTER_CHARACTER : ('a'..'z'|'A'..'Z'|'_');
1025
1026RULE_DOUBLE_QUOTED_STRING : '"' (RULE_ESCAPED_CHARACTER|~(('\\'|'"')))* '"';
1027
1028RULE_SINGLE_QUOTED_STRING : '\'' (RULE_ESCAPED_CHARACTER|~(('\\'|'\'')))* '\'';
1029
1030RULE_ML_SINGLE_QUOTED_STRING : '/\'' ( options {greedy=false;} : . )*'\'/';
1031
1032RULE_SIMPLE_ID : RULE_LETTER_CHARACTER (RULE_LETTER_CHARACTER|'0'..'9')*;
1033
1034RULE_ESCAPED_ID : '_' RULE_SINGLE_QUOTED_STRING;
1035
1036RULE_INT : ('0'..'9')+;
1037
1038RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';
1039
1040RULE_SL_COMMENT : '--' ~(('\n'|'\r'))* ('\r'? '\n')?;
1041
1042RULE_WS : (' '|'\t'|'\r'|'\n')+;
1043
1044RULE_ANY_OTHER : .;
Ed Willinkc5a2bb02020-12-08 10:49:52 +00001045
1046