-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathParser.cs
2022 lines (1952 loc) · 87.9 KB
/
Parser.cs
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
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// This code was generated by the Gardens Point Parser Generator
// Copyright (c) Wayne Kelly, John Gough, QUT 2005-2014
// (see accompanying GPPGcopyright.rtf)
// GPPG version 1.5.2
// Machine: vant
// DateTime: 23.10.2019 12:36:27
// UserName: yuri
// Input file <OCL.y - 23.10.2019 12:34:29>
// options: lines gplex
using System;
using System.Collections.Generic;
using System.CodeDom.Compiler;
using System.Globalization;
using System.Text;
using QUT.Gppg;
namespace OCL
{
public enum Tokens {error=2,EOF=3,SYMB_0=4,SYMB_1=5,SYMB_2=6,
SYMB_3=7,SYMB_4=8,SYMB_5=9,SYMB_6=10,SYMB_7=11,SYMB_8=12,
SYMB_9=13,SYMB_10=14,SYMB_11=15,SYMB_12=16,SYMB_13=17,SYMB_14=18,
SYMB_15=19,SYMB_16=20,SYMB_17=21,SYMB_18=22,SYMB_19=23,SYMB_20=24,
SYMB_21=25,SYMB_22=26,SYMB_23=27,SYMB_24=28,SYMB_25=29,SYMB_26=30,
SYMB_27=31,SYMB_28=32,SYMB_29=33,SYMB_30=34,SYMB_31=35,SYMB_32=36,
SYMB_33=37,SYMB_34=38,SYMB_35=39,SYMB_36=40,SYMB_37=41,SYMB_38=42,
SYMB_39=43,SYMB_40=44,SYMB_41=45,SYMB_42=46,SYMB_43=47,SYMB_44=48,
SYMB_45=49,SYMB_46=50,SYMB_47=51,SYMB_48=52,SYMB_49=53,SYMB_50=54,
SYMB_51=55,STRING_=56,INTEGER_=57,DOUBLE_=58,IDENT_=59};
public struct ValueType
#line 724 "OCL.y"
{
public int int_;
public char char_;
public double double_;
public string string_;
public OCL.Absyn.OCLfile oclfile_;
public OCL.Absyn.ListOCLPackage listoclpackage_;
public OCL.Absyn.OCLPackage oclpackage_;
public OCL.Absyn.PackageName packagename_;
public OCL.Absyn.OCLExpressions oclexpressions_;
public OCL.Absyn.ListConstrnt listconstrnt_;
public OCL.Absyn.Constrnt constrnt_;
public OCL.Absyn.ListConstrBody listconstrbody_;
public OCL.Absyn.ConstrBody constrbody_;
public OCL.Absyn.ContextDeclaration contextdeclaration_;
public OCL.Absyn.ClassifierContext classifiercontext_;
public OCL.Absyn.OperationContext operationcontext_;
public OCL.Absyn.Stereotype stereotype_;
public OCL.Absyn.OperationName operationname_;
public OCL.Absyn.ListFormalParameter listformalparameter_;
public OCL.Absyn.FormalParameter formalparameter_;
public OCL.Absyn.TypeSpecifier typespecifier_;
public OCL.Absyn.CollectionType collectiontype_;
public OCL.Absyn.ReturnType returntype_;
public OCL.Absyn.OCLExpression oclexpression_;
public OCL.Absyn.LetExpression letexpression_;
public OCL.Absyn.ListLetExpression listletexpression_;
public OCL.Absyn.IfExpression ifexpression_;
public OCL.Absyn.Expression expression_;
public OCL.Absyn.MessageArg messagearg_;
public OCL.Absyn.ListMessageArg listmessagearg_;
public OCL.Absyn.PropertyCall propertycall_;
public OCL.Absyn.PathName pathname_;
public OCL.Absyn.PName pname_;
public OCL.Absyn.ListPName listpname_;
public OCL.Absyn.PossQualifiers possqualifiers_;
public OCL.Absyn.Qualifiers qualifiers_;
public OCL.Absyn.PossTimeExpression posstimeexpression_;
public OCL.Absyn.PossPropCallParam posspropcallparam_;
public OCL.Absyn.Declarator declarator_;
public OCL.Absyn.DeclaratorVarList declaratorvarlist_;
public OCL.Absyn.ListIdent listident_;
public OCL.Absyn.PropertyCallParameters propertycallparameters_;
public OCL.Absyn.ListExpression listexpression_;
public OCL.Absyn.PCPHelper pcphelper_;
public OCL.Absyn.ListPCPHelper listpcphelper_;
public OCL.Absyn.OCLLiteral oclliteral_;
public OCL.Absyn.SimpleTypeSpecifier simpletypespecifier_;
public OCL.Absyn.LiteralCollection literalcollection_;
public OCL.Absyn.ListCollectionItem listcollectionitem_;
public OCL.Absyn.CollectionItem collectionitem_;
public OCL.Absyn.OCLNumber oclnumber_;
public OCL.Absyn.LogicalOperator logicaloperator_;
public OCL.Absyn.CollectionKind collectionkind_;
public OCL.Absyn.EqualityOperator equalityoperator_;
public OCL.Absyn.RelationalOperator relationaloperator_;
public OCL.Absyn.AddOperator addoperator_;
public OCL.Absyn.MultiplyOperator multiplyoperator_;
public OCL.Absyn.UnaryOperator unaryoperator_;
public OCL.Absyn.PostfixOperator postfixoperator_;
}
#line default
// Abstract base class for GPLEX scanners
[GeneratedCodeAttribute( "Gardens Point Parser Generator", "1.5.2")]
public abstract class ScanBase : AbstractScanner<ValueType,LexLocation> {
private LexLocation __yylloc = new LexLocation();
public override LexLocation yylloc { get { return __yylloc; } set { __yylloc = value; } }
protected virtual bool yywrap() { return true; }
}
// Utility class for encapsulating token information
[GeneratedCodeAttribute( "Gardens Point Parser Generator", "1.5.2")]
public class ScanObj {
public int token;
public ValueType yylval;
public LexLocation yylloc;
public ScanObj( int t, ValueType val, LexLocation loc ) {
this.token = t; this.yylval = val; this.yylloc = loc;
}
}
[GeneratedCodeAttribute( "Gardens Point Parser Generator", "1.5.2")]
public class Parser: ShiftReduceParser<ValueType, LexLocation>
{
public Parser(AbstractScanner<ValueType, LexLocation> scanner)
{
Scanner = scanner;
}
// Verbatim content from OCL.y - 23.10.2019 12:34:29
#line 6 "OCL.y"
OCL.Absyn.OCLfile YY_RESULT_OCLfile_ = null;
public OCL.Absyn.OCLfile ParseOCLfile()
{
if(this.Parse())
{
return YY_RESULT_OCLfile_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.ListOCLPackage YY_RESULT_ListOCLPackage_ = null;
public OCL.Absyn.ListOCLPackage ParseListOCLPackage()
{
if(this.Parse())
{
return YY_RESULT_ListOCLPackage_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.OCLPackage YY_RESULT_OCLPackage_ = null;
public OCL.Absyn.OCLPackage ParseOCLPackage()
{
if(this.Parse())
{
return YY_RESULT_OCLPackage_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.PackageName YY_RESULT_PackageName_ = null;
public OCL.Absyn.PackageName ParsePackageName()
{
if(this.Parse())
{
return YY_RESULT_PackageName_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.OCLExpressions YY_RESULT_OCLExpressions_ = null;
public OCL.Absyn.OCLExpressions ParseOCLExpressions()
{
if(this.Parse())
{
return YY_RESULT_OCLExpressions_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.ListConstrnt YY_RESULT_ListConstrnt_ = null;
public OCL.Absyn.ListConstrnt ParseListConstrnt()
{
if(this.Parse())
{
return YY_RESULT_ListConstrnt_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.Constrnt YY_RESULT_Constrnt_ = null;
public OCL.Absyn.Constrnt ParseConstrnt()
{
if(this.Parse())
{
return YY_RESULT_Constrnt_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.ListConstrBody YY_RESULT_ListConstrBody_ = null;
public OCL.Absyn.ListConstrBody ParseListConstrBody()
{
if(this.Parse())
{
return YY_RESULT_ListConstrBody_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.ConstrBody YY_RESULT_ConstrBody_ = null;
public OCL.Absyn.ConstrBody ParseConstrBody()
{
if(this.Parse())
{
return YY_RESULT_ConstrBody_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.ContextDeclaration YY_RESULT_ContextDeclaration_ = null;
public OCL.Absyn.ContextDeclaration ParseContextDeclaration()
{
if(this.Parse())
{
return YY_RESULT_ContextDeclaration_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.ClassifierContext YY_RESULT_ClassifierContext_ = null;
public OCL.Absyn.ClassifierContext ParseClassifierContext()
{
if(this.Parse())
{
return YY_RESULT_ClassifierContext_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.OperationContext YY_RESULT_OperationContext_ = null;
public OCL.Absyn.OperationContext ParseOperationContext()
{
if(this.Parse())
{
return YY_RESULT_OperationContext_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.Stereotype YY_RESULT_Stereotype_ = null;
public OCL.Absyn.Stereotype ParseStereotype()
{
if(this.Parse())
{
return YY_RESULT_Stereotype_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.OperationName YY_RESULT_OperationName_ = null;
public OCL.Absyn.OperationName ParseOperationName()
{
if(this.Parse())
{
return YY_RESULT_OperationName_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.ListFormalParameter YY_RESULT_ListFormalParameter_ = null;
public OCL.Absyn.ListFormalParameter ParseListFormalParameter()
{
if(this.Parse())
{
return YY_RESULT_ListFormalParameter_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.FormalParameter YY_RESULT_FormalParameter_ = null;
public OCL.Absyn.FormalParameter ParseFormalParameter()
{
if(this.Parse())
{
return YY_RESULT_FormalParameter_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.TypeSpecifier YY_RESULT_TypeSpecifier_ = null;
public OCL.Absyn.TypeSpecifier ParseTypeSpecifier()
{
if(this.Parse())
{
return YY_RESULT_TypeSpecifier_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.CollectionType YY_RESULT_CollectionType_ = null;
public OCL.Absyn.CollectionType ParseCollectionType()
{
if(this.Parse())
{
return YY_RESULT_CollectionType_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.ReturnType YY_RESULT_ReturnType_ = null;
public OCL.Absyn.ReturnType ParseReturnType()
{
if(this.Parse())
{
return YY_RESULT_ReturnType_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.OCLExpression YY_RESULT_OCLExpression_ = null;
public OCL.Absyn.OCLExpression ParseOCLExpression()
{
if(this.Parse())
{
return YY_RESULT_OCLExpression_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.LetExpression YY_RESULT_LetExpression_ = null;
public OCL.Absyn.LetExpression ParseLetExpression()
{
if(this.Parse())
{
return YY_RESULT_LetExpression_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.ListLetExpression YY_RESULT_ListLetExpression_ = null;
public OCL.Absyn.ListLetExpression ParseListLetExpression()
{
if(this.Parse())
{
return YY_RESULT_ListLetExpression_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.IfExpression YY_RESULT_IfExpression_ = null;
public OCL.Absyn.IfExpression ParseIfExpression()
{
if(this.Parse())
{
return YY_RESULT_IfExpression_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.Expression YY_RESULT_Expression_ = null;
public OCL.Absyn.Expression ParseExpression()
{
if(this.Parse())
{
return YY_RESULT_Expression_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.MessageArg YY_RESULT_MessageArg_ = null;
public OCL.Absyn.MessageArg ParseMessageArg()
{
if(this.Parse())
{
return YY_RESULT_MessageArg_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.ListMessageArg YY_RESULT_ListMessageArg_ = null;
public OCL.Absyn.ListMessageArg ParseListMessageArg()
{
if(this.Parse())
{
return YY_RESULT_ListMessageArg_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.PropertyCall YY_RESULT_PropertyCall_ = null;
public OCL.Absyn.PropertyCall ParsePropertyCall()
{
if(this.Parse())
{
return YY_RESULT_PropertyCall_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.PathName YY_RESULT_PathName_ = null;
public OCL.Absyn.PathName ParsePathName()
{
if(this.Parse())
{
return YY_RESULT_PathName_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.PName YY_RESULT_PName_ = null;
public OCL.Absyn.PName ParsePName()
{
if(this.Parse())
{
return YY_RESULT_PName_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.ListPName YY_RESULT_ListPName_ = null;
public OCL.Absyn.ListPName ParseListPName()
{
if(this.Parse())
{
return YY_RESULT_ListPName_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.PossQualifiers YY_RESULT_PossQualifiers_ = null;
public OCL.Absyn.PossQualifiers ParsePossQualifiers()
{
if(this.Parse())
{
return YY_RESULT_PossQualifiers_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.Qualifiers YY_RESULT_Qualifiers_ = null;
public OCL.Absyn.Qualifiers ParseQualifiers()
{
if(this.Parse())
{
return YY_RESULT_Qualifiers_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.PossTimeExpression YY_RESULT_PossTimeExpression_ = null;
public OCL.Absyn.PossTimeExpression ParsePossTimeExpression()
{
if(this.Parse())
{
return YY_RESULT_PossTimeExpression_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.PossPropCallParam YY_RESULT_PossPropCallParam_ = null;
public OCL.Absyn.PossPropCallParam ParsePossPropCallParam()
{
if(this.Parse())
{
return YY_RESULT_PossPropCallParam_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.Declarator YY_RESULT_Declarator_ = null;
public OCL.Absyn.Declarator ParseDeclarator()
{
if(this.Parse())
{
return YY_RESULT_Declarator_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.DeclaratorVarList YY_RESULT_DeclaratorVarList_ = null;
public OCL.Absyn.DeclaratorVarList ParseDeclaratorVarList()
{
if(this.Parse())
{
return YY_RESULT_DeclaratorVarList_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.ListIdent YY_RESULT_ListIdent_ = null;
public OCL.Absyn.ListIdent ParseListIdent()
{
if(this.Parse())
{
return YY_RESULT_ListIdent_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.PropertyCallParameters YY_RESULT_PropertyCallParameters_ = null;
public OCL.Absyn.PropertyCallParameters ParsePropertyCallParameters()
{
if(this.Parse())
{
return YY_RESULT_PropertyCallParameters_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.ListExpression YY_RESULT_ListExpression_ = null;
public OCL.Absyn.ListExpression ParseListExpression()
{
if(this.Parse())
{
return YY_RESULT_ListExpression_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.PCPHelper YY_RESULT_PCPHelper_ = null;
public OCL.Absyn.PCPHelper ParsePCPHelper()
{
if(this.Parse())
{
return YY_RESULT_PCPHelper_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.ListPCPHelper YY_RESULT_ListPCPHelper_ = null;
public OCL.Absyn.ListPCPHelper ParseListPCPHelper()
{
if(this.Parse())
{
return YY_RESULT_ListPCPHelper_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.OCLLiteral YY_RESULT_OCLLiteral_ = null;
public OCL.Absyn.OCLLiteral ParseOCLLiteral()
{
if(this.Parse())
{
return YY_RESULT_OCLLiteral_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.SimpleTypeSpecifier YY_RESULT_SimpleTypeSpecifier_ = null;
public OCL.Absyn.SimpleTypeSpecifier ParseSimpleTypeSpecifier()
{
if(this.Parse())
{
return YY_RESULT_SimpleTypeSpecifier_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.LiteralCollection YY_RESULT_LiteralCollection_ = null;
public OCL.Absyn.LiteralCollection ParseLiteralCollection()
{
if(this.Parse())
{
return YY_RESULT_LiteralCollection_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.ListCollectionItem YY_RESULT_ListCollectionItem_ = null;
public OCL.Absyn.ListCollectionItem ParseListCollectionItem()
{
if(this.Parse())
{
return YY_RESULT_ListCollectionItem_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.CollectionItem YY_RESULT_CollectionItem_ = null;
public OCL.Absyn.CollectionItem ParseCollectionItem()
{
if(this.Parse())
{
return YY_RESULT_CollectionItem_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.OCLNumber YY_RESULT_OCLNumber_ = null;
public OCL.Absyn.OCLNumber ParseOCLNumber()
{
if(this.Parse())
{
return YY_RESULT_OCLNumber_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.LogicalOperator YY_RESULT_LogicalOperator_ = null;
public OCL.Absyn.LogicalOperator ParseLogicalOperator()
{
if(this.Parse())
{
return YY_RESULT_LogicalOperator_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.CollectionKind YY_RESULT_CollectionKind_ = null;
public OCL.Absyn.CollectionKind ParseCollectionKind()
{
if(this.Parse())
{
return YY_RESULT_CollectionKind_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.EqualityOperator YY_RESULT_EqualityOperator_ = null;
public OCL.Absyn.EqualityOperator ParseEqualityOperator()
{
if(this.Parse())
{
return YY_RESULT_EqualityOperator_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.RelationalOperator YY_RESULT_RelationalOperator_ = null;
public OCL.Absyn.RelationalOperator ParseRelationalOperator()
{
if(this.Parse())
{
return YY_RESULT_RelationalOperator_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.AddOperator YY_RESULT_AddOperator_ = null;
public OCL.Absyn.AddOperator ParseAddOperator()
{
if(this.Parse())
{
return YY_RESULT_AddOperator_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.MultiplyOperator YY_RESULT_MultiplyOperator_ = null;
public OCL.Absyn.MultiplyOperator ParseMultiplyOperator()
{
if(this.Parse())
{
return YY_RESULT_MultiplyOperator_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.UnaryOperator YY_RESULT_UnaryOperator_ = null;
public OCL.Absyn.UnaryOperator ParseUnaryOperator()
{
if(this.Parse())
{
return YY_RESULT_UnaryOperator_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
OCL.Absyn.PostfixOperator YY_RESULT_PostfixOperator_ = null;
public OCL.Absyn.PostfixOperator ParsePostfixOperator()
{
if(this.Parse())
{
return YY_RESULT_PostfixOperator_;
}
else
{
throw new Exception("Could not parse input stream!");
}
}
#line default
// End verbatim content from OCL.y - 23.10.2019 12:34:29
#pragma warning disable 649
private static Dictionary<int, string> aliases;
#pragma warning restore 649
private static Rule[] rules = new Rule[151];
private static State[] states = new State[224];
private static string[] nonTerms = new string[] {
"OCLfile", "ListOCLPackage", "OCLPackage", "PackageName", "OCLExpressions",
"ListConstrnt", "Constrnt", "ListConstrBody", "ConstrBody", "ContextDeclaration",
"ClassifierContext", "OperationContext", "Stereotype", "OperationName",
"ListFormalParameter", "FormalParameter", "TypeSpecifier", "CollectionType",
"ReturnType", "OCLExpression", "LetExpression", "ListLetExpression", "IfExpression",
"Expression", "MessageArg", "ListMessageArg", "PropertyCall", "PathName",
"PName", "ListPName", "PossQualifiers", "Qualifiers", "PossTimeExpression",
"PossPropCallParam", "Declarator", "DeclaratorVarList", "ListIdent", "PropertyCallParameters",
"ListExpression", "PCPHelper", "ListPCPHelper", "OCLLiteral", "SimpleTypeSpecifier",
"LiteralCollection", "ListCollectionItem", "CollectionItem", "OCLNumber",
"LogicalOperator", "CollectionKind", "EqualityOperator", "RelationalOperator",
"AddOperator", "MultiplyOperator", "UnaryOperator", "PostfixOperator",
"$accept", "Expression1", "Expression2", "Expression3", "Expression4",
"Expression5", "Expression6", "Expression7", "Expression8", };
static Parser() {
states[0] = new State(new int[]{50,6},new int[]{-1,1,-2,3,-3,4});
states[1] = new State(new int[]{3,2});
states[2] = new State(-1);
states[3] = new State(-2);
states[4] = new State(new int[]{50,6,3,-3},new int[]{-2,5,-3,4});
states[5] = new State(-4);
states[6] = new State(new int[]{59,92},new int[]{-4,7,-28,223,-30,88,-29,89});
states[7] = new State(-8,new int[]{-5,8,-6,10});
states[8] = new State(new int[]{40,9});
states[9] = new State(-5);
states[10] = new State(new int[]{36,193,40,-7},new int[]{-7,11,-10,12});
states[11] = new State(-9);
states[12] = new State(new int[]{37,16,52,190,51,191,45,192},new int[]{-8,13,-9,14,-13,180});
states[13] = new State(-10);
states[14] = new State(new int[]{37,16,52,190,51,191,45,192,36,-11,40,-11},new int[]{-8,15,-9,14,-13,180});
states[15] = new State(-12);
states[16] = new State(new int[]{59,17,4,178});
states[17] = new State(new int[]{4,18});
states[18] = new State(new int[]{46,22},new int[]{-22,19,-21,20});
states[19] = new State(-13);
states[20] = new State(new int[]{46,22,37,-56,52,-56,51,-56,45,-56,36,-56,40,-56,44,-56},new int[]{-22,21,-21,20});
states[21] = new State(-57);
states[22] = new State(new int[]{59,23});
states[23] = new State(new int[]{8,24,4,159,6,163});
states[24] = new State(new int[]{10,74,47,75,59,92,34,105,31,106,33,107,32,108,56,110,57,112,58,113,54,114,41,115,42,117,48,124,6,125},new int[]{-24,25,-57,55,-58,59,-59,62,-60,67,-61,70,-62,73,-54,38,-63,76,-64,86,-27,87,-28,42,-30,88,-29,89,-44,93,-49,94,-42,109,-47,111,-23,116});
states[25] = new State(new int[]{43,26,46,-52,37,-52,52,-52,51,-52,45,-52,36,-52,40,-52,44,-52});
states[26] = new State(new int[]{10,74,47,75,59,92,34,105,31,106,33,107,32,108,56,110,57,112,58,113,54,114,41,115,42,117,48,124,6,125},new int[]{-57,27,-58,59,-59,62,-60,67,-61,70,-62,73,-54,38,-63,76,-64,86,-27,87,-28,42,-30,88,-29,89,-44,93,-49,94,-42,109,-47,111,-23,116});
states[27] = new State(new int[]{35,56,49,57,55,58,43,-59,46,-59,37,-59,52,-59,51,-59,45,-59,36,-59,40,-59,44,-59,7,-59,18,-59,4,-59,25,-59,24,-59,28,-59,27,-59,53,-59,38,-59,39,-59,22,-59},new int[]{-48,28});
states[28] = new State(new int[]{10,74,47,75,59,92,34,105,31,106,33,107,32,108,56,110,57,112,58,113,54,114,41,115,42,117,48,124,6,125},new int[]{-58,29,-59,62,-60,67,-61,70,-62,73,-54,38,-63,76,-64,86,-27,87,-28,42,-30,88,-29,89,-44,93,-49,94,-42,109,-47,111,-23,116});
states[29] = new State(new int[]{8,60,17,61,35,-61,49,-61,55,-61,43,-61,46,-61,37,-61,52,-61,51,-61,45,-61,36,-61,40,-61,44,-61,7,-61,18,-61,4,-61,25,-61,24,-61,28,-61,27,-61,53,-61,38,-61,39,-61,22,-61},new int[]{-50,30});
states[30] = new State(new int[]{10,74,47,75,59,92,34,105,31,106,33,107,32,108,56,110,57,112,58,113,54,114,41,115,42,117,48,124,6,125},new int[]{-59,31,-60,67,-61,70,-62,73,-54,38,-63,76,-64,86,-27,87,-28,42,-30,88,-29,89,-44,93,-49,94,-42,109,-47,111,-23,116});
states[31] = new State(new int[]{13,63,14,64,11,65,12,66,8,-63,17,-63,35,-63,49,-63,55,-63,43,-63,46,-63,37,-63,52,-63,51,-63,45,-63,36,-63,40,-63,44,-63,7,-63,18,-63,4,-63,25,-63,24,-63,28,-63,27,-63,53,-63,38,-63,39,-63,22,-63},new int[]{-51,32});
states[32] = new State(new int[]{10,74,47,75,59,92,34,105,31,106,33,107,32,108,56,110,57,112,58,113,54,114,41,115,42,117,48,124,6,125},new int[]{-60,33,-61,70,-62,73,-54,38,-63,76,-64,86,-27,87,-28,42,-30,88,-29,89,-44,93,-49,94,-42,109,-47,111,-23,116});
states[33] = new State(new int[]{9,68,10,69,13,-65,14,-65,11,-65,12,-65,8,-65,17,-65,35,-65,49,-65,55,-65,43,-65,46,-65,37,-65,52,-65,51,-65,45,-65,36,-65,40,-65,44,-65,7,-65,18,-65,4,-65,25,-65,24,-65,28,-65,27,-65,53,-65,38,-65,39,-65,22,-65},new int[]{-52,34});
states[34] = new State(new int[]{10,74,47,75,59,92,34,105,31,106,33,107,32,108,56,110,57,112,58,113,54,114,41,115,42,117,48,124,6,125},new int[]{-61,35,-62,73,-54,38,-63,76,-64,86,-27,87,-28,42,-30,88,-29,89,-44,93,-49,94,-42,109,-47,111,-23,116});
states[35] = new State(new int[]{16,71,15,72,9,-67,10,-67,13,-67,14,-67,11,-67,12,-67,8,-67,17,-67,35,-67,49,-67,55,-67,43,-67,46,-67,37,-67,52,-67,51,-67,45,-67,36,-67,40,-67,44,-67,7,-67,18,-67,4,-67,25,-67,24,-67,28,-67,27,-67,53,-67,38,-67,39,-67,22,-67},new int[]{-53,36});
states[36] = new State(new int[]{10,74,47,75,59,92,34,105,31,106,33,107,32,108,56,110,57,112,58,113,54,114,41,115,42,117,48,124,6,125},new int[]{-62,37,-54,38,-63,76,-64,86,-27,87,-28,42,-30,88,-29,89,-44,93,-49,94,-42,109,-47,111,-23,116});
states[37] = new State(-69);
states[38] = new State(new int[]{59,92,34,105,31,106,33,107,32,108,56,110,57,112,58,113,54,114,41,115,42,117,48,124,6,125},new int[]{-63,39,-64,86,-27,87,-28,42,-30,88,-29,89,-44,93,-49,94,-42,109,-47,111,-23,116});
states[39] = new State(new int[]{19,77,29,138,30,139,16,-71,15,-71,9,-71,10,-71,13,-71,14,-71,11,-71,12,-71,8,-71,17,-71,35,-71,49,-71,55,-71,43,-71,46,-71,37,-71,52,-71,51,-71,45,-71,36,-71,40,-71,44,-71,7,-71,18,-71,4,-71,25,-71,24,-71,28,-71,27,-71,53,-71,38,-71,39,-71,22,-71},new int[]{-55,40});
states[40] = new State(new int[]{59,92},new int[]{-27,41,-28,42,-30,88,-29,89});
states[41] = new State(-73);
states[42] = new State(new int[]{23,157,21,-96,6,-96,19,-96,29,-96,30,-96,16,-96,15,-96,9,-96,10,-96,13,-96,14,-96,11,-96,12,-96,8,-96,17,-96,35,-96,49,-96,55,-96,43,-96,46,-96,37,-96,52,-96,51,-96,45,-96,36,-96,40,-96,44,-96,7,-96,18,-96,4,-96,25,-96,24,-96,28,-96,27,-96,53,-96,38,-96,39,-96,22,-96},new int[]{-33,43});
states[43] = new State(new int[]{21,151,6,-93,19,-93,29,-93,30,-93,16,-93,15,-93,9,-93,10,-93,13,-93,14,-93,11,-93,12,-93,8,-93,17,-93,35,-93,49,-93,55,-93,43,-93,46,-93,37,-93,52,-93,51,-93,45,-93,36,-93,40,-93,44,-93,7,-93,18,-93,4,-93,25,-93,24,-93,28,-93,27,-93,53,-93,38,-93,39,-93,22,-93},new int[]{-31,44,-32,150});
states[44] = new State(new int[]{6,47,19,-98,29,-98,30,-98,16,-98,15,-98,9,-98,10,-98,13,-98,14,-98,11,-98,12,-98,8,-98,17,-98,35,-98,49,-98,55,-98,43,-98,46,-98,37,-98,52,-98,51,-98,45,-98,36,-98,40,-98,44,-98,7,-98,18,-98,4,-98,25,-98,24,-98,28,-98,27,-98,53,-98,38,-98,39,-98,22,-98},new int[]{-34,45,-38,46});
states[45] = new State(-88);
states[46] = new State(-99);
states[47] = new State(new int[]{7,48,10,74,47,75,59,92,34,105,31,106,33,107,32,108,56,110,57,112,58,113,54,114,41,115,42,117,48,124,6,125},new int[]{-24,49,-57,55,-58,59,-59,62,-60,67,-61,70,-62,73,-54,38,-63,76,-64,86,-27,87,-28,42,-30,88,-29,89,-44,93,-49,94,-42,109,-47,111,-23,116});
states[48] = new State(-106);
states[49] = new State(new int[]{43,26,7,-115,18,-115,4,-115,25,-115,24,-115},new int[]{-41,50});
states[50] = new State(new int[]{7,51,18,53,4,140,25,142,24,148},new int[]{-40,52});
states[51] = new State(-107);
states[52] = new State(-116);
states[53] = new State(new int[]{10,74,47,75,59,92,34,105,31,106,33,107,32,108,56,110,57,112,58,113,54,114,41,115,42,117,48,124,6,125},new int[]{-24,54,-57,55,-58,59,-59,62,-60,67,-61,70,-62,73,-54,38,-63,76,-64,86,-27,87,-28,42,-30,88,-29,89,-44,93,-49,94,-42,109,-47,111,-23,116});
states[54] = new State(new int[]{43,26,7,-111,18,-111,4,-111,25,-111,24,-111});
states[55] = new State(new int[]{35,56,49,57,55,58,43,-60,46,-60,37,-60,52,-60,51,-60,45,-60,36,-60,40,-60,44,-60,7,-60,18,-60,4,-60,25,-60,24,-60,28,-60,27,-60,53,-60,38,-60,39,-60,22,-60},new int[]{-48,28});
states[56] = new State(-130);
states[57] = new State(-131);
states[58] = new State(-132);
states[59] = new State(new int[]{8,60,17,61,35,-62,49,-62,55,-62,43,-62,46,-62,37,-62,52,-62,51,-62,45,-62,36,-62,40,-62,44,-62,7,-62,18,-62,4,-62,25,-62,24,-62,28,-62,27,-62,53,-62,38,-62,39,-62,22,-62},new int[]{-50,30});
states[60] = new State(-137);
states[61] = new State(-138);
states[62] = new State(new int[]{13,63,14,64,11,65,12,66,8,-64,17,-64,35,-64,49,-64,55,-64,43,-64,46,-64,37,-64,52,-64,51,-64,45,-64,36,-64,40,-64,44,-64,7,-64,18,-64,4,-64,25,-64,24,-64,28,-64,27,-64,53,-64,38,-64,39,-64,22,-64},new int[]{-51,32});
states[63] = new State(-139);
states[64] = new State(-140);
states[65] = new State(-141);
states[66] = new State(-142);
states[67] = new State(new int[]{9,68,10,69,13,-66,14,-66,11,-66,12,-66,8,-66,17,-66,35,-66,49,-66,55,-66,43,-66,46,-66,37,-66,52,-66,51,-66,45,-66,36,-66,40,-66,44,-66,7,-66,18,-66,4,-66,25,-66,24,-66,28,-66,27,-66,53,-66,38,-66,39,-66,22,-66},new int[]{-52,34});
states[68] = new State(-143);
states[69] = new State(-144);
states[70] = new State(new int[]{16,71,15,72,9,-68,10,-68,13,-68,14,-68,11,-68,12,-68,8,-68,17,-68,35,-68,49,-68,55,-68,43,-68,46,-68,37,-68,52,-68,51,-68,45,-68,36,-68,40,-68,44,-68,7,-68,18,-68,4,-68,25,-68,24,-68,28,-68,27,-68,53,-68,38,-68,39,-68,22,-68},new int[]{-53,36});
states[71] = new State(-145);
states[72] = new State(-146);
states[73] = new State(-70);
states[74] = new State(-147);
states[75] = new State(-148);
states[76] = new State(new int[]{19,77,29,138,30,139,16,-72,15,-72,9,-72,10,-72,13,-72,14,-72,11,-72,12,-72,8,-72,17,-72,35,-72,49,-72,55,-72,43,-72,46,-72,37,-72,52,-72,51,-72,45,-72,36,-72,40,-72,44,-72,7,-72,18,-72,4,-72,25,-72,24,-72,28,-72,27,-72,53,-72,38,-72,39,-72,22,-72},new int[]{-55,40});
states[77] = new State(new int[]{59,92},new int[]{-28,78,-30,88,-29,89});
states[78] = new State(new int[]{6,79});
states[79] = new State(new int[]{10,74,47,75,59,92,34,105,31,106,33,107,32,108,56,110,57,112,58,113,54,114,41,115,42,117,48,124,6,125,20,128,7,-85},new int[]{-26,80,-25,82,-24,85,-57,55,-58,59,-59,62,-60,67,-61,70,-62,73,-54,38,-63,76,-64,86,-27,87,-28,42,-30,88,-29,89,-44,93,-49,94,-42,109,-47,111,-23,116});
states[80] = new State(new int[]{7,81});
states[81] = new State(-74);
states[82] = new State(new int[]{18,83,7,-86});
states[83] = new State(new int[]{10,74,47,75,59,92,34,105,31,106,33,107,32,108,56,110,57,112,58,113,54,114,41,115,42,117,48,124,6,125,20,128,7,-85},new int[]{-26,84,-25,82,-24,85,-57,55,-58,59,-59,62,-60,67,-61,70,-62,73,-54,38,-63,76,-64,86,-27,87,-28,42,-30,88,-29,89,-44,93,-49,94,-42,109,-47,111,-23,116});
states[84] = new State(-87);
states[85] = new State(new int[]{43,26,18,-82,7,-82});
states[86] = new State(-75);
states[87] = new State(-76);
states[88] = new State(-89);
states[89] = new State(new int[]{5,90,40,-91,36,-91,23,-91,21,-91,6,-91,19,-91,29,-91,30,-91,16,-91,15,-91,9,-91,10,-91,13,-91,14,-91,11,-91,12,-91,8,-91,17,-91,35,-91,49,-91,55,-91,43,-91,46,-91,37,-91,52,-91,51,-91,45,-91,44,-91,7,-91,18,-91,4,-91,25,-91,24,-91,28,-91,27,-91,53,-91,38,-91,39,-91,22,-91});
states[90] = new State(new int[]{59,92},new int[]{-30,91,-29,89});
states[91] = new State(-92);
states[92] = new State(-90);
states[93] = new State(-77);
states[94] = new State(new int[]{26,95});
states[95] = new State(new int[]{27,98,10,74,47,75,59,92,34,105,31,106,33,107,32,108,56,110,57,112,58,113,54,114,41,115,42,117,48,124,6,125},new int[]{-45,96,-46,99,-24,102,-57,55,-58,59,-59,62,-60,67,-61,70,-62,73,-54,38,-63,76,-64,86,-27,87,-28,42,-30,88,-29,89,-44,93,-49,94,-42,109,-47,111,-23,116});
states[96] = new State(new int[]{27,97});
states[97] = new State(-122);
states[98] = new State(-123);
states[99] = new State(new int[]{18,100,27,-124});
states[100] = new State(new int[]{10,74,47,75,59,92,34,105,31,106,33,107,32,108,56,110,57,112,58,113,54,114,41,115,42,117,48,124,6,125},new int[]{-45,101,-46,99,-24,102,-57,55,-58,59,-59,62,-60,67,-61,70,-62,73,-54,38,-63,76,-64,86,-27,87,-28,42,-30,88,-29,89,-44,93,-49,94,-42,109,-47,111,-23,116});
states[101] = new State(-125);
states[102] = new State(new int[]{43,26,28,103,18,-126,27,-126});
states[103] = new State(new int[]{10,74,47,75,59,92,34,105,31,106,33,107,32,108,56,110,57,112,58,113,54,114,41,115,42,117,48,124,6,125},new int[]{-24,104,-57,55,-58,59,-59,62,-60,67,-61,70,-62,73,-54,38,-63,76,-64,86,-27,87,-28,42,-30,88,-29,89,-44,93,-49,94,-42,109,-47,111,-23,116});
states[104] = new State(new int[]{43,26,18,-127,27,-127});
states[105] = new State(-133);
states[106] = new State(-134);
states[107] = new State(-135);
states[108] = new State(-136);
states[109] = new State(-78);
states[110] = new State(-117);
states[111] = new State(-118);
states[112] = new State(-128);
states[113] = new State(-129);
states[114] = new State(-119);
states[115] = new State(-120);
states[116] = new State(-79);
states[117] = new State(new int[]{10,74,47,75,59,92,34,105,31,106,33,107,32,108,56,110,57,112,58,113,54,114,41,115,42,117,48,124,6,125},new int[]{-24,118,-57,55,-58,59,-59,62,-60,67,-61,70,-62,73,-54,38,-63,76,-64,86,-27,87,-28,42,-30,88,-29,89,-44,93,-49,94,-42,109,-47,111,-23,116});
states[118] = new State(new int[]{53,119,43,26});
states[119] = new State(new int[]{10,74,47,75,59,92,34,105,31,106,33,107,32,108,56,110,57,112,58,113,54,114,41,115,42,117,48,124,6,125},new int[]{-24,120,-57,55,-58,59,-59,62,-60,67,-61,70,-62,73,-54,38,-63,76,-64,86,-27,87,-28,42,-30,88,-29,89,-44,93,-49,94,-42,109,-47,111,-23,116});
states[120] = new State(new int[]{38,121,43,26});
states[121] = new State(new int[]{10,74,47,75,59,92,34,105,31,106,33,107,32,108,56,110,57,112,58,113,54,114,41,115,42,117,48,124,6,125},new int[]{-24,122,-57,55,-58,59,-59,62,-60,67,-61,70,-62,73,-54,38,-63,76,-64,86,-27,87,-28,42,-30,88,-29,89,-44,93,-49,94,-42,109,-47,111,-23,116});
states[122] = new State(new int[]{39,123,43,26});
states[123] = new State(-58);
states[124] = new State(-80);
states[125] = new State(new int[]{10,74,47,75,59,92,34,105,31,106,33,107,32,108,56,110,57,112,58,113,54,114,41,115,42,117,48,124,6,125},new int[]{-24,126,-57,55,-58,59,-59,62,-60,67,-61,70,-62,73,-54,38,-63,76,-64,86,-27,87,-28,42,-30,88,-29,89,-44,93,-49,94,-42,109,-47,111,-23,116});
states[126] = new State(new int[]{7,127,43,26});
states[127] = new State(-81);
states[128] = new State(new int[]{4,129,18,-83,7,-83});
states[129] = new State(new int[]{59,92,34,105,31,106,33,107,32,108},new int[]{-17,130,-43,131,-28,132,-30,88,-29,89,-18,133,-49,134});
states[130] = new State(-84);
states[131] = new State(-46);
states[132] = new State(-121);
states[133] = new State(-47);
states[134] = new State(new int[]{6,135});
states[135] = new State(new int[]{59,92},new int[]{-43,136,-28,132,-30,88,-29,89});