diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index 481fbafc9..b75dde9a4 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs @@ -1,9 +1,9 @@ // // This CSharp output file generated by Gardens Point LEX // Version: 1.1.3.301 -// Machine: DESKTOP-8EAQPI9 -// DateTime: 01.06.2017 21:50:36 -// UserName: ????????? +// Machine: JANE-MSI +// DateTime: 03.06.2017 0:09:24 +// UserName: Jane // GPLEX input file // GPLEX frame file // @@ -124,8 +124,8 @@ namespace GPPGParserScanner enum Result {accept, noMatch, contextFound}; - const int maxAccept = 63; - const int initial = 64; + const int maxAccept = 64; + const int initial = 65; const int eofNum = 0; const int goStart = -1; const int INITIAL = 0; @@ -177,7 +177,7 @@ public PT parsertools; } }; - static int[] startState = new int[] {64, 98, 99, 100, 100, 101, + static int[] startState = new int[] {65, 99, 100, 101, 101, 102, 0}; #region TwoLevelCharacterMap @@ -1177,52 +1177,52 @@ public PT parsertools; return MapC(code); } - static Table[] NxS = new Table[103] { + static Table[] NxS = new Table[104] { /* NxS[ 0] */ new Table(0, 0, 0, null), -/* NxS[ 1] */ new Table(1, 19, -1, new sbyte[] {52, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 53}), +/* NxS[ 1] */ new Table(1, 19, -1, new sbyte[] {53, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 54}), /* NxS[ 2] */ new Table(0, 0, -1, null), -/* NxS[ 3] */ new Table(4, 1, -1, new sbyte[] {97}), -/* NxS[ 4] */ new Table(26, 19, -1, new sbyte[] {50, 50, 50, -1, -1, -1, - -1, -1, -1, -1, -1, 50, -1, -1, -1, -1, 50, 50, 50}), -/* NxS[ 5] */ new Table(8, 1, -1, new sbyte[] {49}), -/* NxS[ 6] */ new Table(19, 1, -1, new sbyte[] {48}), +/* NxS[ 3] */ new Table(4, 1, -1, new sbyte[] {98}), +/* NxS[ 4] */ new Table(26, 19, -1, new sbyte[] {51, 51, 51, -1, -1, -1, + -1, -1, -1, -1, -1, 51, -1, -1, -1, -1, 51, 51, 51}), +/* NxS[ 5] */ new Table(8, 1, -1, new sbyte[] {50}), +/* NxS[ 6] */ new Table(19, 1, -1, new sbyte[] {49}), /* NxS[ 7] */ new Table(0, 0, -1, null), /* NxS[ 8] */ new Table(28, 17, -1, new sbyte[] {25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, -1, 25, -1, 25, 25}), /* NxS[ 9] */ new Table(0, 0, -1, null), -/* NxS[ 10] */ new Table(19, 1, -1, new sbyte[] {47}), -/* NxS[ 11] */ new Table(13, 1, -1, new sbyte[] {46}), +/* NxS[ 10] */ new Table(19, 1, -1, new sbyte[] {48}), +/* NxS[ 11] */ new Table(13, 1, -1, new sbyte[] {47}), /* NxS[ 12] */ new Table(0, 0, -1, null), /* NxS[ 13] */ new Table(0, 0, -1, null), /* NxS[ 14] */ new Table(0, 0, -1, null), -/* NxS[ 15] */ new Table(13, 3, -1, new sbyte[] {44, -1, 45}), +/* NxS[ 15] */ new Table(13, 5, -1, new sbyte[] {44, -1, 45, -1, 46}), /* NxS[ 16] */ new Table(0, 0, -1, null), /* NxS[ 17] */ new Table(0, 0, -1, null), /* NxS[ 18] */ new Table(19, 1, -1, new sbyte[] {43}), /* NxS[ 19] */ new Table(19, 4, -1, new sbyte[] {41, -1, -1, 42}), /* NxS[ 20] */ new Table(19, 1, -1, new sbyte[] {40}), -/* NxS[ 21] */ new Table(19, 5, -1, new sbyte[] {35, -1, -1, 36, 70}), +/* NxS[ 21] */ new Table(19, 5, -1, new sbyte[] {35, -1, -1, 36, 71}), /* NxS[ 22] */ new Table(0, 0, -1, null), -/* NxS[ 23] */ new Table(26, 1, -1, new sbyte[] {69}), -/* NxS[ 24] */ new Table(13, 32, -1, new sbyte[] {66, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 24, 24, 67, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 24, -1, 67}), +/* NxS[ 23] */ new Table(26, 1, -1, new sbyte[] {70}), +/* NxS[ 24] */ new Table(13, 32, -1, new sbyte[] {67, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 24, 24, 68, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 24, -1, 68}), /* NxS[ 25] */ new Table(26, 19, -1, new sbyte[] {25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, -1, 25, 25, 25, 25}), /* NxS[ 26] */ new Table(0, 0, -1, null), -/* NxS[ 27] */ new Table(45, 4, 65, new sbyte[] {31, 65, 65, -1}), +/* NxS[ 27] */ new Table(45, 4, 66, new sbyte[] {31, 66, 66, -1}), /* NxS[ 28] */ new Table(26, 19, -1, new sbyte[] {29, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, -1, 30, 29, 30, 30}), /* NxS[ 29] */ new Table(26, 17, -1, new sbyte[] {29, 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 29}), /* NxS[ 30] */ new Table(26, 19, -1, new sbyte[] {30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, -1, 30, 30, 30, 30}), -/* NxS[ 31] */ new Table(45, 1, -1, new sbyte[] {65}), +/* NxS[ 31] */ new Table(45, 1, -1, new sbyte[] {66}), /* NxS[ 32] */ new Table(26, 17, -1, new sbyte[] {32, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 32}), -/* NxS[ 33] */ new Table(26, 19, -1, new sbyte[] {33, 33, 67, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, 67}), +/* NxS[ 33] */ new Table(26, 19, -1, new sbyte[] {33, 33, 68, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33, -1, 68}), /* NxS[ 34] */ new Table(0, 0, -1, null), /* NxS[ 35] */ new Table(0, 0, -1, null), /* NxS[ 36] */ new Table(0, 0, -1, null), @@ -1239,70 +1239,71 @@ public PT parsertools; /* NxS[ 47] */ new Table(0, 0, -1, null), /* NxS[ 48] */ new Table(0, 0, -1, null), /* NxS[ 49] */ new Table(0, 0, -1, null), -/* NxS[ 50] */ new Table(26, 19, -1, new sbyte[] {50, 50, 50, -1, -1, -1, - -1, -1, -1, -1, -1, 50, -1, -1, -1, -1, 50, 50, 50}), -/* NxS[ 51] */ new Table(0, 0, -1, null), -/* NxS[ 52] */ new Table(0, 7, 52, new sbyte[] {-1, 52, 52, 52, 52, 52, +/* NxS[ 50] */ new Table(0, 0, -1, null), +/* NxS[ 51] */ new Table(26, 19, -1, new sbyte[] {51, 51, 51, -1, -1, -1, + -1, -1, -1, -1, -1, 51, -1, -1, -1, -1, 51, 51, 51}), +/* NxS[ 52] */ new Table(0, 0, -1, null), +/* NxS[ 53] */ new Table(0, 7, 53, new sbyte[] {-1, 53, 53, 53, 53, 53, -1}), -/* NxS[ 53] */ new Table(0, 0, -1, null), /* NxS[ 54] */ new Table(0, 0, -1, null), /* NxS[ 55] */ new Table(0, 0, -1, null), /* NxS[ 56] */ new Table(0, 0, -1, null), -/* NxS[ 57] */ new Table(9, 1, -1, new sbyte[] {58}), -/* NxS[ 58] */ new Table(0, 0, -1, null), +/* NxS[ 57] */ new Table(0, 0, -1, null), +/* NxS[ 58] */ new Table(9, 1, -1, new sbyte[] {59}), /* NxS[ 59] */ new Table(0, 0, -1, null), -/* NxS[ 60] */ new Table(1, 1, -1, new sbyte[] {63}), -/* NxS[ 61] */ new Table(4, 1, -1, new sbyte[] {102}), -/* NxS[ 62] */ new Table(0, 0, -1, null), -/* NxS[ 63] */ new Table(0, 7, 63, new sbyte[] {-1, 63, 63, 63, 63, 63, +/* NxS[ 60] */ new Table(0, 0, -1, null), +/* NxS[ 61] */ new Table(1, 1, -1, new sbyte[] {64}), +/* NxS[ 62] */ new Table(4, 1, -1, new sbyte[] {103}), +/* NxS[ 63] */ new Table(0, 0, -1, null), +/* NxS[ 64] */ new Table(0, 7, 64, new sbyte[] {-1, 64, 64, 64, 64, 64, -1}), -/* NxS[ 64] */ new Table(40, 36, 25, new sbyte[] {26, 25, 24, 25, 25, 27, +/* NxS[ 65] */ new Table(40, 36, 25, new sbyte[] {26, 25, 24, 25, 25, 27, 28, 2, -1, 1, 2, 3, 4, -1, -1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 24}), -/* NxS[ 65] */ new Table(45, 4, 65, new sbyte[] {31, 65, 65, -1}), -/* NxS[ 66] */ new Table(26, 17, -1, new sbyte[] {33, 33, -1, -1, -1, -1, +/* NxS[ 66] */ new Table(45, 4, 66, new sbyte[] {31, 66, 66, -1}), +/* NxS[ 67] */ new Table(26, 17, -1, new sbyte[] {33, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 33}), -/* NxS[ 67] */ new Table(20, 23, -1, new sbyte[] {68, 68, -1, -1, -1, -1, +/* NxS[ 68] */ new Table(20, 23, -1, new sbyte[] {69, 69, -1, -1, -1, -1, 32, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 32}), -/* NxS[ 68] */ new Table(26, 17, -1, new sbyte[] {32, 32, -1, -1, -1, -1, +/* NxS[ 69] */ new Table(26, 17, -1, new sbyte[] {32, 32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 32}), -/* NxS[ 69] */ new Table(27, 1, -1, new sbyte[] {34}), -/* NxS[ 70] */ new Table(28, 9, -1, new sbyte[] {71, -1, -1, -1, 72, -1, - -1, -1, 73}), -/* NxS[ 71] */ new Table(29, 1, -1, new sbyte[] {87}), -/* NxS[ 72] */ new Table(36, 1, -1, new sbyte[] {78}), -/* NxS[ 73] */ new Table(39, 1, -1, new sbyte[] {74}), -/* NxS[ 74] */ new Table(30, 1, -1, new sbyte[] {75}), -/* NxS[ 75] */ new Table(28, 1, -1, new sbyte[] {76}), -/* NxS[ 76] */ new Table(22, 1, -1, new sbyte[] {77}), -/* NxS[ 77] */ new Table(22, 1, -1, new sbyte[] {37}), -/* NxS[ 78] */ new Table(37, 1, -1, new sbyte[] {79}), -/* NxS[ 79] */ new Table(36, 1, -1, new sbyte[] {80}), -/* NxS[ 80] */ new Table(28, 1, -1, new sbyte[] {81}), -/* NxS[ 81] */ new Table(38, 1, -1, new sbyte[] {82}), -/* NxS[ 82] */ new Table(28, 1, -1, new sbyte[] {83}), -/* NxS[ 83] */ new Table(35, 1, -1, new sbyte[] {84}), -/* NxS[ 84] */ new Table(36, 1, -1, new sbyte[] {85}), -/* NxS[ 85] */ new Table(22, 1, -1, new sbyte[] {86}), -/* NxS[ 86] */ new Table(22, 1, -1, new sbyte[] {38}), -/* NxS[ 87] */ new Table(30, 1, -1, new sbyte[] {88}), -/* NxS[ 88] */ new Table(31, 1, -1, new sbyte[] {89}), -/* NxS[ 89] */ new Table(28, 1, -1, new sbyte[] {90}), -/* NxS[ 90] */ new Table(32, 1, -1, new sbyte[] {91}), +/* NxS[ 70] */ new Table(27, 1, -1, new sbyte[] {34}), +/* NxS[ 71] */ new Table(28, 9, -1, new sbyte[] {72, -1, -1, -1, 73, -1, + -1, -1, 74}), +/* NxS[ 72] */ new Table(29, 1, -1, new sbyte[] {88}), +/* NxS[ 73] */ new Table(36, 1, -1, new sbyte[] {79}), +/* NxS[ 74] */ new Table(39, 1, -1, new sbyte[] {75}), +/* NxS[ 75] */ new Table(30, 1, -1, new sbyte[] {76}), +/* NxS[ 76] */ new Table(28, 1, -1, new sbyte[] {77}), +/* NxS[ 77] */ new Table(22, 1, -1, new sbyte[] {78}), +/* NxS[ 78] */ new Table(22, 1, -1, new sbyte[] {37}), +/* NxS[ 79] */ new Table(37, 1, -1, new sbyte[] {80}), +/* NxS[ 80] */ new Table(36, 1, -1, new sbyte[] {81}), +/* NxS[ 81] */ new Table(28, 1, -1, new sbyte[] {82}), +/* NxS[ 82] */ new Table(38, 1, -1, new sbyte[] {83}), +/* NxS[ 83] */ new Table(28, 1, -1, new sbyte[] {84}), +/* NxS[ 84] */ new Table(35, 1, -1, new sbyte[] {85}), +/* NxS[ 85] */ new Table(36, 1, -1, new sbyte[] {86}), +/* NxS[ 86] */ new Table(22, 1, -1, new sbyte[] {87}), +/* NxS[ 87] */ new Table(22, 1, -1, new sbyte[] {38}), +/* NxS[ 88] */ new Table(30, 1, -1, new sbyte[] {89}), +/* NxS[ 89] */ new Table(31, 1, -1, new sbyte[] {90}), +/* NxS[ 90] */ new Table(28, 1, -1, new sbyte[] {91}), /* NxS[ 91] */ new Table(32, 1, -1, new sbyte[] {92}), -/* NxS[ 92] */ new Table(33, 1, -1, new sbyte[] {93}), -/* NxS[ 93] */ new Table(34, 1, -1, new sbyte[] {94}), -/* NxS[ 94] */ new Table(35, 1, -1, new sbyte[] {95}), -/* NxS[ 95] */ new Table(22, 1, -1, new sbyte[] {96}), -/* NxS[ 96] */ new Table(22, 1, -1, new sbyte[] {39}), -/* NxS[ 97] */ new Table(0, 7, 97, new sbyte[] {-1, 97, 51, 97, 97, 97, +/* NxS[ 92] */ new Table(32, 1, -1, new sbyte[] {93}), +/* NxS[ 93] */ new Table(33, 1, -1, new sbyte[] {94}), +/* NxS[ 94] */ new Table(34, 1, -1, new sbyte[] {95}), +/* NxS[ 95] */ new Table(35, 1, -1, new sbyte[] {96}), +/* NxS[ 96] */ new Table(22, 1, -1, new sbyte[] {97}), +/* NxS[ 97] */ new Table(22, 1, -1, new sbyte[] {39}), +/* NxS[ 98] */ new Table(0, 7, 98, new sbyte[] {-1, 98, 52, 98, 98, 98, -1}), -/* NxS[ 98] */ new Table(2, 1, 54, new sbyte[] {55}), -/* NxS[ 99] */ new Table(8, 1, 56, new sbyte[] {57}), -/* NxS[ 100] */ new Table(0, 0, -1, null), -/* NxS[ 101] */ new Table(1, 3, 59, new sbyte[] {60, 59, 61}), -/* NxS[ 102] */ new Table(0, 7, 102, new sbyte[] {-1, 102, 62, 102, 102, 102, +/* NxS[ 99] */ new Table(2, 1, 55, new sbyte[] {56}), +/* NxS[ 100] */ new Table(8, 1, 57, new sbyte[] {58}), +/* NxS[ 101] */ new Table(0, 0, -1, null), +/* NxS[ 102] */ new Table(1, 3, 60, new sbyte[] {61, 60, 62}), +/* NxS[ 103] */ new Table(0, 7, 103, new sbyte[] {-1, 103, 63, 103, 103, 103, -1}), }; @@ -2068,24 +2069,27 @@ return (int)Tokens.tkQuestionPoint; return (int)Tokens.tkQuestionSquareOpen; break; case 46: -return (int)Tokens.tkDotDot; +return (int)Tokens.tkDoubleQuestion; break; case 47: -yylval = new Union(); yylval.op = new op_type_node(Operators.Assignment); return (int)Tokens.tkAssign; +return (int)Tokens.tkDotDot; break; case 48: -yylval = new Union(); yylval.op = new op_type_node(Operators.AssignmentMultiplication); return (int)Tokens.tkMultEqual; +yylval = new Union(); yylval.op = new op_type_node(Operators.Assignment); return (int)Tokens.tkAssign; break; case 49: -BEGIN(COMMENT1); +yylval = new Union(); yylval.op = new op_type_node(Operators.AssignmentMultiplication); return (int)Tokens.tkMultEqual; break; case 50: +BEGIN(COMMENT1); + break; + case 51: yylval = new Union(); currentLexLocation = CurrentLexLocation; yylval.ex = parsertools.create_hex_const(yytext,currentLexLocation); return (int)Tokens.tkHex; break; - case 51: + case 52: if (parsertools.build_tree_for_formatter) break; @@ -2136,36 +2140,36 @@ if (parsertools.build_tree_for_formatter) Defines.Add(directiveparam); } break; - case 52: + case 53: { } break; - case 53: + case 54: yylval = new Union(); yylval.op = new op_type_node(Operators.AssignmentDivision); return (int)Tokens.tkDivEqual; break; - case 54: + case 55: { } break; - case 55: -BEGIN(INITIAL); - break; case 56: - case 57: -{ -} - break; - case 58: BEGIN(INITIAL); break; - case 59: - case 60: - case 61: + case 57: + case 58: { } break; + case 59: +BEGIN(INITIAL); + break; + case 60: + case 61: case 62: +{ +} + break; + case 63: parsertools.DivideDirectiveOn(yytext,out directivename,out directiveparam); parsertools.CheckDirectiveParams(directivename,directiveparam); // directivename in UPPERCASE! if (directivename == "IFDEF") @@ -2197,7 +2201,7 @@ parsertools.DivideDirectiveOn(yytext,out directivename,out directiveparam); BEGIN(INITIAL); } break; - case 63: + case 64: { } diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.lex b/Parsers/PascalABCParserNewSaushkin/ABCPascal.lex index 38bec9023..f01caeb15 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.lex +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.lex @@ -186,6 +186,7 @@ UNICODEARROW \x890 "]" { return (int)Tokens.tkSquareClose; } "?" { return (int)Tokens.tkQuestion; } "?." { return (int)Tokens.tkQuestionPoint; } +"??" { return (int)Tokens.tkDoubleQuestion; } "?[" { return (int)Tokens.tkQuestionSquareOpen; } "@" { yylval = new Union(); yylval.op = new op_type_node(Operators.AddressOf); return (int)Tokens.tkAddressOf; } ":=" { yylval = new Union(); yylval.op = new op_type_node(Operators.Assignment); return (int)Tokens.tkAssign; } diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y index 8cb5036dc..8dfe7a278 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y @@ -31,7 +31,7 @@ %start parse_goal -%token tkDirectiveName tkAmpersend tkColon tkDotDot tkPoint tkRoundOpen tkRoundClose tkSemiColon tkSquareOpen tkSquareClose tkQuestion tkQuestionPoint tkQuestionSquareOpen +%token tkDirectiveName tkAmpersend tkColon tkDotDot tkPoint tkRoundOpen tkRoundClose tkSemiColon tkSquareOpen tkSquareClose tkQuestion tkQuestionPoint tkDoubleQuestion tkQuestionSquareOpen %token tkSizeOf tkTypeOf tkWhere tkArray tkCase tkClass tkAuto tkConst tkConstructor tkDestructor tkElse tkExcept tkFile tkFor tkForeach tkFunction %token tkIf tkImplementation tkInherited tkInterface tkProcedure tkOperator tkProperty tkRaise tkRecord tkSet tkType tkThen tkUses tkVar tkWhile tkWith tkNil %token tkGoto tkOf tkLabel tkLock tkProgram tkEvent tkDefault tkTemplate tkPacked tkExports tkResourceString tkThreadvar tkSealed tkPartial tkTo tkDownto @@ -79,7 +79,7 @@ %type typed_const_list1 typed_const_list optional_expr_list elem_list optional_expr_list_with_bracket expr_list const_elem_list1 const_func_expr_list case_label_list const_elem_list optional_const_func_expr_list elem_list1 %type enumeration_id expr_l1_list %type enumeration_id_list -%type const_simple_expr term typed_const typed_const_plus typed_var_init_expression expr expr_with_func_decl_lambda const_expr elem range_expr const_elem array_const factor relop_expr expr_l1 simple_expr range_term range_factor +%type const_simple_expr term typed_const typed_const_plus typed_var_init_expression expr expr_with_func_decl_lambda const_expr elem range_expr const_elem array_const factor relop_expr double_question_expr expr_l1 simple_expr range_term range_factor %type external_directive_ident init_const_expr case_label variable var_reference simple_expr_or_nothing var_question_point %type for_cycle_type %type format_expr @@ -1073,6 +1073,13 @@ type_decl_type type_ref : simple_type { $$ = $1; } + | simple_type tkQuestion + { + var l = new List(); + l.Add(new ident("System")); + l.Add(new ident("Nullable")); + $$ = new template_type_reference(new named_type_reference(l), new template_param_list($1), @$); + } | string_type { $$ = $1; } | pointer_type @@ -2688,11 +2695,18 @@ expr ; expr_l1 - : relop_expr + : double_question_expr { $$ = $1; } | question_expr { $$ = $1; } ; + +double_question_expr + : relop_expr + { $$ = $1; } + | double_question_expr tkDoubleQuestion relop_expr + { $$ = new double_question_node($1 as expression, $3 as expression, @$);} + ; sizeof_expr : tkSizeOf tkRoundOpen simple_or_template_type_reference tkRoundClose diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index f5fed0249..afa41426c 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -1,10 +1,10 @@ // (see accompanying GPPGcopyright.rtf) // GPPG version 1.3.6 -// Machine: DESKTOP-8EAQPI9 -// DateTime: 01.06.2017 21:50:37 -// UserName: ????????? -// Input file +// Machine: JANE-MSI +// DateTime: 03.06.2017 0:09:25 +// UserName: Jane +// Input file // options: no-lines gplex @@ -24,28 +24,28 @@ namespace GPPGParserScanner public enum Tokens { error=1,EOF=2,tkDirectiveName=3,tkAmpersend=4,tkColon=5,tkDotDot=6, tkPoint=7,tkRoundOpen=8,tkRoundClose=9,tkSemiColon=10,tkSquareOpen=11,tkSquareClose=12, - tkQuestion=13,tkQuestionPoint=14,tkQuestionSquareOpen=15,tkSizeOf=16,tkTypeOf=17,tkWhere=18, - tkArray=19,tkCase=20,tkClass=21,tkAuto=22,tkConst=23,tkConstructor=24, - tkDestructor=25,tkElse=26,tkExcept=27,tkFile=28,tkFor=29,tkForeach=30, - tkFunction=31,tkIf=32,tkImplementation=33,tkInherited=34,tkInterface=35,tkProcedure=36, - tkOperator=37,tkProperty=38,tkRaise=39,tkRecord=40,tkSet=41,tkType=42, - tkThen=43,tkUses=44,tkVar=45,tkWhile=46,tkWith=47,tkNil=48, - tkGoto=49,tkOf=50,tkLabel=51,tkLock=52,tkProgram=53,tkEvent=54, - tkDefault=55,tkTemplate=56,tkPacked=57,tkExports=58,tkResourceString=59,tkThreadvar=60, - tkSealed=61,tkPartial=62,tkTo=63,tkDownto=64,tkCycle=65,tkSequence=66, - tkYield=67,tkNew=68,tkOn=69,tkName=70,tkPrivate=71,tkProtected=72, - tkPublic=73,tkInternal=74,tkRead=75,tkWrite=76,tkParseModeExpression=77,tkParseModeStatement=78, - tkParseModeType=79,tkBegin=80,tkEnd=81,tkAsmBody=82,tkILCode=83,tkError=84, - INVISIBLE=85,tkRepeat=86,tkUntil=87,tkDo=88,tkComma=89,tkFinally=90, - tkTry=91,tkInitialization=92,tkFinalization=93,tkUnit=94,tkLibrary=95,tkExternal=96, - tkParams=97,tkAssign=98,tkPlusEqual=99,tkMinusEqual=100,tkMultEqual=101,tkDivEqual=102, - tkMinus=103,tkPlus=104,tkSlash=105,tkStar=106,tkEqual=107,tkGreater=108, - tkGreaterEqual=109,tkLower=110,tkLowerEqual=111,tkNotEqual=112,tkCSharpStyleOr=113,tkArrow=114, - tkOr=115,tkXor=116,tkAnd=117,tkDiv=118,tkMod=119,tkShl=120, - tkShr=121,tkNot=122,tkAs=123,tkIn=124,tkIs=125,tkImplicit=126, - tkExplicit=127,tkAddressOf=128,tkDeref=129,tkIdentifier=130,tkStringLiteral=131,tkAsciiChar=132, - tkAbstract=133,tkForward=134,tkOverload=135,tkReintroduce=136,tkOverride=137,tkVirtual=138, - tkExtensionMethod=139,tkInteger=140,tkFloat=141,tkHex=142}; + tkQuestion=13,tkQuestionPoint=14,tkDoubleQuestion=15,tkQuestionSquareOpen=16,tkSizeOf=17,tkTypeOf=18, + tkWhere=19,tkArray=20,tkCase=21,tkClass=22,tkAuto=23,tkConst=24, + tkConstructor=25,tkDestructor=26,tkElse=27,tkExcept=28,tkFile=29,tkFor=30, + tkForeach=31,tkFunction=32,tkIf=33,tkImplementation=34,tkInherited=35,tkInterface=36, + tkProcedure=37,tkOperator=38,tkProperty=39,tkRaise=40,tkRecord=41,tkSet=42, + tkType=43,tkThen=44,tkUses=45,tkVar=46,tkWhile=47,tkWith=48, + tkNil=49,tkGoto=50,tkOf=51,tkLabel=52,tkLock=53,tkProgram=54, + tkEvent=55,tkDefault=56,tkTemplate=57,tkPacked=58,tkExports=59,tkResourceString=60, + tkThreadvar=61,tkSealed=62,tkPartial=63,tkTo=64,tkDownto=65,tkCycle=66, + tkSequence=67,tkYield=68,tkNew=69,tkOn=70,tkName=71,tkPrivate=72, + tkProtected=73,tkPublic=74,tkInternal=75,tkRead=76,tkWrite=77,tkParseModeExpression=78, + tkParseModeStatement=79,tkParseModeType=80,tkBegin=81,tkEnd=82,tkAsmBody=83,tkILCode=84, + tkError=85,INVISIBLE=86,tkRepeat=87,tkUntil=88,tkDo=89,tkComma=90, + tkFinally=91,tkTry=92,tkInitialization=93,tkFinalization=94,tkUnit=95,tkLibrary=96, + tkExternal=97,tkParams=98,tkAssign=99,tkPlusEqual=100,tkMinusEqual=101,tkMultEqual=102, + tkDivEqual=103,tkMinus=104,tkPlus=105,tkSlash=106,tkStar=107,tkEqual=108, + tkGreater=109,tkGreaterEqual=110,tkLower=111,tkLowerEqual=112,tkNotEqual=113,tkCSharpStyleOr=114, + tkArrow=115,tkOr=116,tkXor=117,tkAnd=118,tkDiv=119,tkMod=120, + tkShl=121,tkShr=122,tkNot=123,tkAs=124,tkIn=125,tkIs=126, + tkImplicit=127,tkExplicit=128,tkAddressOf=129,tkDeref=130,tkIdentifier=131,tkStringLiteral=132, + tkAsciiChar=133,tkAbstract=134,tkForward=135,tkOverload=136,tkReintroduce=137,tkOverride=138, + tkVirtual=139,tkExtensionMethod=140,tkInteger=141,tkFloat=142,tkHex=143}; // Abstract base class for GPLEX scanners public abstract class ScanBase : AbstractScanner { @@ -56,7 +56,7 @@ public abstract class ScanBase : AbstractScanner { - // Verbatim content from J:\PascalABC.NET\!PABC_Git\Parsers\PascalABCParserNewSaushkin\ABCPascal.y + // Verbatim content from ABCPascal.y // ��� ���������� ����������� � ����� GPPGParser, �������������� ����� ������, ������������ �������� gppg public syntax_tree_node root; // �������� ���� ��������������� ������ @@ -68,13 +68,13 @@ public partial class GPPGParser: ShiftReduceParser scanner) : base(scanner) { } - // End verbatim content from J:\PascalABC.NET\!PABC_Git\Parsers\PascalABCParserNewSaushkin\ABCPascal.y + // End verbatim content from ABCPascal.y #pragma warning disable 649 private static Dictionary aliasses; #pragma warning restore 649 - private static Rule[] rules = new Rule[822]; - private static State[] states = new State[1323]; + private static Rule[] rules = new Rule[825]; + private static State[] states = new State[1327]; private static string[] nonTerms = new string[] { "parse_goal", "unit_key_word", "assignment", "optional_array_initializer", "attribute_declarations", "ot_visibility_specifier", "one_attribute", "attribute_variable", @@ -96,45 +96,46 @@ public partial class GPPGParser: ShiftReduceParser simple_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 206: // type_ref -> string_type + case 206: // type_ref -> simple_type, tkQuestion +{ + var l = new List(); + l.Add(new ident("System")); + l.Add(new ident("Nullable")); + CurrentSemanticValue.td = new template_type_reference(new named_type_reference(l), new template_param_list(ValueStack[ValueStack.Depth-2].td), CurrentLocationSpan); + } + break; + case 207: // type_ref -> string_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 207: // type_ref -> pointer_type + case 208: // type_ref -> pointer_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 208: // type_ref -> structured_type + case 209: // type_ref -> structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 209: // type_ref -> procedural_type + case 210: // type_ref -> procedural_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 210: // type_ref -> template_type + case 211: // type_ref -> template_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 211: // template_type -> simple_type_identifier, template_type_params + case 212: // template_type -> simple_type_identifier, template_type_params { CurrentSemanticValue.td = new template_type_reference(ValueStack[ValueStack.Depth-2].td as named_type_reference, ValueStack[ValueStack.Depth-1].stn as template_param_list, CurrentLocationSpan); } break; - case 212: // template_type_params -> tkLower, template_param_list, tkGreater + case 213: // template_type_params -> tkLower, template_param_list, tkGreater { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 213: // template_param_list -> template_param + case 214: // template_param_list -> template_param { CurrentSemanticValue.stn = new template_param_list(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 214: // template_param_list -> template_param_list, tkComma, template_param + case 215: // template_param_list -> template_param_list, tkComma, template_param { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as template_param_list).Add(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 215: // template_param -> simple_type + case 216: // template_param -> simple_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 216: // template_param -> structured_type + case 217: // template_param -> structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 217: // template_param -> procedural_type + case 218: // template_param -> procedural_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 218: // template_param -> template_type + case 219: // template_param -> template_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 219: // simple_type -> range_expr + case 220: // simple_type -> range_expr { CurrentSemanticValue.td = parsertools.ConvertDotNodeOrIdentToNamedTypeReference(ValueStack[ValueStack.Depth-1].ex); } break; - case 220: // simple_type -> range_expr, tkDotDot, range_expr + case 221: // simple_type -> range_expr, tkDotDot, range_expr { CurrentSemanticValue.td = new diapason(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 221: // simple_type -> tkRoundOpen, enumeration_id_list, tkRoundClose + case 222: // simple_type -> tkRoundOpen, enumeration_id_list, tkRoundClose { CurrentSemanticValue.td = new enum_type_definition(ValueStack[ValueStack.Depth-2].stn as enumerator_list, CurrentLocationSpan); } break; - case 222: // range_expr -> range_term + case 223: // range_expr -> range_term { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 223: // range_expr -> range_expr, const_addop, range_term + case 224: // range_expr -> range_expr, const_addop, range_term { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 224: // range_term -> range_factor + case 225: // range_term -> range_factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 225: // range_term -> range_term, const_mulop, range_factor + case 226: // range_term -> range_term, const_mulop, range_factor { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 226: // range_factor -> simple_type_identifier + case 227: // range_factor -> simple_type_identifier { CurrentSemanticValue.ex = parsertools.ConvertNamedTypeReferenceToDotNodeOrIdent(ValueStack[ValueStack.Depth-1].td as named_type_reference); } break; - case 227: // range_factor -> unsigned_number + case 228: // range_factor -> unsigned_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 228: // range_factor -> sign, range_factor + case 229: // range_factor -> sign, range_factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 229: // range_factor -> literal + case 230: // range_factor -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 230: // range_factor -> range_factor, tkRoundOpen, const_elem_list, tkRoundClose + case 231: // range_factor -> range_factor, tkRoundOpen, const_elem_list, tkRoundClose { CurrentSemanticValue.ex = new method_call(ValueStack[ValueStack.Depth-4].ex as addressed_value, ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 231: // simple_type_identifier -> identifier + case 232: // simple_type_identifier -> identifier { CurrentSemanticValue.td = new named_type_reference(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 232: // simple_type_identifier -> simple_type_identifier, tkPoint, + case 233: // simple_type_identifier -> simple_type_identifier, tkPoint, // identifier_or_keyword { CurrentSemanticValue.td = (ValueStack[ValueStack.Depth-3].td as named_type_reference).Add(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 233: // enumeration_id_list -> enumeration_id, tkComma, enumeration_id + case 234: // enumeration_id_list -> enumeration_id, tkComma, enumeration_id { CurrentSemanticValue.stn = new enumerator_list(ValueStack[ValueStack.Depth-3].stn as enumerator, CurrentLocationSpan); (CurrentSemanticValue.stn as enumerator_list).Add(ValueStack[ValueStack.Depth-1].stn as enumerator, CurrentLocationSpan); } break; - case 234: // enumeration_id_list -> enumeration_id_list, tkComma, enumeration_id + case 235: // enumeration_id_list -> enumeration_id_list, tkComma, enumeration_id { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as enumerator_list).Add(ValueStack[ValueStack.Depth-1].stn as enumerator, CurrentLocationSpan); } break; - case 235: // enumeration_id -> type_ref + case 236: // enumeration_id -> type_ref { CurrentSemanticValue.stn = new enumerator(ValueStack[ValueStack.Depth-1].td, null, CurrentLocationSpan); } break; - case 236: // enumeration_id -> type_ref, tkEqual, expr + case 237: // enumeration_id -> type_ref, tkEqual, expr { CurrentSemanticValue.stn = new enumerator(ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 237: // pointer_type -> tkDeref, fptype + case 238: // pointer_type -> tkDeref, fptype { CurrentSemanticValue.td = new ref_type(ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 238: // structured_type -> unpacked_structured_type + case 239: // structured_type -> unpacked_structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 239: // structured_type -> tkPacked, unpacked_structured_type + case 240: // structured_type -> tkPacked, unpacked_structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 240: // unpacked_structured_type -> array_type + case 241: // unpacked_structured_type -> array_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 241: // unpacked_structured_type -> record_type + case 242: // unpacked_structured_type -> record_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 242: // unpacked_structured_type -> set_type + case 243: // unpacked_structured_type -> set_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 243: // unpacked_structured_type -> file_type + case 244: // unpacked_structured_type -> file_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 244: // unpacked_structured_type -> sequence_type + case 245: // unpacked_structured_type -> sequence_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 245: // sequence_type -> tkSequence, tkOf, type_ref + case 246: // sequence_type -> tkSequence, tkOf, type_ref { CurrentSemanticValue.td = new sequence_type(ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 246: // array_type -> tkArray, tkSquareOpen, simple_type_list, tkSquareClose, tkOf, + case 247: // array_type -> tkArray, tkSquareOpen, simple_type_list, tkSquareClose, tkOf, // type_ref { CurrentSemanticValue.td = new array_type(ValueStack[ValueStack.Depth-4].stn as indexers_types, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 247: // array_type -> unsized_array_type + case 248: // array_type -> unsized_array_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 248: // unsized_array_type -> tkArray, tkOf, type_ref + case 249: // unsized_array_type -> tkArray, tkOf, type_ref { CurrentSemanticValue.td = new array_type(null, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 249: // simple_type_list -> simple_type_or_ + case 250: // simple_type_list -> simple_type_or_ { CurrentSemanticValue.stn = new indexers_types(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 250: // simple_type_list -> simple_type_list, tkComma, simple_type_or_ + case 251: // simple_type_list -> simple_type_list, tkComma, simple_type_or_ { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as indexers_types).Add(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 251: // simple_type_or_ -> simple_type + case 252: // simple_type_or_ -> simple_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 252: // simple_type_or_ -> /* empty */ + case 253: // simple_type_or_ -> /* empty */ { CurrentSemanticValue.td = null; } break; - case 253: // set_type -> tkSet, tkOf, simple_type + case 254: // set_type -> tkSet, tkOf, simple_type { CurrentSemanticValue.td = new set_type_definition(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 254: // file_type -> tkFile, tkOf, type_ref + case 255: // file_type -> tkFile, tkOf, type_ref { CurrentSemanticValue.td = new file_type(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 255: // file_type -> tkFile + case 256: // file_type -> tkFile { CurrentSemanticValue.td = new file_type(); CurrentSemanticValue.td.source_context = CurrentLocationSpan; } break; - case 256: // string_type -> tkIdentifier, tkSquareOpen, const_expr, tkSquareClose + case 257: // string_type -> tkIdentifier, tkSquareOpen, const_expr, tkSquareClose { CurrentSemanticValue.td = new string_num_definition(ValueStack[ValueStack.Depth-2].ex, ValueStack[ValueStack.Depth-4].id, CurrentLocationSpan); } break; - case 257: // procedural_type -> procedural_type_kind + case 258: // procedural_type -> procedural_type_kind { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 258: // procedural_type_kind -> proc_type_decl + case 259: // procedural_type_kind -> proc_type_decl { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 259: // proc_type_decl -> tkProcedure, fp_list + case 260: // proc_type_decl -> tkProcedure, fp_list { CurrentSemanticValue.td = new procedure_header(ValueStack[ValueStack.Depth-1].stn as formal_parameters,null,null,false,false,null,null,CurrentLocationSpan); } break; - case 260: // proc_type_decl -> tkFunction, fp_list + case 261: // proc_type_decl -> tkFunction, fp_list { CurrentSemanticValue.td = new function_header(ValueStack[ValueStack.Depth-1].stn as formal_parameters, null, null, null, null, CurrentLocationSpan); } break; - case 261: // proc_type_decl -> tkFunction, fp_list, tkColon, fptype + case 262: // proc_type_decl -> tkFunction, fp_list, tkColon, fptype { CurrentSemanticValue.td = new function_header(ValueStack[ValueStack.Depth-3].stn as formal_parameters, null, null, null, ValueStack[ValueStack.Depth-1].td as type_definition, CurrentLocationSpan); } break; - case 262: // proc_type_decl -> simple_type_identifier, tkArrow, template_param + case 263: // proc_type_decl -> simple_type_identifier, tkArrow, template_param { CurrentSemanticValue.td = new modern_proc_type(ValueStack[ValueStack.Depth-3].td,null,ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 263: // proc_type_decl -> template_type, tkArrow, template_param + case 264: // proc_type_decl -> template_type, tkArrow, template_param { CurrentSemanticValue.td = new modern_proc_type(ValueStack[ValueStack.Depth-3].td,null,ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 264: // proc_type_decl -> tkRoundOpen, tkRoundClose, tkArrow, template_param + case 265: // proc_type_decl -> tkRoundOpen, tkRoundClose, tkArrow, template_param { CurrentSemanticValue.td = new modern_proc_type(null,null,ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 265: // proc_type_decl -> tkRoundOpen, enumeration_id_list, tkRoundClose, tkArrow, + case 266: // proc_type_decl -> tkRoundOpen, enumeration_id_list, tkRoundClose, tkArrow, // template_param { CurrentSemanticValue.td = new modern_proc_type(null,ValueStack[ValueStack.Depth-4].stn as enumerator_list,ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 266: // proc_type_decl -> simple_type_identifier, tkArrow, tkRoundOpen, tkRoundClose + case 267: // proc_type_decl -> simple_type_identifier, tkArrow, tkRoundOpen, tkRoundClose { CurrentSemanticValue.td = new modern_proc_type(ValueStack[ValueStack.Depth-4].td,null,null,CurrentLocationSpan); } break; - case 267: // proc_type_decl -> template_type, tkArrow, tkRoundOpen, tkRoundClose + case 268: // proc_type_decl -> template_type, tkArrow, tkRoundOpen, tkRoundClose { CurrentSemanticValue.td = new modern_proc_type(ValueStack[ValueStack.Depth-4].td,null,null,CurrentLocationSpan); } break; - case 268: // proc_type_decl -> tkRoundOpen, tkRoundClose, tkArrow, tkRoundOpen, tkRoundClose + case 269: // proc_type_decl -> tkRoundOpen, tkRoundClose, tkArrow, tkRoundOpen, tkRoundClose { CurrentSemanticValue.td = new modern_proc_type(null,null,null,CurrentLocationSpan); } break; - case 269: // proc_type_decl -> tkRoundOpen, enumeration_id_list, tkRoundClose, tkArrow, + case 270: // proc_type_decl -> tkRoundOpen, enumeration_id_list, tkRoundClose, tkArrow, // tkRoundOpen, tkRoundClose { CurrentSemanticValue.td = new modern_proc_type(null,ValueStack[ValueStack.Depth-5].stn as enumerator_list,null,CurrentLocationSpan); } break; - case 270: // object_type -> class_attributes, class_or_interface_keyword, + case 271: // object_type -> class_attributes, class_or_interface_keyword, // optional_base_classes, optional_where_section, // optional_component_list_seq_end { CurrentSemanticValue.td = NewObjectType((class_attribute)ValueStack[ValueStack.Depth-5].ob, ValueStack[ValueStack.Depth-4].ti, ValueStack[ValueStack.Depth-3].stn as named_type_reference_list, ValueStack[ValueStack.Depth-2].stn as where_definition_list, ValueStack[ValueStack.Depth-1].stn as class_body, CurrentLocationSpan); } break; - case 271: // record_type -> tkRecord, optional_base_classes, optional_where_section, + case 272: // record_type -> tkRecord, optional_base_classes, optional_where_section, // member_list_section, tkEnd { CurrentSemanticValue.td = NewRecordType(ValueStack[ValueStack.Depth-4].stn as named_type_reference_list, ValueStack[ValueStack.Depth-3].stn as where_definition_list, ValueStack[ValueStack.Depth-2].stn as class_body, CurrentLocationSpan); } break; - case 272: // class_attribute -> tkSealed + case 273: // class_attribute -> tkSealed { CurrentSemanticValue.ob = class_attribute.Sealed; } break; - case 273: // class_attribute -> tkPartial + case 274: // class_attribute -> tkPartial { CurrentSemanticValue.ob = class_attribute.Partial; } break; - case 274: // class_attribute -> tkAbstract + case 275: // class_attribute -> tkAbstract { CurrentSemanticValue.ob = class_attribute.Abstract; } break; - case 275: // class_attribute -> tkAuto + case 276: // class_attribute -> tkAuto { CurrentSemanticValue.ob = class_attribute.Auto; } break; - case 276: // class_attributes -> /* empty */ + case 277: // class_attributes -> /* empty */ { CurrentSemanticValue.ob = class_attribute.None; } break; - case 277: // class_attributes -> class_attributes1 + case 278: // class_attributes -> class_attributes1 { CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-1].ob; } break; - case 278: // class_attributes1 -> class_attribute + case 279: // class_attributes1 -> class_attribute { CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-1].ob; } break; - case 279: // class_attributes1 -> class_attributes1, class_attribute + case 280: // class_attributes1 -> class_attributes1, class_attribute { ValueStack[ValueStack.Depth-2].ob = ((class_attribute)ValueStack[ValueStack.Depth-2].ob) | ((class_attribute)ValueStack[ValueStack.Depth-1].ob); CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-2].ob; } break; - case 280: // class_or_interface_keyword -> tkClass + case 281: // class_or_interface_keyword -> tkClass { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 281: // class_or_interface_keyword -> tkInterface + case 282: // class_or_interface_keyword -> tkInterface { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 282: // class_or_interface_keyword -> tkTemplate + case 283: // class_or_interface_keyword -> tkTemplate { CurrentSemanticValue.ti = NewClassOrInterfaceKeyword(ValueStack[ValueStack.Depth-1].ti); } break; - case 283: // class_or_interface_keyword -> tkTemplate, tkClass + case 284: // class_or_interface_keyword -> tkTemplate, tkClass { CurrentSemanticValue.ti = NewClassOrInterfaceKeyword(ValueStack[ValueStack.Depth-2].ti, "c", CurrentLocationSpan); } break; - case 284: // class_or_interface_keyword -> tkTemplate, tkRecord + case 285: // class_or_interface_keyword -> tkTemplate, tkRecord { CurrentSemanticValue.ti = NewClassOrInterfaceKeyword(ValueStack[ValueStack.Depth-2].ti, "r", CurrentLocationSpan); } break; - case 285: // class_or_interface_keyword -> tkTemplate, tkInterface + case 286: // class_or_interface_keyword -> tkTemplate, tkInterface { CurrentSemanticValue.ti = NewClassOrInterfaceKeyword(ValueStack[ValueStack.Depth-2].ti, "i", CurrentLocationSpan); } break; - case 286: // optional_component_list_seq_end -> /* empty */ + case 287: // optional_component_list_seq_end -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 287: // optional_component_list_seq_end -> member_list_section, tkEnd + case 288: // optional_component_list_seq_end -> member_list_section, tkEnd { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 289: // optional_base_classes -> tkRoundOpen, base_classes_names_list, tkRoundClose + case 290: // optional_base_classes -> tkRoundOpen, base_classes_names_list, tkRoundClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 290: // base_classes_names_list -> base_class_name + case 291: // base_classes_names_list -> base_class_name { CurrentSemanticValue.stn = new named_type_reference_list(ValueStack[ValueStack.Depth-1].stn as named_type_reference, CurrentLocationSpan); } break; - case 291: // base_classes_names_list -> base_classes_names_list, tkComma, base_class_name + case 292: // base_classes_names_list -> base_classes_names_list, tkComma, base_class_name { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as named_type_reference_list).Add(ValueStack[ValueStack.Depth-1].stn as named_type_reference, CurrentLocationSpan); } break; - case 292: // base_class_name -> simple_type_identifier + case 293: // base_class_name -> simple_type_identifier { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].td; } break; - case 293: // base_class_name -> template_type + case 294: // base_class_name -> template_type { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].td; } break; - case 294: // template_arguments -> tkLower, ident_list, tkGreater + case 295: // template_arguments -> tkLower, ident_list, tkGreater { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 295: // optional_where_section -> /* empty */ + case 296: // optional_where_section -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 296: // optional_where_section -> where_part_list + case 297: // optional_where_section -> where_part_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 297: // where_part_list -> where_part + case 298: // where_part_list -> where_part { CurrentSemanticValue.stn = new where_definition_list(ValueStack[ValueStack.Depth-1].stn as where_definition, CurrentLocationSpan); } break; - case 298: // where_part_list -> where_part_list, where_part + case 299: // where_part_list -> where_part_list, where_part { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-2].stn as where_definition_list).Add(ValueStack[ValueStack.Depth-1].stn as where_definition, CurrentLocationSpan); } break; - case 299: // where_part -> tkWhere, ident_list, tkColon, type_ref_and_secific_list, + case 300: // where_part -> tkWhere, ident_list, tkColon, type_ref_and_secific_list, // tkSemiColon { CurrentSemanticValue.stn = new where_definition(ValueStack[ValueStack.Depth-4].stn as ident_list, ValueStack[ValueStack.Depth-2].stn as where_type_specificator_list, CurrentLocationSpan); } break; - case 300: // type_ref_and_secific_list -> type_ref_or_secific + case 301: // type_ref_and_secific_list -> type_ref_or_secific { CurrentSemanticValue.stn = new where_type_specificator_list(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 301: // type_ref_and_secific_list -> type_ref_and_secific_list, tkComma, + case 302: // type_ref_and_secific_list -> type_ref_and_secific_list, tkComma, // type_ref_or_secific { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as where_type_specificator_list).Add(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 302: // type_ref_or_secific -> type_ref + case 303: // type_ref_or_secific -> type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 303: // type_ref_or_secific -> tkClass + case 304: // type_ref_or_secific -> tkClass { CurrentSemanticValue.td = new declaration_specificator(DeclarationSpecificator.WhereDefClass, ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 304: // type_ref_or_secific -> tkRecord + case 305: // type_ref_or_secific -> tkRecord { CurrentSemanticValue.td = new declaration_specificator(DeclarationSpecificator.WhereDefValueType, ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 305: // type_ref_or_secific -> tkConstructor + case 306: // type_ref_or_secific -> tkConstructor { CurrentSemanticValue.td = new declaration_specificator(DeclarationSpecificator.WhereDefConstructor, ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 306: // member_list_section -> member_list + case 307: // member_list_section -> member_list { CurrentSemanticValue.stn = new class_body(ValueStack[ValueStack.Depth-1].stn as class_members, CurrentLocationSpan); } break; - case 307: // member_list_section -> member_list_section, ot_visibility_specifier, + case 308: // member_list_section -> member_list_section, ot_visibility_specifier, // member_list { (ValueStack[ValueStack.Depth-1].stn as class_members).access_mod = ValueStack[ValueStack.Depth-2].stn as access_modifer_node; @@ -3602,302 +3618,302 @@ public partial class GPPGParser: ShiftReduceParser tkInternal + case 309: // ot_visibility_specifier -> tkInternal { CurrentSemanticValue.stn = new access_modifer_node(access_modifer.internal_modifer, CurrentLocationSpan); } break; - case 309: // ot_visibility_specifier -> tkPublic + case 310: // ot_visibility_specifier -> tkPublic { CurrentSemanticValue.stn = new access_modifer_node(access_modifer.public_modifer, CurrentLocationSpan); } break; - case 310: // ot_visibility_specifier -> tkProtected + case 311: // ot_visibility_specifier -> tkProtected { CurrentSemanticValue.stn = new access_modifer_node(access_modifer.protected_modifer, CurrentLocationSpan); } break; - case 311: // ot_visibility_specifier -> tkPrivate + case 312: // ot_visibility_specifier -> tkPrivate { CurrentSemanticValue.stn = new access_modifer_node(access_modifer.private_modifer, CurrentLocationSpan); } break; - case 312: // member_list -> /* empty */ + case 313: // member_list -> /* empty */ { CurrentSemanticValue.stn = new class_members(); } break; - case 313: // member_list -> field_or_const_definition_list, optional_semicolon + case 314: // member_list -> field_or_const_definition_list, optional_semicolon { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 314: // member_list -> method_decl_list + case 315: // member_list -> method_decl_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 315: // member_list -> field_or_const_definition_list, tkSemiColon, method_decl_list + case 316: // member_list -> field_or_const_definition_list, tkSemiColon, method_decl_list { (ValueStack[ValueStack.Depth-3].stn as class_members).members.AddRange((ValueStack[ValueStack.Depth-1].stn as class_members).members); (ValueStack[ValueStack.Depth-3].stn as class_members).source_context = CurrentLocationSpan; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-3].stn; } break; - case 316: // ident_list -> identifier + case 317: // ident_list -> identifier { CurrentSemanticValue.stn = new ident_list(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 317: // ident_list -> ident_list, tkComma, identifier + case 318: // ident_list -> ident_list, tkComma, identifier { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as ident_list).Add(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 318: // optional_semicolon -> /* empty */ + case 319: // optional_semicolon -> /* empty */ { CurrentSemanticValue.ob = null; } break; - case 319: // optional_semicolon -> tkSemiColon + case 320: // optional_semicolon -> tkSemiColon { CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-1].ti; } break; - case 320: // field_or_const_definition_list -> field_or_const_definition + case 321: // field_or_const_definition_list -> field_or_const_definition { CurrentSemanticValue.stn = new class_members(ValueStack[ValueStack.Depth-1].stn as declaration, CurrentLocationSpan); } break; - case 321: // field_or_const_definition_list -> field_or_const_definition_list, tkSemiColon, + case 322: // field_or_const_definition_list -> field_or_const_definition_list, tkSemiColon, // field_or_const_definition { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as class_members).Add(ValueStack[ValueStack.Depth-1].stn as declaration, CurrentLocationSpan); } break; - case 322: // field_or_const_definition -> attribute_declarations, + case 323: // field_or_const_definition -> attribute_declarations, // simple_field_or_const_definition { (ValueStack[ValueStack.Depth-1].stn as declaration).attributes = ValueStack[ValueStack.Depth-2].stn as attribute_list; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 323: // method_decl_list -> method_or_property_decl + case 324: // method_decl_list -> method_or_property_decl { CurrentSemanticValue.stn = new class_members(ValueStack[ValueStack.Depth-1].stn as declaration, CurrentLocationSpan); } break; - case 324: // method_decl_list -> method_decl_list, method_or_property_decl + case 325: // method_decl_list -> method_decl_list, method_or_property_decl { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-2].stn as class_members).Add(ValueStack[ValueStack.Depth-1].stn as declaration, CurrentLocationSpan); } break; - case 325: // method_or_property_decl -> method_decl_withattr + case 326: // method_or_property_decl -> method_decl_withattr { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 326: // method_or_property_decl -> property_definition + case 327: // method_or_property_decl -> property_definition { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 327: // simple_field_or_const_definition -> tkConst, only_const_decl + case 328: // simple_field_or_const_definition -> tkConst, only_const_decl { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 328: // simple_field_or_const_definition -> field_definition + case 329: // simple_field_or_const_definition -> field_definition { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 329: // simple_field_or_const_definition -> tkClass, field_definition + case 330: // simple_field_or_const_definition -> tkClass, field_definition { (ValueStack[ValueStack.Depth-1].stn as var_def_statement).var_attr = definition_attribute.Static; (ValueStack[ValueStack.Depth-1].stn as var_def_statement).source_context = CurrentLocationSpan; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 330: // field_definition -> var_decl_part + case 331: // field_definition -> var_decl_part { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 331: // field_definition -> tkEvent, ident_list, tkColon, type_ref + case 332: // field_definition -> tkEvent, ident_list, tkColon, type_ref { CurrentSemanticValue.stn = new var_def_statement(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, null, definition_attribute.None, true, CurrentLocationSpan); } break; - case 332: // method_decl_withattr -> attribute_declarations, method_header + case 333: // method_decl_withattr -> attribute_declarations, method_header { (ValueStack[ValueStack.Depth-1].td as declaration).attributes = ValueStack[ValueStack.Depth-2].stn as attribute_list; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].td; } break; - case 333: // method_decl_withattr -> attribute_declarations, method_decl + case 334: // method_decl_withattr -> attribute_declarations, method_decl { (ValueStack[ValueStack.Depth-1].stn as declaration).attributes = ValueStack[ValueStack.Depth-2].stn as attribute_list; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 334: // method_decl -> inclass_proc_func_decl + case 335: // method_decl -> inclass_proc_func_decl { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 335: // method_decl -> inclass_constr_destr_decl + case 336: // method_decl -> inclass_constr_destr_decl { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 336: // method_header -> tkClass, method_procfunc_header + case 337: // method_header -> tkClass, method_procfunc_header { (ValueStack[ValueStack.Depth-1].td as procedure_header).class_keyword = true; CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 337: // method_header -> method_procfunc_header + case 338: // method_header -> method_procfunc_header { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 338: // method_header -> constr_destr_header + case 339: // method_header -> constr_destr_header { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 339: // method_procfunc_header -> proc_func_header + case 340: // method_procfunc_header -> proc_func_header { CurrentSemanticValue.td = NewProcfuncHeading(ValueStack[ValueStack.Depth-1].td as procedure_header); } break; - case 340: // proc_func_header -> proc_header + case 341: // proc_func_header -> proc_header { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 341: // proc_func_header -> func_header + case 342: // proc_func_header -> func_header { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 342: // constr_destr_header -> tkConstructor, optional_proc_name, fp_list, + case 343: // constr_destr_header -> tkConstructor, optional_proc_name, fp_list, // optional_method_modificators { CurrentSemanticValue.td = new constructor(null,ValueStack[ValueStack.Depth-2].stn as formal_parameters,ValueStack[ValueStack.Depth-1].stn as procedure_attributes_list,ValueStack[ValueStack.Depth-3].stn as method_name,false,false,null,null,CurrentLocationSpan); } break; - case 343: // constr_destr_header -> tkClass, tkConstructor, optional_proc_name, fp_list, + case 344: // constr_destr_header -> tkClass, tkConstructor, optional_proc_name, fp_list, // optional_method_modificators { CurrentSemanticValue.td = new constructor(null,ValueStack[ValueStack.Depth-2].stn as formal_parameters,ValueStack[ValueStack.Depth-1].stn as procedure_attributes_list,ValueStack[ValueStack.Depth-3].stn as method_name,false,true,null,null,CurrentLocationSpan); } break; - case 344: // constr_destr_header -> tkDestructor, optional_proc_name, fp_list, + case 345: // constr_destr_header -> tkDestructor, optional_proc_name, fp_list, // optional_method_modificators { CurrentSemanticValue.td = new destructor(null,ValueStack[ValueStack.Depth-2].stn as formal_parameters,ValueStack[ValueStack.Depth-1].stn as procedure_attributes_list,ValueStack[ValueStack.Depth-3].stn as method_name, false,false,null,null,CurrentLocationSpan); } break; - case 345: // optional_proc_name -> proc_name + case 346: // optional_proc_name -> proc_name { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 346: // optional_proc_name -> /* empty */ + case 347: // optional_proc_name -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 347: // qualified_identifier -> identifier + case 348: // qualified_identifier -> identifier { CurrentSemanticValue.stn = new method_name(null,null,ValueStack[ValueStack.Depth-1].id,null,CurrentLocationSpan); } break; - case 348: // qualified_identifier -> visibility_specifier + case 349: // qualified_identifier -> visibility_specifier { CurrentSemanticValue.stn = new method_name(null,null,ValueStack[ValueStack.Depth-1].id,null,CurrentLocationSpan); } break; - case 349: // qualified_identifier -> qualified_identifier, tkPoint, identifier + case 350: // qualified_identifier -> qualified_identifier, tkPoint, identifier { CurrentSemanticValue.stn = NewQualifiedIdentifier(ValueStack[ValueStack.Depth-3].stn as method_name, ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 350: // qualified_identifier -> qualified_identifier, tkPoint, visibility_specifier + case 351: // qualified_identifier -> qualified_identifier, tkPoint, visibility_specifier { CurrentSemanticValue.stn = NewQualifiedIdentifier(ValueStack[ValueStack.Depth-3].stn as method_name, ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 351: // property_definition -> attribute_declarations, simple_prim_property_definition + case 352: // property_definition -> attribute_declarations, simple_prim_property_definition { CurrentSemanticValue.stn = NewPropertyDefinition(ValueStack[ValueStack.Depth-2].stn as attribute_list, ValueStack[ValueStack.Depth-1].stn as declaration, LocationStack[LocationStack.Depth-1]); } break; - case 352: // simple_prim_property_definition -> simple_property_definition + case 353: // simple_prim_property_definition -> simple_property_definition { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 353: // simple_prim_property_definition -> tkClass, simple_property_definition + case 354: // simple_prim_property_definition -> tkClass, simple_property_definition { CurrentSemanticValue.stn = NewSimplePrimPropertyDefinition(ValueStack[ValueStack.Depth-1].stn as simple_property, CurrentLocationSpan); } break; - case 354: // simple_property_definition -> tkProperty, qualified_identifier, + case 355: // simple_property_definition -> tkProperty, qualified_identifier, // property_interface, property_specifiers, // tkSemiColon, array_defaultproperty { CurrentSemanticValue.stn = NewSimplePropertyDefinition(ValueStack[ValueStack.Depth-5].stn as method_name, ValueStack[ValueStack.Depth-4].stn as property_interface, ValueStack[ValueStack.Depth-3].stn as property_accessors, ValueStack[ValueStack.Depth-1].stn as property_array_default, CurrentLocationSpan); } break; - case 355: // array_defaultproperty -> /* empty */ + case 356: // array_defaultproperty -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 356: // array_defaultproperty -> tkDefault, tkSemiColon + case 357: // array_defaultproperty -> tkDefault, tkSemiColon { CurrentSemanticValue.stn = new property_array_default(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 357: // property_interface -> /* empty */ + case 358: // property_interface -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 358: // property_interface -> property_parameter_list, tkColon, fptype + case 359: // property_interface -> property_parameter_list, tkColon, fptype { CurrentSemanticValue.stn = new property_interface(ValueStack[ValueStack.Depth-3].stn as property_parameter_list, ValueStack[ValueStack.Depth-1].td, null, CurrentLocationSpan); } break; - case 359: // property_parameter_list -> /* empty */ + case 360: // property_parameter_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 360: // property_parameter_list -> tkSquareOpen, parameter_decl_list, tkSquareClose + case 361: // property_parameter_list -> tkSquareOpen, parameter_decl_list, tkSquareClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 361: // parameter_decl_list -> parameter_decl + case 362: // parameter_decl_list -> parameter_decl { CurrentSemanticValue.stn = new property_parameter_list(ValueStack[ValueStack.Depth-1].stn as property_parameter, CurrentLocationSpan); } break; - case 362: // parameter_decl_list -> parameter_decl_list, tkSemiColon, parameter_decl + case 363: // parameter_decl_list -> parameter_decl_list, tkSemiColon, parameter_decl { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as property_parameter_list).Add(ValueStack[ValueStack.Depth-1].stn as property_parameter, CurrentLocationSpan); } break; - case 363: // parameter_decl -> ident_list, tkColon, fptype + case 364: // parameter_decl -> ident_list, tkColon, fptype { CurrentSemanticValue.stn = new property_parameter(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 364: // optional_identifier -> identifier + case 365: // optional_identifier -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 365: // optional_identifier -> /* empty */ + case 366: // optional_identifier -> /* empty */ { CurrentSemanticValue.id = null; } break; - case 367: // property_specifiers -> tkRead, optional_identifier, property_specifiers + case 368: // property_specifiers -> tkRead, optional_identifier, property_specifiers { CurrentSemanticValue.stn = NewPropertySpecifiersRead(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-2].id, ValueStack[ValueStack.Depth-1].stn as property_accessors, CurrentLocationSpan); } break; - case 368: // property_specifiers -> tkWrite, optional_identifier, property_specifiers + case 369: // property_specifiers -> tkWrite, optional_identifier, property_specifiers { CurrentSemanticValue.stn = NewPropertySpecifiersWrite(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-2].id, ValueStack[ValueStack.Depth-1].stn as property_accessors, CurrentLocationSpan); } break; - case 369: // var_decl -> var_decl_part, tkSemiColon + case 370: // var_decl -> var_decl_part, tkSemiColon { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 372: // var_decl_part -> ident_list, tkColon, type_ref + case 373: // var_decl_part -> ident_list, tkColon, type_ref { CurrentSemanticValue.stn = new var_def_statement(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, null, definition_attribute.None, false, CurrentLocationSpan); } break; - case 373: // var_decl_part -> ident_list, tkAssign, expr + case 374: // var_decl_part -> ident_list, tkAssign, expr { CurrentSemanticValue.stn = new var_def_statement(ValueStack[ValueStack.Depth-3].stn as ident_list, null, ValueStack[ValueStack.Depth-1].ex, definition_attribute.None, false, CurrentLocationSpan); } break; - case 374: // var_decl_part -> ident_list, tkColon, type_ref, tkAssignOrEqual, + case 375: // var_decl_part -> ident_list, tkColon, type_ref, tkAssignOrEqual, // typed_var_init_expression { CurrentSemanticValue.stn = new var_def_statement(ValueStack[ValueStack.Depth-5].stn as ident_list, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].ex, definition_attribute.None, false, CurrentLocationSpan); } break; - case 375: // typed_var_init_expression -> typed_const_plus + case 376: // typed_var_init_expression -> typed_const_plus { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 376: // typed_var_init_expression -> expl_func_decl_lambda + case 377: // typed_var_init_expression -> expl_func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 377: // typed_var_init_expression -> identifier, tkArrow, lambda_function_body + case 378: // typed_var_init_expression -> identifier, tkArrow, lambda_function_body { var idList = new ident_list(ValueStack[ValueStack.Depth-3].id, LocationStack[LocationStack.Depth-3]); var formalPars = new formal_parameters(new typed_parameters(idList, new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null), parametr_kind.none, null, LocationStack[LocationStack.Depth-3]), LocationStack[LocationStack.Depth-3]); CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), formalPars, new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null), ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 378: // typed_var_init_expression -> tkRoundOpen, tkRoundClose, lambda_type_ref, + case 379: // typed_var_init_expression -> tkRoundOpen, tkRoundClose, lambda_type_ref, // tkArrow, lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 379: // typed_var_init_expression -> tkRoundOpen, typed_const_list, tkRoundClose, + case 380: // typed_var_init_expression -> tkRoundOpen, typed_const_list, tkRoundClose, // tkArrow, lambda_function_body { var el = ValueStack[ValueStack.Depth-4].stn as expression_list; @@ -3919,68 +3935,68 @@ public partial class GPPGParser: ShiftReduceParser typed_const + case 381: // typed_const_plus -> typed_const { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 381: // typed_const_plus -> new_expr + case 382: // typed_const_plus -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 382: // typed_const_plus -> default_expr + case 383: // typed_const_plus -> default_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 383: // constr_destr_decl -> constr_destr_header, block + case 384: // constr_destr_decl -> constr_destr_header, block { CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-2].td as procedure_header, ValueStack[ValueStack.Depth-1].stn as block, CurrentLocationSpan); } break; - case 384: // inclass_constr_destr_decl -> constr_destr_header, inclass_block + case 385: // inclass_constr_destr_decl -> constr_destr_header, inclass_block { CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-2].td as procedure_header, ValueStack[ValueStack.Depth-1].stn as block, CurrentLocationSpan); } break; - case 385: // proc_func_decl -> proc_func_decl_noclass + case 386: // proc_func_decl -> proc_func_decl_noclass { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 386: // proc_func_decl -> tkClass, proc_func_decl_noclass + case 387: // proc_func_decl -> tkClass, proc_func_decl_noclass { (ValueStack[ValueStack.Depth-1].stn as procedure_definition).proc_header.class_keyword = true; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 387: // proc_func_decl_noclass -> proc_func_header, proc_func_external_block + case 388: // proc_func_decl_noclass -> proc_func_header, proc_func_external_block { CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-2].td as procedure_header, ValueStack[ValueStack.Depth-1].stn as proc_block, CurrentLocationSpan); } break; - case 388: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, fptype, + case 389: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, fptype, // optional_method_modificators1, tkAssign, expr_l1, // tkSemiColon { CurrentSemanticValue.stn = SyntaxTreeBuilder.BuildShortFuncDefinition(ValueStack[ValueStack.Depth-7].stn as formal_parameters, ValueStack[ValueStack.Depth-4].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-8].stn as method_name, ValueStack[ValueStack.Depth-5].td as type_definition, ValueStack[ValueStack.Depth-2].ex, LocationStack[LocationStack.Depth-9].Merge(LocationStack[LocationStack.Depth-5])); } break; - case 389: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, + case 390: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, // optional_method_modificators1, tkAssign, expr_l1, // tkSemiColon { CurrentSemanticValue.stn = SyntaxTreeBuilder.BuildShortFuncDefinition(ValueStack[ValueStack.Depth-5].stn as formal_parameters, ValueStack[ValueStack.Depth-4].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-6].stn as method_name, null, ValueStack[ValueStack.Depth-2].ex, LocationStack[LocationStack.Depth-7].Merge(LocationStack[LocationStack.Depth-5])); } break; - case 390: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, fptype, + case 391: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, fptype, // optional_method_modificators1, tkAssign, // func_decl_lambda, tkSemiColon { CurrentSemanticValue.stn = SyntaxTreeBuilder.BuildShortFuncDefinition(ValueStack[ValueStack.Depth-7].stn as formal_parameters, ValueStack[ValueStack.Depth-4].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-8].stn as method_name, ValueStack[ValueStack.Depth-5].td as type_definition, ValueStack[ValueStack.Depth-2].ex, LocationStack[LocationStack.Depth-9].Merge(LocationStack[LocationStack.Depth-5])); } break; - case 391: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, + case 392: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, // optional_method_modificators1, tkAssign, // func_decl_lambda, tkSemiColon { CurrentSemanticValue.stn = SyntaxTreeBuilder.BuildShortFuncDefinition(ValueStack[ValueStack.Depth-5].stn as formal_parameters, ValueStack[ValueStack.Depth-4].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-6].stn as method_name, null, ValueStack[ValueStack.Depth-2].ex, LocationStack[LocationStack.Depth-7].Merge(LocationStack[LocationStack.Depth-5])); } break; - case 392: // proc_func_decl_noclass -> tkProcedure, proc_name, fp_list, + case 393: // proc_func_decl_noclass -> tkProcedure, proc_name, fp_list, // optional_method_modificators1, tkAssign, // unlabelled_stmt, tkSemiColon { @@ -3989,28 +4005,28 @@ public partial class GPPGParser: ShiftReduceParser proc_func_header, tkForward, tkSemiColon + case 394: // proc_func_decl_noclass -> proc_func_header, tkForward, tkSemiColon { CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-3].td as procedure_header, null, CurrentLocationSpan); (CurrentSemanticValue.stn as procedure_definition).proc_header.proc_attributes.Add((procedure_attribute)ValueStack[ValueStack.Depth-2].id, ValueStack[ValueStack.Depth-2].id.source_context); } break; - case 394: // inclass_proc_func_decl -> inclass_proc_func_decl_noclass + case 395: // inclass_proc_func_decl -> inclass_proc_func_decl_noclass { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 395: // inclass_proc_func_decl -> tkClass, inclass_proc_func_decl_noclass + case 396: // inclass_proc_func_decl -> tkClass, inclass_proc_func_decl_noclass { if ((ValueStack[ValueStack.Depth-1].stn as procedure_definition).proc_header != null) (ValueStack[ValueStack.Depth-1].stn as procedure_definition).proc_header.class_keyword = true; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 396: // inclass_proc_func_decl_noclass -> proc_func_header, inclass_block + case 397: // inclass_proc_func_decl_noclass -> proc_func_header, inclass_block { CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-2].td as procedure_header, ValueStack[ValueStack.Depth-1].stn as proc_block, CurrentLocationSpan); } break; - case 397: // inclass_proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, + case 398: // inclass_proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, // fptype, optional_method_modificators1, // tkAssign, expr_l1, tkSemiColon { @@ -4019,7 +4035,7 @@ public partial class GPPGParser: ShiftReduceParser tkFunction, func_name, fp_list, + case 399: // inclass_proc_func_decl_noclass -> tkFunction, func_name, fp_list, // optional_method_modificators1, tkAssign, // expr_l1, tkSemiColon { @@ -4028,7 +4044,7 @@ public partial class GPPGParser: ShiftReduceParser tkProcedure, proc_name, fp_list, + case 400: // inclass_proc_func_decl_noclass -> tkProcedure, proc_name, fp_list, // optional_method_modificators1, tkAssign, // unlabelled_stmt, tkSemiColon { @@ -4037,21 +4053,21 @@ public partial class GPPGParser: ShiftReduceParser block + case 401: // proc_func_external_block -> block { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 401: // proc_func_external_block -> external_block + case 402: // proc_func_external_block -> external_block { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 402: // proc_name -> func_name + case 403: // proc_name -> func_name { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 403: // func_name -> func_meth_name_ident + case 404: // func_name -> func_meth_name_ident { CurrentSemanticValue.stn = new method_name(null,null, ValueStack[ValueStack.Depth-1].id, null, CurrentLocationSpan); } break; - case 404: // func_name -> func_class_name_ident_list, tkPoint, func_meth_name_ident + case 405: // func_name -> func_class_name_ident_list, tkPoint, func_meth_name_ident { var ln = ValueStack[ValueStack.Depth-3].ob as List; var cnt = ln.Count; @@ -4061,282 +4077,282 @@ public partial class GPPGParser: ShiftReduceParser func_name_with_template_args + case 406: // func_class_name_ident -> func_name_with_template_args { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 406: // func_class_name_ident_list -> func_class_name_ident + case 407: // func_class_name_ident_list -> func_class_name_ident { CurrentSemanticValue.ob = new List(); (CurrentSemanticValue.ob as List).Add(ValueStack[ValueStack.Depth-1].id); } break; - case 407: // func_class_name_ident_list -> func_class_name_ident_list, tkPoint, + case 408: // func_class_name_ident_list -> func_class_name_ident_list, tkPoint, // func_class_name_ident { (ValueStack[ValueStack.Depth-3].ob as List).Add(ValueStack[ValueStack.Depth-1].id); CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-3].ob; } break; - case 408: // func_meth_name_ident -> func_name_with_template_args + case 409: // func_meth_name_ident -> func_name_with_template_args { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 409: // func_meth_name_ident -> operator_name_ident + case 410: // func_meth_name_ident -> operator_name_ident { CurrentSemanticValue.id = (ident)ValueStack[ValueStack.Depth-1].ex; } break; - case 410: // func_meth_name_ident -> operator_name_ident, template_arguments + case 411: // func_meth_name_ident -> operator_name_ident, template_arguments { CurrentSemanticValue.id = new template_operator_name(null, ValueStack[ValueStack.Depth-1].stn as ident_list, ValueStack[ValueStack.Depth-2].ex as operator_name_ident, CurrentLocationSpan); } break; - case 411: // func_name_with_template_args -> func_name_ident + case 412: // func_name_with_template_args -> func_name_ident { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 412: // func_name_with_template_args -> func_name_ident, template_arguments + case 413: // func_name_with_template_args -> func_name_ident, template_arguments { CurrentSemanticValue.id = new template_type_name(ValueStack[ValueStack.Depth-2].id.name, ValueStack[ValueStack.Depth-1].stn as ident_list, CurrentLocationSpan); } break; - case 413: // func_name_ident -> identifier + case 414: // func_name_ident -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 414: // proc_header -> tkProcedure, proc_name, fp_list, optional_method_modificators, + case 415: // proc_header -> tkProcedure, proc_name, fp_list, optional_method_modificators, // optional_where_section { CurrentSemanticValue.td = new procedure_header(ValueStack[ValueStack.Depth-3].stn as formal_parameters, ValueStack[ValueStack.Depth-2].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-4].stn as method_name, ValueStack[ValueStack.Depth-1].stn as where_definition_list, CurrentLocationSpan); } break; - case 415: // func_header -> tkFunction, func_name, fp_list, optional_method_modificators, + case 416: // func_header -> tkFunction, func_name, fp_list, optional_method_modificators, // optional_where_section { CurrentSemanticValue.td = new function_header(ValueStack[ValueStack.Depth-3].stn as formal_parameters, ValueStack[ValueStack.Depth-2].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-4].stn as method_name, ValueStack[ValueStack.Depth-1].stn as where_definition_list, null, CurrentLocationSpan); } break; - case 416: // func_header -> tkFunction, func_name, fp_list, tkColon, fptype, + case 417: // func_header -> tkFunction, func_name, fp_list, tkColon, fptype, // optional_method_modificators, optional_where_section { CurrentSemanticValue.td = new function_header(ValueStack[ValueStack.Depth-5].stn as formal_parameters, ValueStack[ValueStack.Depth-2].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-6].stn as method_name, ValueStack[ValueStack.Depth-1].stn as where_definition_list, ValueStack[ValueStack.Depth-3].td as type_definition, CurrentLocationSpan); } break; - case 417: // external_block -> tkExternal, external_directive_ident, tkName, + case 418: // external_block -> tkExternal, external_directive_ident, tkName, // external_directive_ident, tkSemiColon { CurrentSemanticValue.stn = new external_directive(ValueStack[ValueStack.Depth-4].ex, ValueStack[ValueStack.Depth-2].ex, CurrentLocationSpan); } break; - case 418: // external_block -> tkExternal, external_directive_ident, tkSemiColon + case 419: // external_block -> tkExternal, external_directive_ident, tkSemiColon { CurrentSemanticValue.stn = new external_directive(ValueStack[ValueStack.Depth-2].ex, null, CurrentLocationSpan); } break; - case 419: // external_block -> tkExternal, tkSemiColon + case 420: // external_block -> tkExternal, tkSemiColon { CurrentSemanticValue.stn = new external_directive(null, null, CurrentLocationSpan); } break; - case 420: // external_directive_ident -> identifier + case 421: // external_directive_ident -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 421: // external_directive_ident -> literal + case 422: // external_directive_ident -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 422: // block -> decl_sect_list, compound_stmt, tkSemiColon + case 423: // block -> decl_sect_list, compound_stmt, tkSemiColon { CurrentSemanticValue.stn = new block(ValueStack[ValueStack.Depth-3].stn as declarations, ValueStack[ValueStack.Depth-2].stn as statement_list, CurrentLocationSpan); } break; - case 423: // inclass_block -> inclass_decl_sect_list, compound_stmt, tkSemiColon + case 424: // inclass_block -> inclass_decl_sect_list, compound_stmt, tkSemiColon { CurrentSemanticValue.stn = new block(ValueStack[ValueStack.Depth-3].stn as declarations, ValueStack[ValueStack.Depth-2].stn as statement_list, CurrentLocationSpan); } break; - case 424: // fp_list -> /* empty */ + case 425: // fp_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 425: // fp_list -> tkRoundOpen, tkRoundClose + case 426: // fp_list -> tkRoundOpen, tkRoundClose { CurrentSemanticValue.stn = null; } break; - case 426: // fp_list -> tkRoundOpen, fp_sect_list, tkRoundClose + case 427: // fp_list -> tkRoundOpen, fp_sect_list, tkRoundClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; if (CurrentSemanticValue.stn != null) CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 427: // fp_sect_list -> fp_sect + case 428: // fp_sect_list -> fp_sect { CurrentSemanticValue.stn = new formal_parameters(ValueStack[ValueStack.Depth-1].stn as typed_parameters, CurrentLocationSpan); } break; - case 428: // fp_sect_list -> fp_sect_list, tkSemiColon, fp_sect + case 429: // fp_sect_list -> fp_sect_list, tkSemiColon, fp_sect { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as formal_parameters).Add(ValueStack[ValueStack.Depth-1].stn as typed_parameters, CurrentLocationSpan); } break; - case 429: // fp_sect -> attribute_declarations, simple_fp_sect + case 430: // fp_sect -> attribute_declarations, simple_fp_sect { (ValueStack[ValueStack.Depth-1].stn as declaration).attributes = ValueStack[ValueStack.Depth-2].stn as attribute_list; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 430: // simple_fp_sect -> param_name_list, tkColon, fptype + case 431: // simple_fp_sect -> param_name_list, tkColon, fptype { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, parametr_kind.none, null, CurrentLocationSpan); } break; - case 431: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype + case 432: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, parametr_kind.var_parametr, null, CurrentLocationSpan); } break; - case 432: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype + case 433: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, parametr_kind.const_parametr, null, CurrentLocationSpan); } break; - case 433: // simple_fp_sect -> tkParams, param_name_list, tkColon, fptype + case 434: // simple_fp_sect -> tkParams, param_name_list, tkColon, fptype { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td,parametr_kind.params_parametr,null, CurrentLocationSpan); } break; - case 434: // simple_fp_sect -> param_name_list, tkColon, fptype, tkAssign, const_expr + case 435: // simple_fp_sect -> param_name_list, tkColon, fptype, tkAssign, const_expr { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-5].stn as ident_list, ValueStack[ValueStack.Depth-3].td, parametr_kind.none, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 435: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype, tkAssign, const_expr + case 436: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype, tkAssign, const_expr { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-5].stn as ident_list, ValueStack[ValueStack.Depth-3].td, parametr_kind.var_parametr, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 436: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype, tkAssign, + case 437: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype, tkAssign, // const_expr { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-5].stn as ident_list, ValueStack[ValueStack.Depth-3].td, parametr_kind.const_parametr, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 437: // param_name_list -> param_name + case 438: // param_name_list -> param_name { CurrentSemanticValue.stn = new ident_list(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 438: // param_name_list -> param_name_list, tkComma, param_name + case 439: // param_name_list -> param_name_list, tkComma, param_name { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as ident_list).Add(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 439: // param_name -> identifier + case 440: // param_name -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 440: // fptype -> type_ref + case 441: // fptype -> type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 441: // fptype_noproctype -> simple_type + case 442: // fptype_noproctype -> simple_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 442: // fptype_noproctype -> string_type + case 443: // fptype_noproctype -> string_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 443: // fptype_noproctype -> pointer_type + case 444: // fptype_noproctype -> pointer_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 444: // fptype_noproctype -> structured_type + case 445: // fptype_noproctype -> structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 445: // fptype_noproctype -> template_type + case 446: // fptype_noproctype -> template_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 446: // stmt -> unlabelled_stmt + case 447: // stmt -> unlabelled_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 447: // stmt -> label_name, tkColon, stmt + case 448: // stmt -> label_name, tkColon, stmt { CurrentSemanticValue.stn = new labeled_statement(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 448: // unlabelled_stmt -> /* empty */ + case 449: // unlabelled_stmt -> /* empty */ { CurrentSemanticValue.stn = new empty_statement(); CurrentSemanticValue.stn.source_context = null; } break; - case 449: // unlabelled_stmt -> assignment + case 450: // unlabelled_stmt -> assignment { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 450: // unlabelled_stmt -> proc_call + case 451: // unlabelled_stmt -> proc_call { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 451: // unlabelled_stmt -> goto_stmt + case 452: // unlabelled_stmt -> goto_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 452: // unlabelled_stmt -> compound_stmt + case 453: // unlabelled_stmt -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 453: // unlabelled_stmt -> if_stmt + case 454: // unlabelled_stmt -> if_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 454: // unlabelled_stmt -> case_stmt + case 455: // unlabelled_stmt -> case_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 455: // unlabelled_stmt -> repeat_stmt + case 456: // unlabelled_stmt -> repeat_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 456: // unlabelled_stmt -> while_stmt + case 457: // unlabelled_stmt -> while_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 457: // unlabelled_stmt -> for_stmt + case 458: // unlabelled_stmt -> for_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 458: // unlabelled_stmt -> with_stmt + case 459: // unlabelled_stmt -> with_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 459: // unlabelled_stmt -> inherited_message + case 460: // unlabelled_stmt -> inherited_message { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 460: // unlabelled_stmt -> try_stmt + case 461: // unlabelled_stmt -> try_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 461: // unlabelled_stmt -> raise_stmt + case 462: // unlabelled_stmt -> raise_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 462: // unlabelled_stmt -> foreach_stmt + case 463: // unlabelled_stmt -> foreach_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 463: // unlabelled_stmt -> var_stmt + case 464: // unlabelled_stmt -> var_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 464: // unlabelled_stmt -> expr_as_stmt + case 465: // unlabelled_stmt -> expr_as_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 465: // unlabelled_stmt -> lock_stmt + case 466: // unlabelled_stmt -> lock_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 466: // unlabelled_stmt -> yield_stmt + case 467: // unlabelled_stmt -> yield_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 467: // unlabelled_stmt -> yield_sequence_stmt + case 468: // unlabelled_stmt -> yield_sequence_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 468: // yield_stmt -> tkYield, expr_l1 + case 469: // yield_stmt -> tkYield, expr_l1 { CurrentSemanticValue.stn = new yield_node(ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); } break; - case 469: // yield_sequence_stmt -> tkYield, tkSequence, expr_l1 + case 470: // yield_sequence_stmt -> tkYield, tkSequence, expr_l1 { CurrentSemanticValue.stn = new yield_sequence_node(ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); } break; - case 470: // var_stmt -> tkVar, var_decl_part + case 471: // var_stmt -> tkVar, var_decl_part { CurrentSemanticValue.stn = new var_statement(ValueStack[ValueStack.Depth-1].stn as var_def_statement, CurrentLocationSpan); } break; - case 471: // assignment -> var_reference, assign_operator, expr_with_func_decl_lambda + case 472: // assignment -> var_reference, assign_operator, expr_with_func_decl_lambda { CurrentSemanticValue.stn = new assign(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 472: // assignment -> tkRoundOpen, variable, tkComma, variable_list, tkRoundClose, + case 473: // assignment -> tkRoundOpen, variable, tkComma, variable_list, tkRoundClose, // assign_operator, expr { if (ValueStack[ValueStack.Depth-2].op.type != Operators.Assignment) @@ -4346,7 +4362,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, tkVar, identifier, tkComma, var_ident_list, + case 474: // assignment -> tkRoundOpen, tkVar, identifier, tkComma, var_ident_list, // tkRoundClose, assign_operator, expr { if (ValueStack[ValueStack.Depth-2].op.type != Operators.Assignment) @@ -4356,7 +4372,7 @@ public partial class GPPGParser: ShiftReduceParser tkVar, tkRoundOpen, identifier, tkComma, ident_list, tkRoundClose, + case 475: // assignment -> tkVar, tkRoundOpen, identifier, tkComma, ident_list, tkRoundClose, // assign_operator, expr { if (ValueStack[ValueStack.Depth-2].op.type != Operators.Assignment) @@ -4366,41 +4382,41 @@ public partial class GPPGParser: ShiftReduceParser variable + case 476: // variable_list -> variable { CurrentSemanticValue.ob = new addressed_value_list(ValueStack[ValueStack.Depth-1].ex as addressed_value,LocationStack[LocationStack.Depth-1]); } break; - case 476: // variable_list -> variable_list, tkComma, variable + case 477: // variable_list -> variable_list, tkComma, variable { (ValueStack[ValueStack.Depth-3].ob as addressed_value_list).Add(ValueStack[ValueStack.Depth-1].ex as addressed_value); (ValueStack[ValueStack.Depth-3].ob as syntax_tree_node).source_context = LexLocation.MergeAll(LocationStack[LocationStack.Depth-3],LocationStack[LocationStack.Depth-2],LocationStack[LocationStack.Depth-1]); CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-3].ob; } break; - case 477: // var_ident_list -> tkVar, identifier + case 478: // var_ident_list -> tkVar, identifier { CurrentSemanticValue.ob = new ident_list(ValueStack[ValueStack.Depth-1].id,CurrentLocationSpan); } break; - case 478: // var_ident_list -> var_ident_list, tkComma, tkVar, identifier + case 479: // var_ident_list -> var_ident_list, tkComma, tkVar, identifier { (ValueStack[ValueStack.Depth-4].ob as ident_list).Add(ValueStack[ValueStack.Depth-1].id); (ValueStack[ValueStack.Depth-4].ob as ident_list).source_context = LexLocation.MergeAll(LocationStack[LocationStack.Depth-4],LocationStack[LocationStack.Depth-3],LocationStack[LocationStack.Depth-2],LocationStack[LocationStack.Depth-1]); CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-4].ob; } break; - case 479: // proc_call -> var_reference + case 480: // proc_call -> var_reference { CurrentSemanticValue.stn = new procedure_call(ValueStack[ValueStack.Depth-1].ex as addressed_value, CurrentLocationSpan); } break; - case 480: // goto_stmt -> tkGoto, label_name + case 481: // goto_stmt -> tkGoto, label_name { CurrentSemanticValue.stn = new goto_statement(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 481: // compound_stmt -> tkBegin, stmt_list, tkEnd + case 482: // compound_stmt -> tkBegin, stmt_list, tkEnd { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; (CurrentSemanticValue.stn as statement_list).left_logical_bracket = ValueStack[ValueStack.Depth-3].ti; @@ -4408,73 +4424,73 @@ public partial class GPPGParser: ShiftReduceParser stmt + case 483: // stmt_list -> stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, LocationStack[LocationStack.Depth-1]); } break; - case 483: // stmt_list -> stmt_list, tkSemiColon, stmt + case 484: // stmt_list -> stmt_list, tkSemiColon, stmt { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as statement_list).Add(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 484: // if_stmt -> tkIf, expr_l1, tkThen, unlabelled_stmt + case 485: // if_stmt -> tkIf, expr_l1, tkThen, unlabelled_stmt { CurrentSemanticValue.stn = new if_node(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].stn as statement, null, CurrentLocationSpan); } break; - case 485: // if_stmt -> tkIf, expr_l1, tkThen, unlabelled_stmt, tkElse, unlabelled_stmt + case 486: // if_stmt -> tkIf, expr_l1, tkThen, unlabelled_stmt, tkElse, unlabelled_stmt { CurrentSemanticValue.stn = new if_node(ValueStack[ValueStack.Depth-5].ex, ValueStack[ValueStack.Depth-3].stn as statement, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 486: // case_stmt -> tkCase, expr_l1, tkOf, case_list, else_case, tkEnd + case 487: // case_stmt -> tkCase, expr_l1, tkOf, case_list, else_case, tkEnd { CurrentSemanticValue.stn = new case_node(ValueStack[ValueStack.Depth-5].ex, ValueStack[ValueStack.Depth-3].stn as case_variants, ValueStack[ValueStack.Depth-2].stn as statement, CurrentLocationSpan); } break; - case 487: // case_list -> case_item + case 488: // case_list -> case_item { if (ValueStack[ValueStack.Depth-1].stn is empty_statement) CurrentSemanticValue.stn = NewCaseItem(ValueStack[ValueStack.Depth-1].stn, null); else CurrentSemanticValue.stn = NewCaseItem(ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 488: // case_list -> case_list, tkSemiColon, case_item + case 489: // case_list -> case_list, tkSemiColon, case_item { CurrentSemanticValue.stn = AddCaseItem(ValueStack[ValueStack.Depth-3].stn as case_variants, ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 489: // case_item -> /* empty */ + case 490: // case_item -> /* empty */ { CurrentSemanticValue.stn = new empty_statement(); } break; - case 490: // case_item -> case_label_list, tkColon, unlabelled_stmt + case 491: // case_item -> case_label_list, tkColon, unlabelled_stmt { CurrentSemanticValue.stn = new case_variant(ValueStack[ValueStack.Depth-3].stn as expression_list, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 491: // case_label_list -> case_label + case 492: // case_label_list -> case_label { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 492: // case_label_list -> case_label_list, tkComma, case_label + case 493: // case_label_list -> case_label_list, tkComma, case_label { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as expression_list).Add(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 493: // case_label -> const_elem + case 494: // case_label -> const_elem { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 494: // else_case -> /* empty */ + case 495: // else_case -> /* empty */ { CurrentSemanticValue.stn = null;} break; - case 495: // else_case -> tkElse, stmt_list + case 496: // else_case -> tkElse, stmt_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 496: // repeat_stmt -> tkRepeat, stmt_list, tkUntil, expr + case 497: // repeat_stmt -> tkRepeat, stmt_list, tkUntil, expr { CurrentSemanticValue.stn = new repeat_node(ValueStack[ValueStack.Depth-3].stn as statement_list, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); (ValueStack[ValueStack.Depth-3].stn as statement_list).left_logical_bracket = ValueStack[ValueStack.Depth-4].ti; @@ -4482,23 +4498,23 @@ public partial class GPPGParser: ShiftReduceParser tkWhile, expr_l1, optional_tk_do, unlabelled_stmt + case 498: // while_stmt -> tkWhile, expr_l1, optional_tk_do, unlabelled_stmt { CurrentSemanticValue.stn = NewWhileStmt(ValueStack[ValueStack.Depth-4].ti, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-2].ti, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 498: // optional_tk_do -> tkDo + case 499: // optional_tk_do -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 499: // optional_tk_do -> /* empty */ + case 500: // optional_tk_do -> /* empty */ { CurrentSemanticValue.ti = null; } break; - case 500: // lock_stmt -> tkLock, expr_l1, tkDo, unlabelled_stmt + case 501: // lock_stmt -> tkLock, expr_l1, tkDo, unlabelled_stmt { CurrentSemanticValue.stn = new lock_stmt(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 501: // foreach_stmt -> tkForeach, identifier, foreach_stmt_ident_dype_opt, tkIn, + case 502: // foreach_stmt -> tkForeach, identifier, foreach_stmt_ident_dype_opt, tkIn, // expr_l1, tkDo, unlabelled_stmt { CurrentSemanticValue.stn = new foreach_stmt(ValueStack[ValueStack.Depth-6].id, ValueStack[ValueStack.Depth-5].td, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); @@ -4506,68 +4522,68 @@ public partial class GPPGParser: ShiftReduceParser tkForeach, tkVar, identifier, tkColon, type_ref, tkIn, expr_l1, + case 503: // foreach_stmt -> tkForeach, tkVar, identifier, tkColon, type_ref, tkIn, expr_l1, // tkDo, unlabelled_stmt { CurrentSemanticValue.stn = new foreach_stmt(ValueStack[ValueStack.Depth-7].id, ValueStack[ValueStack.Depth-5].td, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 503: // foreach_stmt -> tkForeach, tkVar, identifier, tkIn, expr_l1, tkDo, + case 504: // foreach_stmt -> tkForeach, tkVar, identifier, tkIn, expr_l1, tkDo, // unlabelled_stmt { CurrentSemanticValue.stn = new foreach_stmt(ValueStack[ValueStack.Depth-5].id, new no_type_foreach(), ValueStack[ValueStack.Depth-3].ex, (statement)ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 504: // foreach_stmt_ident_dype_opt -> tkColon, type_ref + case 505: // foreach_stmt_ident_dype_opt -> tkColon, type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 506: // for_stmt -> tkFor, optional_var, identifier, for_stmt_decl_or_assign, expr_l1, + case 507: // for_stmt -> tkFor, optional_var, identifier, for_stmt_decl_or_assign, expr_l1, // for_cycle_type, expr_l1, optional_tk_do, unlabelled_stmt { CurrentSemanticValue.stn = NewForStmt((bool)ValueStack[ValueStack.Depth-8].ob, ValueStack[ValueStack.Depth-7].id, ValueStack[ValueStack.Depth-6].td, ValueStack[ValueStack.Depth-5].ex, (for_cycle_type)ValueStack[ValueStack.Depth-4].ob, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-2].ti, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 507: // optional_var -> tkVar + case 508: // optional_var -> tkVar { CurrentSemanticValue.ob = true; } break; - case 508: // optional_var -> /* empty */ + case 509: // optional_var -> /* empty */ { CurrentSemanticValue.ob = false; } break; - case 510: // for_stmt_decl_or_assign -> tkColon, simple_type_identifier, tkAssign + case 511: // for_stmt_decl_or_assign -> tkColon, simple_type_identifier, tkAssign { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-2].td; } break; - case 511: // for_cycle_type -> tkTo + case 512: // for_cycle_type -> tkTo { CurrentSemanticValue.ob = for_cycle_type.to; } break; - case 512: // for_cycle_type -> tkDownto + case 513: // for_cycle_type -> tkDownto { CurrentSemanticValue.ob = for_cycle_type.downto; } break; - case 513: // with_stmt -> tkWith, expr_list, tkDo, unlabelled_stmt + case 514: // with_stmt -> tkWith, expr_list, tkDo, unlabelled_stmt { CurrentSemanticValue.stn = new with_statement(ValueStack[ValueStack.Depth-1].stn as statement, ValueStack[ValueStack.Depth-3].stn as expression_list, CurrentLocationSpan); } break; - case 514: // inherited_message -> tkInherited + case 515: // inherited_message -> tkInherited { CurrentSemanticValue.stn = new inherited_message(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 515: // try_stmt -> tkTry, stmt_list, try_handler + case 516: // try_stmt -> tkTry, stmt_list, try_handler { CurrentSemanticValue.stn = new try_stmt(ValueStack[ValueStack.Depth-2].stn as statement_list, ValueStack[ValueStack.Depth-1].stn as try_handler, CurrentLocationSpan); (ValueStack[ValueStack.Depth-2].stn as statement_list).left_logical_bracket = ValueStack[ValueStack.Depth-3].ti; ValueStack[ValueStack.Depth-2].stn.source_context = LocationStack[LocationStack.Depth-3].Merge(LocationStack[LocationStack.Depth-2]); } break; - case 516: // try_handler -> tkFinally, stmt_list, tkEnd + case 517: // try_handler -> tkFinally, stmt_list, tkEnd { CurrentSemanticValue.stn = new try_handler_finally(ValueStack[ValueStack.Depth-2].stn as statement_list, CurrentLocationSpan); (ValueStack[ValueStack.Depth-2].stn as statement_list).left_logical_bracket = ValueStack[ValueStack.Depth-3].ti; (ValueStack[ValueStack.Depth-2].stn as statement_list).right_logical_bracket = ValueStack[ValueStack.Depth-1].ti; } break; - case 517: // try_handler -> tkExcept, exception_block, tkEnd + case 518: // try_handler -> tkExcept, exception_block, tkEnd { CurrentSemanticValue.stn = new try_handler_except((exception_block)ValueStack[ValueStack.Depth-2].stn, CurrentLocationSpan); if ((ValueStack[ValueStack.Depth-2].stn as exception_block).stmt_list != null) @@ -4577,154 +4593,160 @@ public partial class GPPGParser: ShiftReduceParser exception_handler_list, exception_block_else_branch + case 519: // exception_block -> exception_handler_list, exception_block_else_branch { CurrentSemanticValue.stn = new exception_block(null, (exception_handler_list)ValueStack[ValueStack.Depth-2].stn, (statement_list)ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 519: // exception_block -> exception_handler_list, tkSemiColon, + case 520: // exception_block -> exception_handler_list, tkSemiColon, // exception_block_else_branch { CurrentSemanticValue.stn = new exception_block(null, (exception_handler_list)ValueStack[ValueStack.Depth-3].stn, (statement_list)ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 520: // exception_block -> stmt_list + case 521: // exception_block -> stmt_list { CurrentSemanticValue.stn = new exception_block(ValueStack[ValueStack.Depth-1].stn as statement_list, null, null, LocationStack[LocationStack.Depth-1]); } break; - case 521: // exception_handler_list -> exception_handler + case 522: // exception_handler_list -> exception_handler { CurrentSemanticValue.stn = new exception_handler_list(ValueStack[ValueStack.Depth-1].stn as exception_handler, CurrentLocationSpan); } break; - case 522: // exception_handler_list -> exception_handler_list, tkSemiColon, + case 523: // exception_handler_list -> exception_handler_list, tkSemiColon, // exception_handler { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as exception_handler_list).Add(ValueStack[ValueStack.Depth-1].stn as exception_handler, CurrentLocationSpan); } break; - case 523: // exception_block_else_branch -> /* empty */ + case 524: // exception_block_else_branch -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 524: // exception_block_else_branch -> tkElse, stmt_list + case 525: // exception_block_else_branch -> tkElse, stmt_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 525: // exception_handler -> tkOn, exception_identifier, tkDo, unlabelled_stmt + case 526: // exception_handler -> tkOn, exception_identifier, tkDo, unlabelled_stmt { CurrentSemanticValue.stn = new exception_handler((ValueStack[ValueStack.Depth-3].stn as exception_ident).variable, (ValueStack[ValueStack.Depth-3].stn as exception_ident).type_name, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 526: // exception_identifier -> exception_class_type_identifier + case 527: // exception_identifier -> exception_class_type_identifier { CurrentSemanticValue.stn = new exception_ident(null, (named_type_reference)ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 527: // exception_identifier -> exception_variable, tkColon, + case 528: // exception_identifier -> exception_variable, tkColon, // exception_class_type_identifier { CurrentSemanticValue.stn = new exception_ident(ValueStack[ValueStack.Depth-3].id, (named_type_reference)ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 528: // exception_class_type_identifier -> simple_type_identifier + case 529: // exception_class_type_identifier -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 529: // exception_variable -> identifier + case 530: // exception_variable -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 530: // raise_stmt -> tkRaise + case 531: // raise_stmt -> tkRaise { CurrentSemanticValue.stn = new raise_stmt(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 531: // raise_stmt -> tkRaise, expr + case 532: // raise_stmt -> tkRaise, expr { CurrentSemanticValue.stn = new raise_stmt(ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 532: // expr_list -> expr_with_func_decl_lambda + case 533: // expr_list -> expr_with_func_decl_lambda { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 533: // expr_list -> expr_list, tkComma, expr_with_func_decl_lambda + case 534: // expr_list -> expr_list, tkComma, expr_with_func_decl_lambda { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as expression_list).Add(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 534: // expr_as_stmt -> allowable_expr_as_stmt + case 535: // expr_as_stmt -> allowable_expr_as_stmt { CurrentSemanticValue.stn = new expression_as_statement(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 535: // allowable_expr_as_stmt -> new_expr + case 536: // allowable_expr_as_stmt -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 536: // expr_with_func_decl_lambda -> expr + case 537: // expr_with_func_decl_lambda -> expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 537: // expr_with_func_decl_lambda -> func_decl_lambda + case 538: // expr_with_func_decl_lambda -> func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 538: // expr -> expr_l1 + case 539: // expr -> expr_l1 { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 539: // expr -> format_expr + case 540: // expr -> format_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 540: // expr_l1 -> relop_expr + case 541: // expr_l1 -> double_question_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 541: // expr_l1 -> question_expr + case 542: // expr_l1 -> question_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 542: // sizeof_expr -> tkSizeOf, tkRoundOpen, simple_or_template_type_reference, + case 543: // double_question_expr -> relop_expr +{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } + break; + case 544: // double_question_expr -> double_question_expr, tkDoubleQuestion, relop_expr +{ CurrentSemanticValue.ex = new double_question_node(ValueStack[ValueStack.Depth-3].ex as expression, ValueStack[ValueStack.Depth-1].ex as expression, CurrentLocationSpan);} + break; + case 545: // sizeof_expr -> tkSizeOf, tkRoundOpen, simple_or_template_type_reference, // tkRoundClose { CurrentSemanticValue.ex = new sizeof_operator((named_type_reference)ValueStack[ValueStack.Depth-2].td, null, CurrentLocationSpan); } break; - case 543: // typeof_expr -> tkTypeOf, tkRoundOpen, simple_or_template_type_reference, + case 546: // typeof_expr -> tkTypeOf, tkRoundOpen, simple_or_template_type_reference, // tkRoundClose { CurrentSemanticValue.ex = new typeof_operator((named_type_reference)ValueStack[ValueStack.Depth-2].td, CurrentLocationSpan); } break; - case 544: // question_expr -> expr_l1, tkQuestion, expr_l1, tkColon, expr_l1 + case 547: // question_expr -> expr_l1, tkQuestion, expr_l1, tkColon, expr_l1 { CurrentSemanticValue.ex = new question_colon_expression(ValueStack[ValueStack.Depth-5].ex, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 545: // simple_or_template_type_reference -> simple_type_identifier + case 548: // simple_or_template_type_reference -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 546: // simple_or_template_type_reference -> simple_type_identifier, + case 549: // simple_or_template_type_reference -> simple_type_identifier, // template_type_params { CurrentSemanticValue.td = new template_type_reference((named_type_reference)ValueStack[ValueStack.Depth-2].td, (template_param_list)ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 547: // simple_or_template_type_reference -> simple_type_identifier, tkAmpersend, + case 550: // simple_or_template_type_reference -> simple_type_identifier, tkAmpersend, // template_type_params { CurrentSemanticValue.td = new template_type_reference((named_type_reference)ValueStack[ValueStack.Depth-3].td, (template_param_list)ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 548: // optional_array_initializer -> tkRoundOpen, typed_const_list, tkRoundClose + case 551: // optional_array_initializer -> tkRoundOpen, typed_const_list, tkRoundClose { CurrentSemanticValue.stn = new array_const((expression_list)ValueStack[ValueStack.Depth-2].stn, CurrentLocationSpan); } break; - case 550: // new_expr -> tkNew, simple_or_template_type_reference, + case 553: // new_expr -> tkNew, simple_or_template_type_reference, // optional_expr_list_with_bracket { CurrentSemanticValue.ex = new new_expr(ValueStack[ValueStack.Depth-2].td, ValueStack[ValueStack.Depth-1].stn as expression_list, false, null, CurrentLocationSpan); } break; - case 551: // new_expr -> tkNew, array_name_for_new_expr, tkSquareOpen, optional_expr_list, + case 554: // new_expr -> tkNew, array_name_for_new_expr, tkSquareOpen, optional_expr_list, // tkSquareClose, optional_array_initializer { var el = ValueStack[ValueStack.Depth-3].stn as expression_list; @@ -4740,7 +4762,7 @@ public partial class GPPGParser: ShiftReduceParser tkNew, tkClass, tkRoundOpen, list_fields_in_unnamed_object, + case 555: // new_expr -> tkNew, tkClass, tkRoundOpen, list_fields_in_unnamed_object, // tkRoundClose { // sugared node @@ -4755,12 +4777,12 @@ public partial class GPPGParser: ShiftReduceParser identifier, tkAssign, relop_expr + case 556: // field_in_unnamed_object -> identifier, tkAssign, relop_expr { CurrentSemanticValue.ob = new name_assign_expr(ValueStack[ValueStack.Depth-3].id,ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); } break; - case 554: // field_in_unnamed_object -> relop_expr + case 557: // field_in_unnamed_object -> relop_expr { ident name = null; var id = ValueStack[ValueStack.Depth-1].ex as ident; @@ -4780,13 +4802,13 @@ public partial class GPPGParser: ShiftReduceParser field_in_unnamed_object + case 558: // list_fields_in_unnamed_object -> field_in_unnamed_object { var l = new name_assign_expr_list(); CurrentSemanticValue.ob = l.Add(ValueStack[ValueStack.Depth-1].ob as name_assign_expr); } break; - case 556: // list_fields_in_unnamed_object -> list_fields_in_unnamed_object, tkComma, + case 559: // list_fields_in_unnamed_object -> list_fields_in_unnamed_object, tkComma, // field_in_unnamed_object { var nel = ValueStack[ValueStack.Depth-3].ob as name_assign_expr_list; @@ -4797,157 +4819,157 @@ public partial class GPPGParser: ShiftReduceParser simple_type_identifier + case 560: // array_name_for_new_expr -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 558: // array_name_for_new_expr -> unsized_array_type + case 561: // array_name_for_new_expr -> unsized_array_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 559: // optional_expr_list_with_bracket -> /* empty */ + case 562: // optional_expr_list_with_bracket -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 560: // optional_expr_list_with_bracket -> tkRoundOpen, optional_expr_list, + case 563: // optional_expr_list_with_bracket -> tkRoundOpen, optional_expr_list, // tkRoundClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 561: // relop_expr -> simple_expr + case 564: // relop_expr -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 562: // relop_expr -> relop_expr, relop, simple_expr + case 565: // relop_expr -> relop_expr, relop, simple_expr { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 563: // simple_expr_or_nothing -> simple_expr + case 566: // simple_expr_or_nothing -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 564: // simple_expr_or_nothing -> /* empty */ + case 567: // simple_expr_or_nothing -> /* empty */ { CurrentSemanticValue.ex = new int32_const(int.MaxValue); } break; - case 565: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing + case 568: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 566: // format_expr -> tkColon, simple_expr_or_nothing + case 569: // format_expr -> tkColon, simple_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(new int32_const(int.MaxValue), ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 567: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing, tkColon, + case 570: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing, tkColon, // simple_expr { CurrentSemanticValue.ex = new format_expr(ValueStack[ValueStack.Depth-5].ex, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 568: // format_expr -> tkColon, simple_expr_or_nothing, tkColon, simple_expr + case 571: // format_expr -> tkColon, simple_expr_or_nothing, tkColon, simple_expr { CurrentSemanticValue.ex = new format_expr(new int32_const(int.MaxValue), ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 569: // relop -> tkEqual + case 572: // relop -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 570: // relop -> tkNotEqual + case 573: // relop -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 571: // relop -> tkLower + case 574: // relop -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 572: // relop -> tkGreater + case 575: // relop -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 573: // relop -> tkLowerEqual + case 576: // relop -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 574: // relop -> tkGreaterEqual + case 577: // relop -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 575: // relop -> tkIn + case 578: // relop -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 576: // simple_expr -> term + case 579: // simple_expr -> term { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 577: // simple_expr -> simple_expr, addop, term + case 580: // simple_expr -> simple_expr, addop, term { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 578: // addop -> tkPlus + case 581: // addop -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 579: // addop -> tkMinus + case 582: // addop -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 580: // addop -> tkOr + case 583: // addop -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 581: // addop -> tkXor + case 584: // addop -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 582: // addop -> tkCSharpStyleOr + case 585: // addop -> tkCSharpStyleOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 583: // typecast_op -> tkAs + case 586: // typecast_op -> tkAs { CurrentSemanticValue.ob = op_typecast.as_op; } break; - case 584: // typecast_op -> tkIs + case 587: // typecast_op -> tkIs { CurrentSemanticValue.ob = op_typecast.is_op; } break; - case 585: // as_is_expr -> term, typecast_op, simple_or_template_type_reference + case 588: // as_is_expr -> term, typecast_op, simple_or_template_type_reference { CurrentSemanticValue.ex = NewAsIsExpr(ValueStack[ValueStack.Depth-3].ex, (op_typecast)ValueStack[ValueStack.Depth-2].ob, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 586: // term -> factor + case 589: // term -> factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 587: // term -> new_expr + case 590: // term -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 588: // term -> term, mulop, factor + case 591: // term -> term, mulop, factor { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].ex,(ValueStack[ValueStack.Depth-2].op).type, CurrentLocationSpan); } break; - case 589: // term -> as_is_expr + case 592: // term -> as_is_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 590: // mulop -> tkStar + case 593: // mulop -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 591: // mulop -> tkSlash + case 594: // mulop -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 592: // mulop -> tkDiv + case 595: // mulop -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 593: // mulop -> tkMod + case 596: // mulop -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 594: // mulop -> tkShl + case 597: // mulop -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 595: // mulop -> tkShr + case 598: // mulop -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 596: // mulop -> tkAnd + case 599: // mulop -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 597: // default_expr -> tkDefault, tkRoundOpen, simple_or_template_type_reference, + case 600: // default_expr -> tkDefault, tkRoundOpen, simple_or_template_type_reference, // tkRoundClose { CurrentSemanticValue.ex = new default_operator(ValueStack[ValueStack.Depth-2].td as named_type_reference, CurrentLocationSpan); } break; - case 598: // tuple -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, lambda_type_ref, + case 601: // tuple -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, lambda_type_ref, // optional_full_lambda_fp_list, tkRoundClose { /*if ($5 != null) @@ -4961,112 +4983,112 @@ public partial class GPPGParser: ShiftReduceParser tkNil + case 602: // factor -> tkNil { CurrentSemanticValue.ex = new nil_const(); CurrentSemanticValue.ex.source_context = CurrentLocationSpan; } break; - case 600: // factor -> literal_or_number + case 603: // factor -> literal_or_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 601: // factor -> default_expr + case 604: // factor -> default_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 602: // factor -> tkSquareOpen, elem_list, tkSquareClose + case 605: // factor -> tkSquareOpen, elem_list, tkSquareClose { CurrentSemanticValue.ex = new pascal_set_constant(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 603: // factor -> tkNot, factor + case 606: // factor -> tkNot, factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 604: // factor -> sign, factor + case 607: // factor -> sign, factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 605: // factor -> tkDeref, factor + case 608: // factor -> tkDeref, factor { CurrentSemanticValue.ex = new roof_dereference(ValueStack[ValueStack.Depth-1].ex as addressed_value, CurrentLocationSpan); } break; - case 606: // factor -> var_reference + case 609: // factor -> var_reference { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 607: // factor -> tuple + case 610: // factor -> tuple { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 608: // literal_or_number -> literal + case 611: // literal_or_number -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 609: // literal_or_number -> unsigned_number + case 612: // literal_or_number -> unsigned_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 610: // var_question_point -> variable, tkQuestionPoint, variable + case 613: // var_question_point -> variable, tkQuestionPoint, variable { CurrentSemanticValue.ex = new dot_question_node(ValueStack[ValueStack.Depth-3].ex as addressed_value,ValueStack[ValueStack.Depth-1].ex as addressed_value,CurrentLocationSpan); } break; - case 611: // var_question_point -> variable, tkQuestionPoint, var_question_point + case 614: // var_question_point -> variable, tkQuestionPoint, var_question_point { CurrentSemanticValue.ex = new dot_question_node(ValueStack[ValueStack.Depth-3].ex as addressed_value,ValueStack[ValueStack.Depth-1].ex as addressed_value,CurrentLocationSpan); } break; - case 612: // var_reference -> var_address, variable + case 615: // var_reference -> var_address, variable { CurrentSemanticValue.ex = NewVarReference(ValueStack[ValueStack.Depth-2].stn as get_address, ValueStack[ValueStack.Depth-1].ex as addressed_value, CurrentLocationSpan); } break; - case 613: // var_reference -> variable + case 616: // var_reference -> variable { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 614: // var_reference -> var_question_point + case 617: // var_reference -> var_question_point { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 615: // var_address -> tkAddressOf + case 618: // var_address -> tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(CurrentLocationSpan); } break; - case 616: // var_address -> var_address, tkAddressOf + case 619: // var_address -> var_address, tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(ValueStack[ValueStack.Depth-2].stn as get_address, CurrentLocationSpan); } break; - case 617: // attribute_variable -> simple_type_identifier, optional_expr_list_with_bracket + case 620: // attribute_variable -> simple_type_identifier, optional_expr_list_with_bracket { CurrentSemanticValue.stn = new attribute(null, ValueStack[ValueStack.Depth-2].td as named_type_reference, ValueStack[ValueStack.Depth-1].stn as expression_list, CurrentLocationSpan); } break; - case 618: // dotted_identifier -> identifier + case 621: // dotted_identifier -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 619: // dotted_identifier -> dotted_identifier, tkPoint, identifier_or_keyword + case 622: // dotted_identifier -> dotted_identifier, tkPoint, identifier_or_keyword { CurrentSemanticValue.ex = new dot_node(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan); } break; - case 620: // variable_as_type -> dotted_identifier + case 623: // variable_as_type -> dotted_identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;} break; - case 621: // variable_as_type -> dotted_identifier, template_type_params + case 624: // variable_as_type -> dotted_identifier, template_type_params { CurrentSemanticValue.ex = new ident_with_templateparams(ValueStack[ValueStack.Depth-2].ex as addressed_value, ValueStack[ValueStack.Depth-1].stn as template_param_list, CurrentLocationSpan); } break; - case 622: // variable -> identifier + case 625: // variable -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 623: // variable -> operator_name_ident + case 626: // variable -> operator_name_ident { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 624: // variable -> tkInherited, identifier + case 627: // variable -> tkInherited, identifier { CurrentSemanticValue.ex = new inherited_ident(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 625: // variable -> tkRoundOpen, expr, tkRoundClose + case 628: // variable -> tkRoundOpen, expr, tkRoundClose { if (!parsertools.build_tree_for_formatter) { @@ -5076,18 +5098,18 @@ public partial class GPPGParser: ShiftReduceParser sizeof_expr + case 629: // variable -> sizeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 627: // variable -> typeof_expr + case 630: // variable -> typeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 628: // variable -> literal_or_number, tkPoint, identifier_or_keyword + case 631: // variable -> literal_or_number, tkPoint, identifier_or_keyword { CurrentSemanticValue.ex = new dot_node(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan); } break; - case 629: // variable -> variable, tkSquareOpen, expr_list, tkSquareClose + case 632: // variable -> variable, tkSquareOpen, expr_list, tkSquareClose { var el = ValueStack[ValueStack.Depth-2].stn as expression_list; // SSM 10/03/16 if (el.Count==1 && el.expressions[0] is format_expr) @@ -5098,502 +5120,502 @@ public partial class GPPGParser: ShiftReduceParser variable, tkQuestionSquareOpen, format_expr, tkSquareClose + case 633: // variable -> variable, tkQuestionSquareOpen, format_expr, tkSquareClose { var fe = ValueStack[ValueStack.Depth-2].ex as format_expr; // SSM 9/01/17 CurrentSemanticValue.ex = new slice_expr_question(ValueStack[ValueStack.Depth-4].ex as addressed_value,fe.expr,fe.format1,fe.format2,CurrentLocationSpan); } break; - case 631: // variable -> variable, tkRoundOpen, optional_expr_list, tkRoundClose + case 634: // variable -> variable, tkRoundOpen, optional_expr_list, tkRoundClose { CurrentSemanticValue.ex = new method_call(ValueStack[ValueStack.Depth-4].ex as addressed_value,ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 632: // variable -> variable, tkPoint, identifier_keyword_operatorname + case 635: // variable -> variable, tkPoint, identifier_keyword_operatorname { CurrentSemanticValue.ex = new dot_node(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan); } break; - case 633: // variable -> tuple, tkPoint, identifier_keyword_operatorname + case 636: // variable -> tuple, tkPoint, identifier_keyword_operatorname { CurrentSemanticValue.ex = new dot_node(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan); } break; - case 634: // variable -> variable, tkDeref + case 637: // variable -> variable, tkDeref { CurrentSemanticValue.ex = new roof_dereference(ValueStack[ValueStack.Depth-2].ex as addressed_value,CurrentLocationSpan); } break; - case 635: // variable -> variable, tkAmpersend, template_type_params + case 638: // variable -> variable, tkAmpersend, template_type_params { CurrentSemanticValue.ex = new ident_with_templateparams(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].stn as template_param_list, CurrentLocationSpan); } break; - case 636: // optional_expr_list -> expr_list + case 639: // optional_expr_list -> expr_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 637: // optional_expr_list -> /* empty */ + case 640: // optional_expr_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 638: // elem_list -> elem_list1 + case 641: // elem_list -> elem_list1 { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 639: // elem_list -> /* empty */ + case 642: // elem_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 640: // elem_list1 -> elem + case 643: // elem_list1 -> elem { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 641: // elem_list1 -> elem_list1, tkComma, elem + case 644: // elem_list1 -> elem_list1, tkComma, elem { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as expression_list).Add(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 642: // elem -> expr + case 645: // elem -> expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 643: // elem -> expr, tkDotDot, expr + case 646: // elem -> expr, tkDotDot, expr { CurrentSemanticValue.ex = new diapason_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 644: // one_literal -> tkStringLiteral + case 647: // one_literal -> tkStringLiteral { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 645: // one_literal -> tkAsciiChar + case 648: // one_literal -> tkAsciiChar { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 646: // literal -> literal_list + case 649: // literal -> literal_list { CurrentSemanticValue.ex = NewLiteral(ValueStack[ValueStack.Depth-1].stn as literal_const_line); } break; - case 647: // literal_list -> one_literal + case 650: // literal_list -> one_literal { CurrentSemanticValue.stn = new literal_const_line(ValueStack[ValueStack.Depth-1].ex as literal, CurrentLocationSpan); } break; - case 648: // literal_list -> literal_list, one_literal + case 651: // literal_list -> literal_list, one_literal { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-2].stn as literal_const_line).Add(ValueStack[ValueStack.Depth-1].ex as literal, CurrentLocationSpan); } break; - case 649: // operator_name_ident -> tkOperator, overload_operator + case 652: // operator_name_ident -> tkOperator, overload_operator { CurrentSemanticValue.ex = new operator_name_ident((ValueStack[ValueStack.Depth-1].op as op_type_node).text, (ValueStack[ValueStack.Depth-1].op as op_type_node).type, CurrentLocationSpan); } break; - case 650: // optional_method_modificators -> tkSemiColon + case 653: // optional_method_modificators -> tkSemiColon { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 651: // optional_method_modificators -> tkSemiColon, meth_modificators, tkSemiColon + case 654: // optional_method_modificators -> tkSemiColon, meth_modificators, tkSemiColon { //parsertools.AddModifier((procedure_attributes_list)$2, proc_attribute.attr_overload); CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 652: // optional_method_modificators1 -> /* empty */ + case 655: // optional_method_modificators1 -> /* empty */ { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 653: // optional_method_modificators1 -> tkSemiColon, meth_modificators + case 656: // optional_method_modificators1 -> tkSemiColon, meth_modificators { //parsertools.AddModifier((procedure_attributes_list)$2, proc_attribute.attr_overload); CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 654: // meth_modificators -> meth_modificator + case 657: // meth_modificators -> meth_modificator { CurrentSemanticValue.stn = new procedure_attributes_list(ValueStack[ValueStack.Depth-1].id as procedure_attribute, CurrentLocationSpan); } break; - case 655: // meth_modificators -> meth_modificators, tkSemiColon, meth_modificator + case 658: // meth_modificators -> meth_modificators, tkSemiColon, meth_modificator { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as procedure_attributes_list).Add(ValueStack[ValueStack.Depth-1].id as procedure_attribute, CurrentLocationSpan); } break; - case 656: // identifier -> tkIdentifier + case 659: // identifier -> tkIdentifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 657: // identifier -> property_specifier_directives + case 660: // identifier -> property_specifier_directives { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 658: // identifier -> non_reserved + case 661: // identifier -> non_reserved { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 659: // identifier_or_keyword -> identifier + case 662: // identifier_or_keyword -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 660: // identifier_or_keyword -> keyword + case 663: // identifier_or_keyword -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 661: // identifier_or_keyword -> reserved_keyword + case 664: // identifier_or_keyword -> reserved_keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 662: // identifier_keyword_operatorname -> identifier + case 665: // identifier_keyword_operatorname -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 663: // identifier_keyword_operatorname -> keyword + case 666: // identifier_keyword_operatorname -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 664: // identifier_keyword_operatorname -> operator_name_ident + case 667: // identifier_keyword_operatorname -> operator_name_ident { CurrentSemanticValue.id = (ident)ValueStack[ValueStack.Depth-1].ex; } break; - case 665: // meth_modificator -> tkAbstract + case 668: // meth_modificator -> tkAbstract { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 666: // meth_modificator -> tkOverload + case 669: // meth_modificator -> tkOverload { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; parsertools.AddWarningFromResource("OVERLOAD_IS_NOT_USED", ValueStack[ValueStack.Depth-1].id.source_context); } break; - case 667: // meth_modificator -> tkReintroduce + case 670: // meth_modificator -> tkReintroduce { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 668: // meth_modificator -> tkOverride + case 671: // meth_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 669: // meth_modificator -> tkExtensionMethod + case 672: // meth_modificator -> tkExtensionMethod { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 670: // meth_modificator -> tkVirtual + case 673: // meth_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 671: // property_specifier_directives -> tkRead + case 674: // property_specifier_directives -> tkRead { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 672: // property_specifier_directives -> tkWrite + case 675: // property_specifier_directives -> tkWrite { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 673: // non_reserved -> tkName + case 676: // non_reserved -> tkName { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 674: // non_reserved -> tkNew + case 677: // non_reserved -> tkNew { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 675: // visibility_specifier -> tkInternal + case 678: // visibility_specifier -> tkInternal { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 676: // visibility_specifier -> tkPublic + case 679: // visibility_specifier -> tkPublic { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 677: // visibility_specifier -> tkProtected + case 680: // visibility_specifier -> tkProtected { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 678: // visibility_specifier -> tkPrivate + case 681: // visibility_specifier -> tkPrivate { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 679: // keyword -> visibility_specifier + case 682: // keyword -> visibility_specifier { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 680: // keyword -> tkSealed + case 683: // keyword -> tkSealed { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 681: // keyword -> tkTemplate + case 684: // keyword -> tkTemplate { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 682: // keyword -> tkOr + case 685: // keyword -> tkOr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 683: // keyword -> tkTypeOf + case 686: // keyword -> tkTypeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 684: // keyword -> tkSizeOf + case 687: // keyword -> tkSizeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 685: // keyword -> tkDefault + case 688: // keyword -> tkDefault { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 686: // keyword -> tkWhere + case 689: // keyword -> tkWhere { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 687: // keyword -> tkXor + case 690: // keyword -> tkXor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 688: // keyword -> tkAnd + case 691: // keyword -> tkAnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 689: // keyword -> tkDiv + case 692: // keyword -> tkDiv { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 690: // keyword -> tkMod + case 693: // keyword -> tkMod { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 691: // keyword -> tkShl + case 694: // keyword -> tkShl { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 692: // keyword -> tkShr + case 695: // keyword -> tkShr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 693: // keyword -> tkNot + case 696: // keyword -> tkNot { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 694: // keyword -> tkAs + case 697: // keyword -> tkAs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 695: // keyword -> tkIn + case 698: // keyword -> tkIn { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 696: // keyword -> tkIs + case 699: // keyword -> tkIs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 697: // keyword -> tkArray + case 700: // keyword -> tkArray { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 698: // keyword -> tkSequence + case 701: // keyword -> tkSequence { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 699: // keyword -> tkBegin + case 702: // keyword -> tkBegin { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 700: // keyword -> tkCase + case 703: // keyword -> tkCase { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 701: // keyword -> tkClass + case 704: // keyword -> tkClass { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 702: // keyword -> tkConst + case 705: // keyword -> tkConst { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 703: // keyword -> tkConstructor + case 706: // keyword -> tkConstructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 704: // keyword -> tkDestructor + case 707: // keyword -> tkDestructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 705: // keyword -> tkDownto + case 708: // keyword -> tkDownto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 706: // keyword -> tkDo + case 709: // keyword -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 707: // keyword -> tkElse + case 710: // keyword -> tkElse { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 708: // keyword -> tkExcept + case 711: // keyword -> tkExcept { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 709: // keyword -> tkFile + case 712: // keyword -> tkFile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 710: // keyword -> tkAuto + case 713: // keyword -> tkAuto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 711: // keyword -> tkFinalization + case 714: // keyword -> tkFinalization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 712: // keyword -> tkFinally + case 715: // keyword -> tkFinally { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 713: // keyword -> tkFor + case 716: // keyword -> tkFor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 714: // keyword -> tkForeach + case 717: // keyword -> tkForeach { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 715: // keyword -> tkFunction + case 718: // keyword -> tkFunction { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 716: // keyword -> tkIf + case 719: // keyword -> tkIf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 717: // keyword -> tkImplementation + case 720: // keyword -> tkImplementation { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 718: // keyword -> tkInherited + case 721: // keyword -> tkInherited { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 719: // keyword -> tkInitialization + case 722: // keyword -> tkInitialization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 720: // keyword -> tkInterface + case 723: // keyword -> tkInterface { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 721: // keyword -> tkProcedure + case 724: // keyword -> tkProcedure { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 722: // keyword -> tkProperty + case 725: // keyword -> tkProperty { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 723: // keyword -> tkRaise + case 726: // keyword -> tkRaise { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 724: // keyword -> tkRecord + case 727: // keyword -> tkRecord { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 725: // keyword -> tkRepeat + case 728: // keyword -> tkRepeat { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 726: // keyword -> tkSet + case 729: // keyword -> tkSet { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 727: // keyword -> tkTry + case 730: // keyword -> tkTry { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 728: // keyword -> tkType + case 731: // keyword -> tkType { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 729: // keyword -> tkThen + case 732: // keyword -> tkThen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 730: // keyword -> tkTo + case 733: // keyword -> tkTo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 731: // keyword -> tkUntil + case 734: // keyword -> tkUntil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 732: // keyword -> tkUses + case 735: // keyword -> tkUses { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 733: // keyword -> tkVar + case 736: // keyword -> tkVar { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 734: // keyword -> tkWhile + case 737: // keyword -> tkWhile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 735: // keyword -> tkWith + case 738: // keyword -> tkWith { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 736: // keyword -> tkNil + case 739: // keyword -> tkNil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 737: // keyword -> tkGoto + case 740: // keyword -> tkGoto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 738: // keyword -> tkOf + case 741: // keyword -> tkOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 739: // keyword -> tkLabel + case 742: // keyword -> tkLabel { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 740: // keyword -> tkProgram + case 743: // keyword -> tkProgram { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 741: // keyword -> tkUnit + case 744: // keyword -> tkUnit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 742: // keyword -> tkLibrary + case 745: // keyword -> tkLibrary { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 743: // keyword -> tkExternal + case 746: // keyword -> tkExternal { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 744: // keyword -> tkParams + case 747: // keyword -> tkParams { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 745: // keyword -> tkEvent + case 748: // keyword -> tkEvent { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 746: // keyword -> tkYield + case 749: // keyword -> tkYield { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 747: // reserved_keyword -> tkOperator + case 750: // reserved_keyword -> tkOperator { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 748: // reserved_keyword -> tkEnd + case 751: // reserved_keyword -> tkEnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 749: // overload_operator -> tkMinus + case 752: // overload_operator -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 750: // overload_operator -> tkPlus + case 753: // overload_operator -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 751: // overload_operator -> tkSlash + case 754: // overload_operator -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 752: // overload_operator -> tkStar + case 755: // overload_operator -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 753: // overload_operator -> tkEqual + case 756: // overload_operator -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 754: // overload_operator -> tkGreater + case 757: // overload_operator -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 755: // overload_operator -> tkGreaterEqual + case 758: // overload_operator -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 756: // overload_operator -> tkLower + case 759: // overload_operator -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 757: // overload_operator -> tkLowerEqual + case 760: // overload_operator -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 758: // overload_operator -> tkNotEqual + case 761: // overload_operator -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 759: // overload_operator -> tkOr + case 762: // overload_operator -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 760: // overload_operator -> tkXor + case 763: // overload_operator -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 761: // overload_operator -> tkAnd + case 764: // overload_operator -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 762: // overload_operator -> tkDiv + case 765: // overload_operator -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 763: // overload_operator -> tkMod + case 766: // overload_operator -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 764: // overload_operator -> tkShl + case 767: // overload_operator -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 765: // overload_operator -> tkShr + case 768: // overload_operator -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 766: // overload_operator -> tkNot + case 769: // overload_operator -> tkNot { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 767: // overload_operator -> tkIn + case 770: // overload_operator -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 768: // overload_operator -> tkImplicit + case 771: // overload_operator -> tkImplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 769: // overload_operator -> tkExplicit + case 772: // overload_operator -> tkExplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 770: // overload_operator -> assign_operator + case 773: // overload_operator -> assign_operator { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 771: // assign_operator -> tkAssign + case 774: // assign_operator -> tkAssign { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 772: // assign_operator -> tkPlusEqual + case 775: // assign_operator -> tkPlusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 773: // assign_operator -> tkMinusEqual + case 776: // assign_operator -> tkMinusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 774: // assign_operator -> tkMultEqual + case 777: // assign_operator -> tkMultEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 775: // assign_operator -> tkDivEqual + case 778: // assign_operator -> tkDivEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 776: // func_decl_lambda -> identifier, tkArrow, lambda_function_body + case 779: // func_decl_lambda -> identifier, tkArrow, lambda_function_body { var idList = new ident_list(ValueStack[ValueStack.Depth-3].id, LocationStack[LocationStack.Depth-3]); var formalPars = new formal_parameters(new typed_parameters(idList, new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null), parametr_kind.none, null, LocationStack[LocationStack.Depth-3]), LocationStack[LocationStack.Depth-3]); CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), formalPars, new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null), ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 777: // func_decl_lambda -> tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, + case 780: // func_decl_lambda -> tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, // tkArrow, lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 778: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkRoundClose, + case 781: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkRoundClose, // lambda_type_ref_noproctype, tkArrow, lambda_function_body { var idList = new ident_list(ValueStack[ValueStack.Depth-7].id, LocationStack[LocationStack.Depth-7]); @@ -5602,7 +5624,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, + case 782: // func_decl_lambda -> tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, // tkRoundClose, lambda_type_ref_noproctype, tkArrow, // lambda_function_body { @@ -5613,7 +5635,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, + case 783: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, // full_lambda_fp_list, tkRoundClose, // lambda_type_ref_noproctype, tkArrow, lambda_function_body { @@ -5625,7 +5647,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, expr_l1, tkComma, expr_l1_list, + case 784: // func_decl_lambda -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, // lambda_type_ref, optional_full_lambda_fp_list, // tkRoundClose, rem_lambda { @@ -5687,61 +5709,61 @@ public partial class GPPGParser: ShiftReduceParser expl_func_decl_lambda + case 785: // func_decl_lambda -> expl_func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 783: // optional_full_lambda_fp_list -> /* empty */ + case 786: // optional_full_lambda_fp_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 784: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list + case 787: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 785: // rem_lambda -> lambda_type_ref_noproctype, tkArrow, lambda_function_body + case 788: // rem_lambda -> lambda_type_ref_noproctype, tkArrow, lambda_function_body { CurrentSemanticValue.ob = new pair_type_stlist(ValueStack[ValueStack.Depth-3].td,ValueStack[ValueStack.Depth-1].stn as statement_list); } break; - case 786: // expl_func_decl_lambda -> tkFunction, lambda_type_ref, tkArrow, + case 789: // expl_func_decl_lambda -> tkFunction, lambda_type_ref, tkArrow, // lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, 1, CurrentLocationSpan); } break; - case 787: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, tkRoundClose, lambda_type_ref, + case 790: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, tkRoundClose, lambda_type_ref, // tkArrow, lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, 1, CurrentLocationSpan); } break; - case 788: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, + case 791: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, // tkRoundClose, lambda_type_ref, tkArrow, // lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), ValueStack[ValueStack.Depth-5].stn as formal_parameters, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, 1, CurrentLocationSpan); } break; - case 789: // expl_func_decl_lambda -> tkProcedure, tkArrow, lambda_procedure_body + case 792: // expl_func_decl_lambda -> tkProcedure, tkArrow, lambda_procedure_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, null, ValueStack[ValueStack.Depth-1].stn as statement_list, 2, CurrentLocationSpan); } break; - case 790: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, tkRoundClose, tkArrow, + case 793: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, tkRoundClose, tkArrow, // lambda_procedure_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, null, ValueStack[ValueStack.Depth-1].stn as statement_list, 2, CurrentLocationSpan); } break; - case 791: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, full_lambda_fp_list, + case 794: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, full_lambda_fp_list, // tkRoundClose, tkArrow, lambda_procedure_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), ValueStack[ValueStack.Depth-4].stn as formal_parameters, null, ValueStack[ValueStack.Depth-1].stn as statement_list, 2, CurrentLocationSpan); } break; - case 792: // full_lambda_fp_list -> lambda_simple_fp_sect + case 795: // full_lambda_fp_list -> lambda_simple_fp_sect { var typed_pars = ValueStack[ValueStack.Depth-1].stn as typed_parameters; if (typed_pars.vars_type is lambda_inferred_type) @@ -5761,147 +5783,147 @@ public partial class GPPGParser: ShiftReduceParser full_lambda_fp_list, tkSemiColon, lambda_simple_fp_sect + case 796: // full_lambda_fp_list -> full_lambda_fp_list, tkSemiColon, lambda_simple_fp_sect { CurrentSemanticValue.stn =(ValueStack[ValueStack.Depth-3].stn as formal_parameters).Add(ValueStack[ValueStack.Depth-1].stn as typed_parameters, CurrentLocationSpan); } break; - case 794: // lambda_simple_fp_sect -> ident_list, lambda_type_ref + case 797: // lambda_simple_fp_sect -> ident_list, lambda_type_ref { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-2].stn as ident_list, ValueStack[ValueStack.Depth-1].td, parametr_kind.none, null, CurrentLocationSpan); } break; - case 795: // lambda_type_ref -> /* empty */ + case 798: // lambda_type_ref -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 796: // lambda_type_ref -> tkColon, fptype + case 799: // lambda_type_ref -> tkColon, fptype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 797: // lambda_type_ref_noproctype -> /* empty */ + case 800: // lambda_type_ref_noproctype -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 798: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype + case 801: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 799: // lambda_function_body -> expr_l1 + case 802: // lambda_function_body -> expr_l1 { CurrentSemanticValue.stn = NewLambdaBody(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 800: // lambda_function_body -> compound_stmt + case 803: // lambda_function_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 801: // lambda_function_body -> if_stmt + case 804: // lambda_function_body -> if_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 802: // lambda_function_body -> while_stmt + case 805: // lambda_function_body -> while_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 803: // lambda_function_body -> repeat_stmt + case 806: // lambda_function_body -> repeat_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 804: // lambda_function_body -> for_stmt + case 807: // lambda_function_body -> for_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 805: // lambda_function_body -> foreach_stmt + case 808: // lambda_function_body -> foreach_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 806: // lambda_function_body -> case_stmt + case 809: // lambda_function_body -> case_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 807: // lambda_function_body -> try_stmt + case 810: // lambda_function_body -> try_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 808: // lambda_function_body -> lock_stmt + case 811: // lambda_function_body -> lock_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 809: // lambda_function_body -> yield_stmt + case 812: // lambda_function_body -> yield_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 810: // lambda_procedure_body -> proc_call + case 813: // lambda_procedure_body -> proc_call { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 811: // lambda_procedure_body -> compound_stmt + case 814: // lambda_procedure_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 812: // lambda_procedure_body -> if_stmt + case 815: // lambda_procedure_body -> if_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 813: // lambda_procedure_body -> while_stmt + case 816: // lambda_procedure_body -> while_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 814: // lambda_procedure_body -> repeat_stmt + case 817: // lambda_procedure_body -> repeat_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 815: // lambda_procedure_body -> for_stmt + case 818: // lambda_procedure_body -> for_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 816: // lambda_procedure_body -> foreach_stmt + case 819: // lambda_procedure_body -> foreach_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 817: // lambda_procedure_body -> case_stmt + case 820: // lambda_procedure_body -> case_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 818: // lambda_procedure_body -> try_stmt + case 821: // lambda_procedure_body -> try_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 819: // lambda_procedure_body -> lock_stmt + case 822: // lambda_procedure_body -> lock_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 820: // lambda_procedure_body -> yield_stmt + case 823: // lambda_procedure_body -> yield_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 821: // lambda_procedure_body -> assignment + case 824: // lambda_procedure_body -> assignment { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } diff --git a/SyntaxTree/tree/AbstractVisitor.cs b/SyntaxTree/tree/AbstractVisitor.cs index 7ace9f2b0..99abf4bd5 100644 --- a/SyntaxTree/tree/AbstractVisitor.cs +++ b/SyntaxTree/tree/AbstractVisitor.cs @@ -1112,6 +1112,11 @@ namespace PascalABCCompiler.SyntaxTree { DefaultVisit(_sugared_addressed_value); } + + public virtual void visit(double_question_node _double_question_node) + { + DefaultVisit(_double_question_node); + } } diff --git a/SyntaxTree/tree/HierarchyVisitor.cs b/SyntaxTree/tree/HierarchyVisitor.cs index 02e819676..15f0dc9ed 100644 --- a/SyntaxTree/tree/HierarchyVisitor.cs +++ b/SyntaxTree/tree/HierarchyVisitor.cs @@ -1773,6 +1773,14 @@ namespace PascalABCCompiler.SyntaxTree { } + public virtual void pre_do_visit(double_question_node _double_question_node) + { + } + + public virtual void post_do_visit(double_question_node _double_question_node) + { + } + public override void visit(syntax_tree_node _syntax_tree_node) { DefaultVisit(_syntax_tree_node); @@ -3665,6 +3673,15 @@ namespace PascalABCCompiler.SyntaxTree visit(sugared_addressed_value.new_addr_value); post_do_visit(_sugared_addressed_value); } + + public override void visit(double_question_node _double_question_node) + { + DefaultVisit(_double_question_node); + pre_do_visit(_double_question_node); + visit(double_question_node.left); + visit(double_question_node.right); + post_do_visit(_double_question_node); + } } diff --git a/SyntaxTree/tree/SyntaxTreeStreamReader.cs b/SyntaxTree/tree/SyntaxTreeStreamReader.cs index 7968091a4..6f393d632 100644 --- a/SyntaxTree/tree/SyntaxTreeStreamReader.cs +++ b/SyntaxTree/tree/SyntaxTreeStreamReader.cs @@ -462,6 +462,8 @@ namespace PascalABCCompiler.SyntaxTree return new sugared_expression(); case 220: return new sugared_addressed_value(); + case 221: + return new double_question_node(); } return null; } @@ -3903,6 +3905,19 @@ namespace PascalABCCompiler.SyntaxTree _sugared_addressed_value.new_addr_value = _read_node() as addressed_value; } + + public void visit(double_question_node _double_question_node) + { + read_double_question_node(_double_question_node); + } + + public void read_double_question_node(double_question_node _double_question_node) + { + read_addressed_value_funcname(_double_question_node); + _double_question_node.left = _read_node() as expression; + _double_question_node.right = _read_node() as expression; + } + } diff --git a/SyntaxTree/tree/SyntaxTreeStreamWriter.cs b/SyntaxTree/tree/SyntaxTreeStreamWriter.cs index 66b4eab22..385b0f950 100644 --- a/SyntaxTree/tree/SyntaxTreeStreamWriter.cs +++ b/SyntaxTree/tree/SyntaxTreeStreamWriter.cs @@ -6099,6 +6099,36 @@ namespace PascalABCCompiler.SyntaxTree } } + + public void visit(double_question_node _double_question_node) + { + bw.Write((Int16)221); + write_double_question_node(_double_question_node); + } + + public void write_double_question_node(double_question_node _double_question_node) + { + write_addressed_value_funcname(_double_question_node); + if (_double_question_node.left == null) + { + bw.Write((byte)0); + } + else + { + bw.Write((byte)1); + _double_question_node.left.visit(this); + } + if (_double_question_node.right == null) + { + bw.Write((byte)0); + } + else + { + bw.Write((byte)1); + _double_question_node.right.visit(this); + } + } + } diff --git a/SyntaxTree/tree/Tree.cs b/SyntaxTree/tree/Tree.cs index 86bfb583b..c43165e01 100644 --- a/SyntaxTree/tree/Tree.cs +++ b/SyntaxTree/tree/Tree.cs @@ -47165,6 +47165,192 @@ namespace PascalABCCompiler.SyntaxTree } + /// + /// + /// + [Serializable] + public partial class double_question_node : addressed_value_funcname + { + + /// + ///Конструктор без параметров. + /// + public double_question_node() + { + + } + + /// + ///Конструктор с параметрами. + /// + public double_question_node(expression _left,expression _right) + { + this._left=_left; + this._right=_right; + FillParentsInDirectChilds(); + } + + /// + ///Конструктор с параметрами. + /// + public double_question_node(expression _left,expression _right,SourceContext sc) + { + this._left=_left; + this._right=_right; + source_context = sc; + FillParentsInDirectChilds(); + } + protected expression _left; + protected expression _right; + + /// + /// + /// + public expression left + { + get + { + return _left; + } + set + { + _left=value; + } + } + + /// + /// + /// + public expression right + { + get + { + return _right; + } + set + { + _right=value; + } + } + + + /// Создает копию узла + public override syntax_tree_node Clone() + { + double_question_node copy = new double_question_node(); + copy.Parent = this.Parent; + if (source_context != null) + copy.source_context = new SourceContext(source_context); + if (attributes != null) + { + copy.attributes = (attribute_list)attributes.Clone(); + copy.attributes.Parent = copy; + } + if (left != null) + { + copy.left = (expression)left.Clone(); + copy.left.Parent = copy; + } + if (right != null) + { + copy.right = (expression)right.Clone(); + copy.right.Parent = copy; + } + return copy; + } + + /// Получает копию данного узла корректного типа + public new double_question_node TypedClone() + { + return Clone() as double_question_node; + } + + /// Заполняет поля Parent в непосредственных дочерних узлах + public override void FillParentsInDirectChilds() + { + if (attributes != null) + attributes.Parent = this; + if (left != null) + left.Parent = this; + if (right != null) + right.Parent = this; + } + + /// Заполняет поля Parent во всем поддереве + public override void FillParentsInAllChilds() + { + FillParentsInDirectChilds(); + attributes?.FillParentsInAllChilds(); + left?.FillParentsInAllChilds(); + right?.FillParentsInAllChilds(); + } + + /// + ///Свойство для получения количества всех подузлов без элементов поля типа List + /// + public override Int32 subnodes_without_list_elements_count + { + get + { + return 2; + } + } + /// + ///Свойство для получения количества всех подузлов. Подузлом также считается каждый элемент поля типа List + /// + public override Int32 subnodes_count + { + get + { + return 2; + } + } + /// + ///Индексатор для получения всех подузлов + /// + public override syntax_tree_node this[Int32 ind] + { + get + { + if(subnodes_count == 0 || ind < 0 || ind > subnodes_count-1) + throw new IndexOutOfRangeException(); + switch(ind) + { + case 0: + return left; + case 1: + return right; + } + return null; + } + set + { + if(subnodes_count == 0 || ind < 0 || ind > subnodes_count-1) + throw new IndexOutOfRangeException(); + switch(ind) + { + case 0: + left = (expression)value; + break; + case 1: + right = (expression)value; + break; + } + } + } + /// + ///Метод для обхода дерева посетителем + /// + ///Объект-посетитель. + ///Return value is void + public override void visit(IVisitor visitor) + { + visitor.visit(this); + } + + } + + } diff --git a/SyntaxTree/tree/Visitor.cs b/SyntaxTree/tree/Visitor.cs index 45ab1942f..0fa4137f3 100644 --- a/SyntaxTree/tree/Visitor.cs +++ b/SyntaxTree/tree/Visitor.cs @@ -1330,6 +1330,12 @@ namespace PascalABCCompiler.SyntaxTree ///Node to visit /// Return value is void void visit(sugared_addressed_value _sugared_addressed_value); + /// + ///Method to visit double_question_node. + /// + ///Node to visit + /// Return value is void + void visit(double_question_node _double_question_node); } diff --git a/SyntaxTree/tree/tree.xml b/SyntaxTree/tree/tree.xml index 83f67d560..a8e883904 100644 --- a/SyntaxTree/tree/tree.xml +++ b/SyntaxTree/tree/tree.xml @@ -2842,6 +2842,17 @@ + + + + + + + + + + + Tree.cs @@ -3225,6 +3236,9 @@ + + + diff --git a/SyntaxTreeConverters/StandardSyntaxConverter.cs b/SyntaxTreeConverters/StandardSyntaxConverter.cs index fa0ef4b71..03f36299f 100644 --- a/SyntaxTreeConverters/StandardSyntaxConverter.cs +++ b/SyntaxTreeConverters/StandardSyntaxConverter.cs @@ -36,6 +36,9 @@ namespace PascalABCCompiler.SyntaxTreeConverters // question_point_desugar_visitor QuestionPointDesugarVisitor.New.ProcessNode(root); + // double_question_desugar_visitor + DoubleQuestionDesugarVisitor.New.ProcessNode(root); + // Всё, связанное с yield MarkMethodHasYieldAndCheckSomeErrorsVisitor.New.ProcessNode(root); diff --git a/SyntaxVisitors/SugarVisitors/QuestionPointDesugarVisitor.cs b/SyntaxVisitors/SugarVisitors/QuestionPointDesugarVisitor.cs index 2ff3fbb7e..3f1a220fc 100644 --- a/SyntaxVisitors/SugarVisitors/QuestionPointDesugarVisitor.cs +++ b/SyntaxVisitors/SugarVisitors/QuestionPointDesugarVisitor.cs @@ -154,9 +154,10 @@ namespace SyntaxVisitors.SugarVisitors public override void visit(dot_question_node dqn) { - var sug = ConvertToQCE1(dqn); - visit(sug); + var qce = ConvertToQCE1(dqn); + var sug = sugared_addressed_value.NewP(dqn, qce, dqn.source_context); ReplaceUsingParent(dqn, sug); + visit(qce); } } } diff --git a/SyntaxVisitors/SyntaxVisitors.csproj b/SyntaxVisitors/SyntaxVisitors.csproj index fe47691fc..3bbbe660d 100644 --- a/SyntaxVisitors/SyntaxVisitors.csproj +++ b/SyntaxVisitors/SyntaxVisitors.csproj @@ -49,6 +49,7 @@ + diff --git a/TreeConverter/TreeConversion/semantic_checks_for_sugar.cs b/TreeConverter/TreeConversion/semantic_checks_for_sugar.cs index d7381f8be..ffda23e4a 100644 --- a/TreeConverter/TreeConversion/semantic_checks_for_sugar.cs +++ b/TreeConverter/TreeConversion/semantic_checks_for_sugar.cs @@ -104,5 +104,12 @@ namespace PascalABCCompiler.TreeConverter //if (tup.el.expressions.Count > 7) // AddError(get_location(tup),"TUPLE_ELEMENTS_COUNT_MUST_BE_LESSEQUAL_7"); }*/ + + public void semantic_check_dot_question(SyntaxTree.question_colon_expression qce) + { + var av = convert_strong((qce.condition as bin_expr).left); + if (!av.type.is_class) + AddError(av.location, "OPERATOR_DQ_MUST_BE_USED_WITH_A_REFERENCE_TYPE_VALUETYPE"); + } } } diff --git a/TreeConverter/TreeConversion/syntax_tree_visitor.cs b/TreeConverter/TreeConversion/syntax_tree_visitor.cs index 3cccfcf2e..e8a807151 100644 --- a/TreeConverter/TreeConversion/syntax_tree_visitor.cs +++ b/TreeConverter/TreeConversion/syntax_tree_visitor.cs @@ -19428,6 +19428,18 @@ namespace PascalABCCompiler.TreeConverter { semantic_check_method_call_as_slice_expr(av.new_addr_value as SyntaxTree.method_call); } + else if (av.sugared_expr is SyntaxTree.dot_question_node) + { + var qce = av.new_addr_value as SyntaxTree.question_colon_expression; + var av_cs = convert_strong(qce.ret_if_false); + if (!type_table.is_with_nil_allowed(av_cs.type)) + { + var dn = new dot_node(new ident("PABCSystem"), new ident("DQNToNullable")); + (av.new_addr_value as SyntaxTree.question_colon_expression).ret_if_false + = new method_call(dn, new expression_list((av.new_addr_value as SyntaxTree.question_colon_expression).ret_if_false), av.source_context); + } + semantic_check_dot_question(av.new_addr_value as SyntaxTree.question_colon_expression); + } else { AddError(get_location(av), "MISSED_SEMANTIC_CHECK_FOR_SUGARED_NODE_{0}", av.sugared_expr.GetType().Name); diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index a36f7168d..789ca1e67 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -1976,6 +1976,12 @@ procedure __InitPABCSystem; ///-- procedure __FinalizeModule__; +// ----------------------------------------------------- +// DQNToNullable for dot_question_node +// ----------------------------------------------------- + +function DQNToNullable(v:Int32):Nullable; + implementation var @@ -10547,6 +10553,15 @@ begin input.sr.Close; end; +// ----------------------------------------------------- +// DQNToNullable for dot_question_node: implementation +// ----------------------------------------------------- + +function DQNToNullable (v:Int32):Nullable; +begin + Result:=new Nullable(v); +end; + initialization __InitModule; finalization diff --git a/bin/Lng/Rus/SemanticErrors_ms.dat b/bin/Lng/Rus/SemanticErrors_ms.dat index d739192e3..c177a3118 100644 --- a/bin/Lng/Rus/SemanticErrors_ms.dat +++ b/bin/Lng/Rus/SemanticErrors_ms.dat @@ -11,3 +11,4 @@ ONE_TKIDENTIFIER=В качестве типа ожидался идентифи SUGARED_NODE_{0}_IN_SYNTAX_TREE_VISITOR=Сахарный узел {0} не должен обходиться в syntax_tree_visitor. Обратитесь к разработчикам PascalABC.NET MISSED_SEMANTIC_CHECK_FOR_SUGARED_NODE_{0}=Отсутствует семантическая проверка для сахарного узла {0} TUPLE_ELEMENTS_COUNT_MUST_BE_LESSEQUAL_7=Количество элементов кортежа не должно быть больше 7 +OPERATOR_DQ_MUST_BE_USED_WITH_A_REFERENCE_TYPE_VALUETYPE=Оператор ?. может применяться только к ссылочным типам \ No newline at end of file