Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 30e59ea61af034a2315507899222cd0971285fc7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
/*
* generated by Xtext
*/
package org.eclipse.etrice.core.common.services;

import com.google.inject.Singleton;
import com.google.inject.Inject;

import java.util.List;

import org.eclipse.xtext.*;
import org.eclipse.xtext.service.GrammarProvider;
import org.eclipse.xtext.service.AbstractElementFinder.*;

import org.eclipse.xtext.common.services.TerminalsGrammarAccess;

@Singleton
public class BaseGrammarAccess extends AbstractGrammarElementFinder {
	
	
	public class LiteralArrayElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "LiteralArray");
		private final Group cGroup = (Group)rule.eContents().get(1);
		private final Assignment cLiteralsAssignment_0 = (Assignment)cGroup.eContents().get(0);
		private final RuleCall cLiteralsLiteralParserRuleCall_0_0 = (RuleCall)cLiteralsAssignment_0.eContents().get(0);
		private final Group cGroup_1 = (Group)cGroup.eContents().get(1);
		private final Keyword cCommaKeyword_1_0 = (Keyword)cGroup_1.eContents().get(0);
		private final Assignment cLiteralsAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1);
		private final RuleCall cLiteralsLiteralParserRuleCall_1_1_0 = (RuleCall)cLiteralsAssignment_1_1.eContents().get(0);
		
		//LiteralArray:
		//
		//	literals+=Literal ("," literals+=Literal)*;
		public ParserRule getRule() { return rule; }

		//literals+=Literal ("," literals+=Literal)*
		public Group getGroup() { return cGroup; }

		//literals+=Literal
		public Assignment getLiteralsAssignment_0() { return cLiteralsAssignment_0; }

		//Literal
		public RuleCall getLiteralsLiteralParserRuleCall_0_0() { return cLiteralsLiteralParserRuleCall_0_0; }

		//("," literals+=Literal)*
		public Group getGroup_1() { return cGroup_1; }

		//","
		public Keyword getCommaKeyword_1_0() { return cCommaKeyword_1_0; }

		//literals+=Literal
		public Assignment getLiteralsAssignment_1_1() { return cLiteralsAssignment_1_1; }

		//Literal
		public RuleCall getLiteralsLiteralParserRuleCall_1_1_0() { return cLiteralsLiteralParserRuleCall_1_1_0; }
	}

	public class LiteralElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Literal");
		private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
		private final RuleCall cBooleanLiteralParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
		private final RuleCall cNumberLiteralParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
		private final RuleCall cStringLiteralParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2);
		
		//// Value Types for Attributes
		//
		//Literal:
		//
		//	BooleanLiteral | NumberLiteral | StringLiteral;
		public ParserRule getRule() { return rule; }

		//BooleanLiteral | NumberLiteral | StringLiteral
		public Alternatives getAlternatives() { return cAlternatives; }

		//BooleanLiteral
		public RuleCall getBooleanLiteralParserRuleCall_0() { return cBooleanLiteralParserRuleCall_0; }

		//NumberLiteral
		public RuleCall getNumberLiteralParserRuleCall_1() { return cNumberLiteralParserRuleCall_1; }

		//StringLiteral
		public RuleCall getStringLiteralParserRuleCall_2() { return cStringLiteralParserRuleCall_2; }
	}

	public class BooleanLiteralElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "BooleanLiteral");
		private final Group cGroup = (Group)rule.eContents().get(1);
		private final Action cBooleanLiteralAction_0 = (Action)cGroup.eContents().get(0);
		private final Alternatives cAlternatives_1 = (Alternatives)cGroup.eContents().get(1);
		private final Keyword cFalseKeyword_1_0 = (Keyword)cAlternatives_1.eContents().get(0);
		private final Assignment cIsTrueAssignment_1_1 = (Assignment)cAlternatives_1.eContents().get(1);
		private final Keyword cIsTrueTrueKeyword_1_1_0 = (Keyword)cIsTrueAssignment_1_1.eContents().get(0);
		
		//BooleanLiteral:
		//
		//	{BooleanLiteral} ("false" | isTrue?="true");
		public ParserRule getRule() { return rule; }

		//{BooleanLiteral} ("false" | isTrue?="true")
		public Group getGroup() { return cGroup; }

		//{BooleanLiteral}
		public Action getBooleanLiteralAction_0() { return cBooleanLiteralAction_0; }

		//"false" | isTrue?="true"
		public Alternatives getAlternatives_1() { return cAlternatives_1; }

		//"false"
		public Keyword getFalseKeyword_1_0() { return cFalseKeyword_1_0; }

		//isTrue?="true"
		public Assignment getIsTrueAssignment_1_1() { return cIsTrueAssignment_1_1; }

		//"true"
		public Keyword getIsTrueTrueKeyword_1_1_0() { return cIsTrueTrueKeyword_1_1_0; }
	}

	public class NumberLiteralElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "NumberLiteral");
		private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
		private final RuleCall cIntLiteralParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
		private final RuleCall cRealLiteralParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
		
		//NumberLiteral:
		//
		//	IntLiteral | RealLiteral;
		public ParserRule getRule() { return rule; }

		//IntLiteral | RealLiteral
		public Alternatives getAlternatives() { return cAlternatives; }

		//IntLiteral
		public RuleCall getIntLiteralParserRuleCall_0() { return cIntLiteralParserRuleCall_0; }

		//RealLiteral
		public RuleCall getRealLiteralParserRuleCall_1() { return cRealLiteralParserRuleCall_1; }
	}

	public class RealLiteralElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "RealLiteral");
		private final Group cGroup = (Group)rule.eContents().get(1);
		private final Action cRealLiteralAction_0 = (Action)cGroup.eContents().get(0);
		private final Assignment cValueAssignment_1 = (Assignment)cGroup.eContents().get(1);
		private final RuleCall cValueRealParserRuleCall_1_0 = (RuleCall)cValueAssignment_1.eContents().get(0);
		
		//RealLiteral:
		//
		//	{RealLiteral} value=Real;
		public ParserRule getRule() { return rule; }

		//{RealLiteral} value=Real
		public Group getGroup() { return cGroup; }

		//{RealLiteral}
		public Action getRealLiteralAction_0() { return cRealLiteralAction_0; }

		//value=Real
		public Assignment getValueAssignment_1() { return cValueAssignment_1; }

		//Real
		public RuleCall getValueRealParserRuleCall_1_0() { return cValueRealParserRuleCall_1_0; }
	}

	public class IntLiteralElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "IntLiteral");
		private final Group cGroup = (Group)rule.eContents().get(1);
		private final Action cIntLiteralAction_0 = (Action)cGroup.eContents().get(0);
		private final Assignment cValueAssignment_1 = (Assignment)cGroup.eContents().get(1);
		private final RuleCall cValueIntegerParserRuleCall_1_0 = (RuleCall)cValueAssignment_1.eContents().get(0);
		
		//IntLiteral:
		//
		//	{IntLiteral} value=Integer;
		public ParserRule getRule() { return rule; }

		//{IntLiteral} value=Integer
		public Group getGroup() { return cGroup; }

		//{IntLiteral}
		public Action getIntLiteralAction_0() { return cIntLiteralAction_0; }

		//value=Integer
		public Assignment getValueAssignment_1() { return cValueAssignment_1; }

		//Integer
		public RuleCall getValueIntegerParserRuleCall_1_0() { return cValueIntegerParserRuleCall_1_0; }
	}

	public class StringLiteralElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "StringLiteral");
		private final Group cGroup = (Group)rule.eContents().get(1);
		private final Action cStringLiteralAction_0 = (Action)cGroup.eContents().get(0);
		private final Assignment cValueAssignment_1 = (Assignment)cGroup.eContents().get(1);
		private final RuleCall cValueSTRINGTerminalRuleCall_1_0 = (RuleCall)cValueAssignment_1.eContents().get(0);
		
		//StringLiteral:
		//
		//	{StringLiteral} value=STRING;
		public ParserRule getRule() { return rule; }

		//{StringLiteral} value=STRING
		public Group getGroup() { return cGroup; }

		//{StringLiteral}
		public Action getStringLiteralAction_0() { return cStringLiteralAction_0; }

		//value=STRING
		public Assignment getValueAssignment_1() { return cValueAssignment_1; }

		//STRING
		public RuleCall getValueSTRINGTerminalRuleCall_1_0() { return cValueSTRINGTerminalRuleCall_1_0; }
	}

	public class IntegerElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Integer");
		private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
		private final RuleCall cSignedIntegerParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
		private final RuleCall cHexadecimalParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
		
		//Integer returns ecore::ELong:
		//
		//	SignedInteger | Hexadecimal;
		public ParserRule getRule() { return rule; }

		//SignedInteger | Hexadecimal
		public Alternatives getAlternatives() { return cAlternatives; }

		//SignedInteger
		public RuleCall getSignedIntegerParserRuleCall_0() { return cSignedIntegerParserRuleCall_0; }

		//Hexadecimal
		public RuleCall getHexadecimalParserRuleCall_1() { return cHexadecimalParserRuleCall_1; }
	}

	public class SignedIntegerElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "SignedInteger");
		private final Group cGroup = (Group)rule.eContents().get(1);
		private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0);
		private final Keyword cPlusSignKeyword_0_0 = (Keyword)cAlternatives_0.eContents().get(0);
		private final Keyword cHyphenMinusKeyword_0_1 = (Keyword)cAlternatives_0.eContents().get(1);
		private final RuleCall cINTTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1);
		
		//SignedInteger hidden():
		//
		//	("+" | "-")? INT;
		public ParserRule getRule() { return rule; }

		//("+" | "-")? INT
		public Group getGroup() { return cGroup; }

		//("+" | "-")?
		public Alternatives getAlternatives_0() { return cAlternatives_0; }

		//"+"
		public Keyword getPlusSignKeyword_0_0() { return cPlusSignKeyword_0_0; }

		//"-"
		public Keyword getHyphenMinusKeyword_0_1() { return cHyphenMinusKeyword_0_1; }

		//INT
		public RuleCall getINTTerminalRuleCall_1() { return cINTTerminalRuleCall_1; }
	}

	public class HexadecimalElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Hexadecimal");
		private final RuleCall cHEXTerminalRuleCall = (RuleCall)rule.eContents().get(1);
		
		//Hexadecimal hidden():
		//
		//	HEX;
		public ParserRule getRule() { return rule; }

		//HEX
		public RuleCall getHEXTerminalRuleCall() { return cHEXTerminalRuleCall; }
	}

	public class RealElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Real");
		private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
		private final RuleCall cDecimalParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
		private final RuleCall cDotDecimalParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
		private final RuleCall cDecimalDotParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2);
		private final RuleCall cDecimalExpParserRuleCall_3 = (RuleCall)cAlternatives.eContents().get(3);
		
		//Real returns ecore::EDouble:
		//
		//	Decimal | DotDecimal | DecimalDot | DecimalExp;
		public ParserRule getRule() { return rule; }

		//Decimal | DotDecimal | DecimalDot | DecimalExp
		public Alternatives getAlternatives() { return cAlternatives; }

		//Decimal
		public RuleCall getDecimalParserRuleCall_0() { return cDecimalParserRuleCall_0; }

		//DotDecimal
		public RuleCall getDotDecimalParserRuleCall_1() { return cDotDecimalParserRuleCall_1; }

		//DecimalDot
		public RuleCall getDecimalDotParserRuleCall_2() { return cDecimalDotParserRuleCall_2; }

		//DecimalExp
		public RuleCall getDecimalExpParserRuleCall_3() { return cDecimalExpParserRuleCall_3; }
	}

	public class DecimalElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Decimal");
		private final Group cGroup = (Group)rule.eContents().get(1);
		private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0);
		private final Keyword cPlusSignKeyword_0_0 = (Keyword)cAlternatives_0.eContents().get(0);
		private final Keyword cHyphenMinusKeyword_0_1 = (Keyword)cAlternatives_0.eContents().get(1);
		private final RuleCall cINTTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1);
		private final Keyword cFullStopKeyword_2 = (Keyword)cGroup.eContents().get(2);
		private final RuleCall cINTTerminalRuleCall_3 = (RuleCall)cGroup.eContents().get(3);
		
		//Decimal hidden():
		//
		//	("+" | "-")? INT "." INT;
		public ParserRule getRule() { return rule; }

		//("+" | "-")? INT "." INT
		public Group getGroup() { return cGroup; }

		//("+" | "-")?
		public Alternatives getAlternatives_0() { return cAlternatives_0; }

		//"+"
		public Keyword getPlusSignKeyword_0_0() { return cPlusSignKeyword_0_0; }

		//"-"
		public Keyword getHyphenMinusKeyword_0_1() { return cHyphenMinusKeyword_0_1; }

		//INT
		public RuleCall getINTTerminalRuleCall_1() { return cINTTerminalRuleCall_1; }

		//"."
		public Keyword getFullStopKeyword_2() { return cFullStopKeyword_2; }

		//INT
		public RuleCall getINTTerminalRuleCall_3() { return cINTTerminalRuleCall_3; }
	}

	public class DotDecimalElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "DotDecimal");
		private final Group cGroup = (Group)rule.eContents().get(1);
		private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0);
		private final Keyword cPlusSignKeyword_0_0 = (Keyword)cAlternatives_0.eContents().get(0);
		private final Keyword cHyphenMinusKeyword_0_1 = (Keyword)cAlternatives_0.eContents().get(1);
		private final Keyword cFullStopKeyword_1 = (Keyword)cGroup.eContents().get(1);
		private final RuleCall cINTTerminalRuleCall_2 = (RuleCall)cGroup.eContents().get(2);
		
		//DotDecimal hidden():
		//
		//	("+" | "-")? "." INT;
		public ParserRule getRule() { return rule; }

		//("+" | "-")? "." INT
		public Group getGroup() { return cGroup; }

		//("+" | "-")?
		public Alternatives getAlternatives_0() { return cAlternatives_0; }

		//"+"
		public Keyword getPlusSignKeyword_0_0() { return cPlusSignKeyword_0_0; }

		//"-"
		public Keyword getHyphenMinusKeyword_0_1() { return cHyphenMinusKeyword_0_1; }

		//"."
		public Keyword getFullStopKeyword_1() { return cFullStopKeyword_1; }

		//INT
		public RuleCall getINTTerminalRuleCall_2() { return cINTTerminalRuleCall_2; }
	}

	public class DecimalDotElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "DecimalDot");
		private final Group cGroup = (Group)rule.eContents().get(1);
		private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0);
		private final Keyword cPlusSignKeyword_0_0 = (Keyword)cAlternatives_0.eContents().get(0);
		private final Keyword cHyphenMinusKeyword_0_1 = (Keyword)cAlternatives_0.eContents().get(1);
		private final RuleCall cINTTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1);
		private final Keyword cFullStopKeyword_2 = (Keyword)cGroup.eContents().get(2);
		
		//DecimalDot hidden():
		//
		//	("+" | "-")? INT ".";
		public ParserRule getRule() { return rule; }

		//("+" | "-")? INT "."
		public Group getGroup() { return cGroup; }

		//("+" | "-")?
		public Alternatives getAlternatives_0() { return cAlternatives_0; }

		//"+"
		public Keyword getPlusSignKeyword_0_0() { return cPlusSignKeyword_0_0; }

		//"-"
		public Keyword getHyphenMinusKeyword_0_1() { return cHyphenMinusKeyword_0_1; }

		//INT
		public RuleCall getINTTerminalRuleCall_1() { return cINTTerminalRuleCall_1; }

		//"."
		public Keyword getFullStopKeyword_2() { return cFullStopKeyword_2; }
	}

	public class DecimalExpElements extends AbstractParserRuleElementFinder {
		private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "DecimalExp");
		private final Group cGroup = (Group)rule.eContents().get(1);
		private final Alternatives cAlternatives_0 = (Alternatives)cGroup.eContents().get(0);
		private final Keyword cPlusSignKeyword_0_0 = (Keyword)cAlternatives_0.eContents().get(0);
		private final Keyword cHyphenMinusKeyword_0_1 = (Keyword)cAlternatives_0.eContents().get(1);
		private final RuleCall cINTTerminalRuleCall_1 = (RuleCall)cGroup.eContents().get(1);
		private final Keyword cFullStopKeyword_2 = (Keyword)cGroup.eContents().get(2);
		private final RuleCall cINTTerminalRuleCall_3 = (RuleCall)cGroup.eContents().get(3);
		private final RuleCall cEXPTerminalRuleCall_4 = (RuleCall)cGroup.eContents().get(4);
		
		//DecimalExp hidden():
		//
		//	("+" | "-")? INT "." INT EXP;
		public ParserRule getRule() { return rule; }

		//("+" | "-")? INT "." INT EXP
		public Group getGroup() { return cGroup; }

		//("+" | "-")?
		public Alternatives getAlternatives_0() { return cAlternatives_0; }

		//"+"
		public Keyword getPlusSignKeyword_0_0() { return cPlusSignKeyword_0_0; }

		//"-"
		public Keyword getHyphenMinusKeyword_0_1() { return cHyphenMinusKeyword_0_1; }

		//INT
		public RuleCall getINTTerminalRuleCall_1() { return cINTTerminalRuleCall_1; }

		//"."
		public Keyword getFullStopKeyword_2() { return cFullStopKeyword_2; }

		//INT
		public RuleCall getINTTerminalRuleCall_3() { return cINTTerminalRuleCall_3; }

		//EXP
		public RuleCall getEXPTerminalRuleCall_4() { return cEXPTerminalRuleCall_4; }
	}
	
	
	private LiteralArrayElements pLiteralArray;
	private LiteralElements pLiteral;
	private BooleanLiteralElements pBooleanLiteral;
	private NumberLiteralElements pNumberLiteral;
	private RealLiteralElements pRealLiteral;
	private IntLiteralElements pIntLiteral;
	private StringLiteralElements pStringLiteral;
	private IntegerElements pInteger;
	private SignedIntegerElements pSignedInteger;
	private HexadecimalElements pHexadecimal;
	private RealElements pReal;
	private DecimalElements pDecimal;
	private DotDecimalElements pDotDecimal;
	private DecimalDotElements pDecimalDot;
	private DecimalExpElements pDecimalExp;
	private TerminalRule tEXP;
	private TerminalRule tHEX;
	
	private final Grammar grammar;

	private TerminalsGrammarAccess gaTerminals;

	@Inject
	public BaseGrammarAccess(GrammarProvider grammarProvider,
		TerminalsGrammarAccess gaTerminals) {
		this.grammar = internalFindGrammar(grammarProvider);
		this.gaTerminals = gaTerminals;
	}
	
	protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
		Grammar grammar = grammarProvider.getGrammar(this);
		while (grammar != null) {
			if ("org.eclipse.etrice.core.common.Base".equals(grammar.getName())) {
				return grammar;
			}
			List<Grammar> grammars = grammar.getUsedGrammars();
			if (!grammars.isEmpty()) {
				grammar = grammars.iterator().next();
			} else {
				return null;
			}
		}
		return grammar;
	}
	
	
	public Grammar getGrammar() {
		return grammar;
	}
	

	public TerminalsGrammarAccess getTerminalsGrammarAccess() {
		return gaTerminals;
	}

	
	//LiteralArray:
	//
	//	literals+=Literal ("," literals+=Literal)*;
	public LiteralArrayElements getLiteralArrayAccess() {
		return (pLiteralArray != null) ? pLiteralArray : (pLiteralArray = new LiteralArrayElements());
	}
	
	public ParserRule getLiteralArrayRule() {
		return getLiteralArrayAccess().getRule();
	}

	//// Value Types for Attributes
	//
	//Literal:
	//
	//	BooleanLiteral | NumberLiteral | StringLiteral;
	public LiteralElements getLiteralAccess() {
		return (pLiteral != null) ? pLiteral : (pLiteral = new LiteralElements());
	}
	
	public ParserRule getLiteralRule() {
		return getLiteralAccess().getRule();
	}

	//BooleanLiteral:
	//
	//	{BooleanLiteral} ("false" | isTrue?="true");
	public BooleanLiteralElements getBooleanLiteralAccess() {
		return (pBooleanLiteral != null) ? pBooleanLiteral : (pBooleanLiteral = new BooleanLiteralElements());
	}
	
	public ParserRule getBooleanLiteralRule() {
		return getBooleanLiteralAccess().getRule();
	}

	//NumberLiteral:
	//
	//	IntLiteral | RealLiteral;
	public NumberLiteralElements getNumberLiteralAccess() {
		return (pNumberLiteral != null) ? pNumberLiteral : (pNumberLiteral = new NumberLiteralElements());
	}
	
	public ParserRule getNumberLiteralRule() {
		return getNumberLiteralAccess().getRule();
	}

	//RealLiteral:
	//
	//	{RealLiteral} value=Real;
	public RealLiteralElements getRealLiteralAccess() {
		return (pRealLiteral != null) ? pRealLiteral : (pRealLiteral = new RealLiteralElements());
	}
	
	public ParserRule getRealLiteralRule() {
		return getRealLiteralAccess().getRule();
	}

	//IntLiteral:
	//
	//	{IntLiteral} value=Integer;
	public IntLiteralElements getIntLiteralAccess() {
		return (pIntLiteral != null) ? pIntLiteral : (pIntLiteral = new IntLiteralElements());
	}
	
	public ParserRule getIntLiteralRule() {
		return getIntLiteralAccess().getRule();
	}

	//StringLiteral:
	//
	//	{StringLiteral} value=STRING;
	public StringLiteralElements getStringLiteralAccess() {
		return (pStringLiteral != null) ? pStringLiteral : (pStringLiteral = new StringLiteralElements());
	}
	
	public ParserRule getStringLiteralRule() {
		return getStringLiteralAccess().getRule();
	}

	//Integer returns ecore::ELong:
	//
	//	SignedInteger | Hexadecimal;
	public IntegerElements getIntegerAccess() {
		return (pInteger != null) ? pInteger : (pInteger = new IntegerElements());
	}
	
	public ParserRule getIntegerRule() {
		return getIntegerAccess().getRule();
	}

	//SignedInteger hidden():
	//
	//	("+" | "-")? INT;
	public SignedIntegerElements getSignedIntegerAccess() {
		return (pSignedInteger != null) ? pSignedInteger : (pSignedInteger = new SignedIntegerElements());
	}
	
	public ParserRule getSignedIntegerRule() {
		return getSignedIntegerAccess().getRule();
	}

	//Hexadecimal hidden():
	//
	//	HEX;
	public HexadecimalElements getHexadecimalAccess() {
		return (pHexadecimal != null) ? pHexadecimal : (pHexadecimal = new HexadecimalElements());
	}
	
	public ParserRule getHexadecimalRule() {
		return getHexadecimalAccess().getRule();
	}

	//Real returns ecore::EDouble:
	//
	//	Decimal | DotDecimal | DecimalDot | DecimalExp;
	public RealElements getRealAccess() {
		return (pReal != null) ? pReal : (pReal = new RealElements());
	}
	
	public ParserRule getRealRule() {
		return getRealAccess().getRule();
	}

	//Decimal hidden():
	//
	//	("+" | "-")? INT "." INT;
	public DecimalElements getDecimalAccess() {
		return (pDecimal != null) ? pDecimal : (pDecimal = new DecimalElements());
	}
	
	public ParserRule getDecimalRule() {
		return getDecimalAccess().getRule();
	}

	//DotDecimal hidden():
	//
	//	("+" | "-")? "." INT;
	public DotDecimalElements getDotDecimalAccess() {
		return (pDotDecimal != null) ? pDotDecimal : (pDotDecimal = new DotDecimalElements());
	}
	
	public ParserRule getDotDecimalRule() {
		return getDotDecimalAccess().getRule();
	}

	//DecimalDot hidden():
	//
	//	("+" | "-")? INT ".";
	public DecimalDotElements getDecimalDotAccess() {
		return (pDecimalDot != null) ? pDecimalDot : (pDecimalDot = new DecimalDotElements());
	}
	
	public ParserRule getDecimalDotRule() {
		return getDecimalDotAccess().getRule();
	}

	//DecimalExp hidden():
	//
	//	("+" | "-")? INT "." INT EXP;
	public DecimalExpElements getDecimalExpAccess() {
		return (pDecimalExp != null) ? pDecimalExp : (pDecimalExp = new DecimalExpElements());
	}
	
	public ParserRule getDecimalExpRule() {
		return getDecimalExpAccess().getRule();
	}

	//terminal EXP:
	//
	//	("e" | "E") ("+" | "-")? "0".."9"+;
	public TerminalRule getEXPRule() {
		return (tEXP != null) ? tEXP : (tEXP = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "EXP"));
	} 

	//terminal HEX:
	//
	//	("0x" | "0X") ("0".."9" | "a".."f" | "A".."F")+;
	public TerminalRule getHEXRule() {
		return (tHEX != null) ? tHEX : (tHEX = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "HEX"));
	} 

	//terminal ID:
	//
	//	"^"? ("a".."z" | "A".."Z" | "_") ("a".."z" | "A".."Z" | "_" | "0".."9")*;
	public TerminalRule getIDRule() {
		return gaTerminals.getIDRule();
	} 

	//terminal INT returns ecore::EInt:
	//
	//	"0".."9"+;
	public TerminalRule getINTRule() {
		return gaTerminals.getINTRule();
	} 

	//terminal STRING:
	//
	//	"\"" ("\\" ("b" | "t" | "n" | "f" | "r" | "u" | "\"" | "\'" | "\\") | !("\\" | "\""))* "\"" | "\'" ("\\" ("b" | "t" |
	//
	//	"n" | "f" | "r" | "u" | "\"" | "\'" | "\\") | !("\\" | "\'"))* "\'";
	public TerminalRule getSTRINGRule() {
		return gaTerminals.getSTRINGRule();
	} 

	//terminal ML_COMMENT:
	//
	//	"/ *"->"* /";
	public TerminalRule getML_COMMENTRule() {
		return gaTerminals.getML_COMMENTRule();
	} 

	//terminal SL_COMMENT:
	//
	//	"//" !("\n" | "\r")* ("\r"? "\n")?;
	public TerminalRule getSL_COMMENTRule() {
		return gaTerminals.getSL_COMMENTRule();
	} 

	//terminal WS:
	//
	//	(" " | "\t" | "\r" | "\n")+;
	public TerminalRule getWSRule() {
		return gaTerminals.getWSRule();
	} 

	//terminal ANY_OTHER:
	//
	//	.;
	public TerminalRule getANY_OTHERRule() {
		return gaTerminals.getANY_OTHERRule();
	} 
}

Back to the top