diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 4af0c85a6..57b90398d 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "11"; public const string Build = "1"; - public const string Revision = "3762"; + public const string Revision = "3763"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index 656a3358e..c6c8a4676 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%COREVERSION%=1 -%REVISION%=3762 %MINOR%=11 +%REVISION%=3763 +%COREVERSION%=1 %MAJOR%=3 diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index 4dbef1b75..4dd47a726 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs @@ -2,7 +2,7 @@ // This CSharp output file generated by Gardens Point LEX // Version: 1.1.3.301 // Machine: DESKTOP-L2INHKG -// DateTime: 08.11.2025 23:08:35 +// DateTime: 22.02.2026 20:16:29 // UserName: user // GPLEX input file // GPLEX frame file diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y index b15c93c17..50f6ebdf6 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y @@ -84,7 +84,7 @@ %type exception_handler %type exception_handler_list %type exception_identifier -%type typed_const_list1 typed_const_list optional_expr_list optional_expr_list_func_param elem_list optional_expr_list_with_bracket expr_list expr_list_func_param const_elem_list1 /*const_expr_list*/ case_label_list const_elem_list optional_const_func_expr_list elem_list1 +%type typed_const_list1 typed_const_list optional_expr_list optional_expr_list_func_param elem_list optional_expr_list_with_bracket optional_expr_list_func_param_with_bracket expr_list expr_list_func_param const_elem_list1 /*const_expr_list*/ case_label_list const_elem_list optional_const_func_expr_list elem_list1 %type enumeration_id expr_l1_or_unpacked_list // %type expr_l1_list %type enumeration_id_list @@ -3523,7 +3523,7 @@ optional_array_initializer ; new_expr - : tkNew simple_or_template_type_reference optional_expr_list_with_bracket + : tkNew simple_or_template_type_reference optional_expr_list_func_param_with_bracket { $$ = new new_expr($2, $3 as expression_list, false, null, @$); } @@ -3614,6 +3614,13 @@ optional_expr_list_with_bracket | tkRoundOpen optional_expr_list tkRoundClose { $$ = $2; } ; + +optional_expr_list_func_param_with_bracket + : + { $$ = null; } + | tkRoundOpen optional_expr_list_func_param tkRoundClose + { $$ = $2; } + ; relop_expr : simple_expr diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index 0c35d763b..cc47c5a29 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -2,7 +2,7 @@ // GPPG version 1.3.6 // Machine: DESKTOP-L2INHKG -// DateTime: 08.11.2025 23:08:35 +// DateTime: 22.02.2026 20:16:29 // UserName: user // Input file @@ -76,8 +76,8 @@ public partial class GPPGParser: ShiftReduceParser aliasses; #pragma warning restore 649 - private static Rule[] rules = new Rule[1028]; - private static State[] states = new State[1705]; + private static Rule[] rules = new Rule[1030]; + private static State[] states = new State[1708]; private static string[] nonTerms = new string[] { "parse_goal", "unit_key_word", "class_or_static", "assignment", "optional_array_initializer", "attribute_declarations", "ot_visibility_specifier", "one_attribute", "attribute_variable", @@ -97,11 +97,11 @@ public partial class GPPGParser: ShiftReduceParser tkNew, simple_or_template_type_reference, - // optional_expr_list_with_bracket + // optional_expr_list_func_param_with_bracket { CurrentSemanticValue.ex = new new_expr(ValueStack[ValueStack.Depth-2].td, ValueStack[ValueStack.Depth-1].stn as expression_list, false, null, CurrentLocationSpan); } @@ -6136,10 +6141,18 @@ public partial class GPPGParser: ShiftReduceParser simple_expr + case 644: // optional_expr_list_func_param_with_bracket -> /* empty */ +{ CurrentSemanticValue.stn = null; } + break; + case 645: // optional_expr_list_func_param_with_bracket -> tkRoundOpen, + // optional_expr_list_func_param, + // tkRoundClose +{ CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } + break; + case 646: // relop_expr -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 645: // relop_expr -> relop_expr, relop, simple_expr + case 647: // relop_expr -> relop_expr, relop, simple_expr { if (ValueStack[ValueStack.Depth-2].op.type == Operators.NotIn) CurrentSemanticValue.ex = new un_expr(new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, Operators.In, CurrentLocationSpan),Operators.LogicalNOT,CurrentLocationSpan); @@ -6147,7 +6160,7 @@ public partial class GPPGParser: ShiftReduceParser relop_expr, relop, new_question_expr + case 648: // relop_expr -> relop_expr, relop, new_question_expr { if (ValueStack[ValueStack.Depth-2].op.type == Operators.NotIn) CurrentSemanticValue.ex = new un_expr(new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, Operators.In, CurrentLocationSpan),Operators.LogicalNOT,CurrentLocationSpan); @@ -6155,26 +6168,26 @@ public partial class GPPGParser: ShiftReduceParser is_type_expr, tkRoundOpen, pattern_out_param_list, tkRoundClose + case 649: // relop_expr -> is_type_expr, tkRoundOpen, pattern_out_param_list, tkRoundClose { var isTypeCheck = ValueStack[ValueStack.Depth-4].ex as typecast_node; var deconstructorPattern = new deconstructor_pattern(ValueStack[ValueStack.Depth-2].ob as List, isTypeCheck.type_def, null, CurrentLocationSpan); CurrentSemanticValue.ex = new is_pattern_expr(isTypeCheck.expr, deconstructorPattern, CurrentLocationSpan); } break; - case 648: // pattern -> simple_or_template_type_reference, tkRoundOpen, + case 650: // pattern -> simple_or_template_type_reference, tkRoundOpen, // pattern_out_param_list, tkRoundClose { CurrentSemanticValue.stn = new deconstructor_pattern(ValueStack[ValueStack.Depth-2].ob as List, ValueStack[ValueStack.Depth-4].td, null, CurrentLocationSpan); } break; - case 649: // pattern_optional_var -> simple_or_template_type_reference, tkRoundOpen, + case 651: // pattern_optional_var -> simple_or_template_type_reference, tkRoundOpen, // pattern_out_param_list_optional_var, tkRoundClose { CurrentSemanticValue.stn = new deconstructor_pattern(ValueStack[ValueStack.Depth-2].ob as List, ValueStack[ValueStack.Depth-4].td, null, CurrentLocationSpan); } break; - case 650: // deconstruction_or_const_pattern -> simple_or_template_type_reference, + case 652: // deconstruction_or_const_pattern -> simple_or_template_type_reference, // tkRoundOpen, // pattern_out_param_list_optional_var, // tkRoundClose @@ -6182,18 +6195,18 @@ public partial class GPPGParser: ShiftReduceParser, ValueStack[ValueStack.Depth-4].td, null, CurrentLocationSpan); } break; - case 651: // deconstruction_or_const_pattern -> const_pattern_expr_list + case 653: // deconstruction_or_const_pattern -> const_pattern_expr_list { CurrentSemanticValue.stn = new const_pattern(ValueStack[ValueStack.Depth-1].ob as List, CurrentLocationSpan); } break; - case 652: // const_pattern_expr_list -> const_pattern_expression + case 654: // const_pattern_expr_list -> const_pattern_expression { CurrentSemanticValue.ob = new List(); (CurrentSemanticValue.ob as List).Add(ValueStack[ValueStack.Depth-1].stn); } break; - case 653: // const_pattern_expr_list -> const_pattern_expr_list, tkComma, + case 655: // const_pattern_expr_list -> const_pattern_expr_list, tkComma, // const_pattern_expression { var list = ValueStack[ValueStack.Depth-3].ob as List; @@ -6201,36 +6214,36 @@ public partial class GPPGParser: ShiftReduceParser literal_or_number + case 656: // const_pattern_expression -> literal_or_number { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].ex; } break; - case 655: // const_pattern_expression -> simple_or_template_type_reference + case 657: // const_pattern_expression -> simple_or_template_type_reference { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].td; } break; - case 656: // const_pattern_expression -> tkNil + case 658: // const_pattern_expression -> tkNil { CurrentSemanticValue.stn = new nil_const(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 657: // const_pattern_expression -> sizeof_expr + case 659: // const_pattern_expression -> sizeof_expr { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].ex; } break; - case 658: // const_pattern_expression -> typeof_expr + case 660: // const_pattern_expression -> typeof_expr { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].ex; } break; - case 659: // collection_pattern -> tkSquareOpen, collection_pattern_expr_list, tkSquareClose + case 661: // collection_pattern -> tkSquareOpen, collection_pattern_expr_list, tkSquareClose { CurrentSemanticValue.stn = new collection_pattern(ValueStack[ValueStack.Depth-2].ob as List, CurrentLocationSpan); } break; - case 660: // collection_pattern_expr_list -> collection_pattern_list_item + case 662: // collection_pattern_expr_list -> collection_pattern_list_item { CurrentSemanticValue.ob = new List(); (CurrentSemanticValue.ob as List).Add(ValueStack[ValueStack.Depth-1].stn as pattern_parameter); } break; - case 661: // collection_pattern_expr_list -> collection_pattern_expr_list, tkComma, + case 663: // collection_pattern_expr_list -> collection_pattern_expr_list, tkComma, // collection_pattern_list_item { var list = ValueStack[ValueStack.Depth-3].ob as List; @@ -6238,108 +6251,108 @@ public partial class GPPGParser: ShiftReduceParser literal_or_number + case 664: // collection_pattern_list_item -> literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 663: // collection_pattern_list_item -> collection_pattern_var_item + case 665: // collection_pattern_list_item -> collection_pattern_var_item { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 664: // collection_pattern_list_item -> tkUnderscore + case 666: // collection_pattern_list_item -> tkUnderscore { CurrentSemanticValue.stn = new collection_pattern_wild_card(CurrentLocationSpan); } break; - case 665: // collection_pattern_list_item -> pattern_optional_var + case 667: // collection_pattern_list_item -> pattern_optional_var { CurrentSemanticValue.stn = new recursive_deconstructor_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 666: // collection_pattern_list_item -> collection_pattern + case 668: // collection_pattern_list_item -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 667: // collection_pattern_list_item -> tuple_pattern + case 669: // collection_pattern_list_item -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 668: // collection_pattern_list_item -> tkDotDot + case 670: // collection_pattern_list_item -> tkDotDot { CurrentSemanticValue.stn = new collection_pattern_gap_parameter(CurrentLocationSpan); } break; - case 669: // collection_pattern_var_item -> tkVar, identifier + case 671: // collection_pattern_var_item -> tkVar, identifier { CurrentSemanticValue.stn = new collection_pattern_var_parameter(ValueStack[ValueStack.Depth-1].id, null, CurrentLocationSpan); } break; - case 670: // tuple_pattern -> tkRoundOpen, tuple_pattern_item_list, tkRoundClose + case 672: // tuple_pattern -> tkRoundOpen, tuple_pattern_item_list, tkRoundClose { if ((ValueStack[ValueStack.Depth-2].ob as List).Count>6) parserTools.AddErrorFromResource("TUPLE_ELEMENTS_COUNT_MUST_BE_LESSEQUAL_7",CurrentLocationSpan); CurrentSemanticValue.stn = new tuple_pattern(ValueStack[ValueStack.Depth-2].ob as List, CurrentLocationSpan); } break; - case 671: // tuple_pattern_item -> tkUnderscore + case 673: // tuple_pattern_item -> tkUnderscore { CurrentSemanticValue.stn = new tuple_pattern_wild_card(CurrentLocationSpan); } break; - case 672: // tuple_pattern_item -> literal_or_number + case 674: // tuple_pattern_item -> literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 673: // tuple_pattern_item -> sign, literal_or_number + case 675: // tuple_pattern_item -> sign, literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan), CurrentLocationSpan); } break; - case 674: // tuple_pattern_item -> tkVar, identifier + case 676: // tuple_pattern_item -> tkVar, identifier { CurrentSemanticValue.stn = new tuple_pattern_var_parameter(ValueStack[ValueStack.Depth-1].id, null, CurrentLocationSpan); } break; - case 675: // tuple_pattern_item -> pattern_optional_var + case 677: // tuple_pattern_item -> pattern_optional_var { CurrentSemanticValue.stn = new recursive_deconstructor_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 676: // tuple_pattern_item -> collection_pattern + case 678: // tuple_pattern_item -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 677: // tuple_pattern_item -> tuple_pattern + case 679: // tuple_pattern_item -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 678: // tuple_pattern_item_list -> tuple_pattern_item + case 680: // tuple_pattern_item_list -> tuple_pattern_item { CurrentSemanticValue.ob = new List(); (CurrentSemanticValue.ob as List).Add(ValueStack[ValueStack.Depth-1].stn as pattern_parameter); } break; - case 679: // tuple_pattern_item_list -> tuple_pattern_item_list, tkComma, tuple_pattern_item + case 681: // tuple_pattern_item_list -> tuple_pattern_item_list, tkComma, tuple_pattern_item { var list = ValueStack[ValueStack.Depth-3].ob as List; list.Add(ValueStack[ValueStack.Depth-1].stn as pattern_parameter); CurrentSemanticValue.ob = list; } break; - case 680: // pattern_out_param_list_optional_var -> pattern_out_param_optional_var + case 682: // pattern_out_param_list_optional_var -> pattern_out_param_optional_var { CurrentSemanticValue.ob = new List(); (CurrentSemanticValue.ob as List).Add(ValueStack[ValueStack.Depth-1].stn as pattern_parameter); } break; - case 681: // pattern_out_param_list_optional_var -> pattern_out_param_list_optional_var, + case 683: // pattern_out_param_list_optional_var -> pattern_out_param_list_optional_var, // tkSemiColon, // pattern_out_param_optional_var { @@ -6348,7 +6361,7 @@ public partial class GPPGParser: ShiftReduceParser pattern_out_param_list_optional_var, + case 684: // pattern_out_param_list_optional_var -> pattern_out_param_list_optional_var, // tkComma, // pattern_out_param_optional_var { @@ -6357,13 +6370,13 @@ public partial class GPPGParser: ShiftReduceParser pattern_out_param + case 685: // pattern_out_param_list -> pattern_out_param { CurrentSemanticValue.ob = new List(); (CurrentSemanticValue.ob as List).Add(ValueStack[ValueStack.Depth-1].stn as pattern_parameter); } break; - case 684: // pattern_out_param_list -> pattern_out_param_list, tkSemiColon, + case 686: // pattern_out_param_list -> pattern_out_param_list, tkSemiColon, // pattern_out_param { var list = ValueStack[ValueStack.Depth-3].ob as List; @@ -6371,182 +6384,182 @@ public partial class GPPGParser: ShiftReduceParser pattern_out_param_list, tkComma, pattern_out_param + case 687: // pattern_out_param_list -> pattern_out_param_list, tkComma, pattern_out_param { var list = ValueStack[ValueStack.Depth-3].ob as List; list.Add(ValueStack[ValueStack.Depth-1].stn as pattern_parameter); CurrentSemanticValue.ob = list; } break; - case 686: // pattern_out_param -> tkUnderscore + case 688: // pattern_out_param -> tkUnderscore { CurrentSemanticValue.stn = new wild_card_deconstructor_parameter(CurrentLocationSpan); } break; - case 687: // pattern_out_param -> literal_or_number + case 689: // pattern_out_param -> literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 688: // pattern_out_param -> tkVar, identifier, tkColon, type_ref + case 690: // pattern_out_param -> tkVar, identifier, tkColon, type_ref { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-1].td, true, CurrentLocationSpan); } break; - case 689: // pattern_out_param -> tkVar, identifier + case 691: // pattern_out_param -> tkVar, identifier { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-1].id, null, true, CurrentLocationSpan); } break; - case 690: // pattern_out_param -> pattern + case 692: // pattern_out_param -> pattern { CurrentSemanticValue.stn = new recursive_deconstructor_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 691: // pattern_out_param -> collection_pattern + case 693: // pattern_out_param -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 692: // pattern_out_param -> tuple_pattern + case 694: // pattern_out_param -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 693: // pattern_out_param_optional_var -> tkUnderscore + case 695: // pattern_out_param_optional_var -> tkUnderscore { CurrentSemanticValue.stn = new wild_card_deconstructor_parameter(CurrentLocationSpan); } break; - case 694: // pattern_out_param_optional_var -> literal_or_number + case 696: // pattern_out_param_optional_var -> literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 695: // pattern_out_param_optional_var -> sign, literal_or_number + case 697: // pattern_out_param_optional_var -> sign, literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan), CurrentLocationSpan); } break; - case 696: // pattern_out_param_optional_var -> identifier, tkColon, type_ref + case 698: // pattern_out_param_optional_var -> identifier, tkColon, type_ref { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-1].td, false, CurrentLocationSpan); } break; - case 697: // pattern_out_param_optional_var -> identifier + case 699: // pattern_out_param_optional_var -> identifier { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-1].id, null, false, CurrentLocationSpan); } break; - case 698: // pattern_out_param_optional_var -> tkVar, identifier, tkColon, type_ref + case 700: // pattern_out_param_optional_var -> tkVar, identifier, tkColon, type_ref { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-1].td, true, CurrentLocationSpan); } break; - case 699: // pattern_out_param_optional_var -> tkVar, identifier + case 701: // pattern_out_param_optional_var -> tkVar, identifier { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-1].id, null, true, CurrentLocationSpan); } break; - case 700: // pattern_out_param_optional_var -> pattern_optional_var + case 702: // pattern_out_param_optional_var -> pattern_optional_var { CurrentSemanticValue.stn = new recursive_deconstructor_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 701: // pattern_out_param_optional_var -> collection_pattern + case 703: // pattern_out_param_optional_var -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 702: // pattern_out_param_optional_var -> tuple_pattern + case 704: // pattern_out_param_optional_var -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 703: // simple_expr_or_nothing -> simple_expr + case 705: // simple_expr_or_nothing -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 704: // simple_expr_or_nothing -> /* empty */ + case 706: // simple_expr_or_nothing -> /* empty */ { CurrentSemanticValue.ex = null; } break; - case 705: // const_expr_or_nothing -> const_expr + case 707: // const_expr_or_nothing -> const_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 706: // const_expr_or_nothing -> /* empty */ + case 708: // const_expr_or_nothing -> /* empty */ { CurrentSemanticValue.ex = null; } break; - case 707: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing + case 709: // 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 708: // format_expr -> tkColon, simple_expr_or_nothing + case 710: // format_expr -> tkColon, simple_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 709: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing, tkColon, + case 711: // 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 710: // format_expr -> tkColon, simple_expr_or_nothing, tkColon, simple_expr + case 712: // format_expr -> tkColon, simple_expr_or_nothing, tkColon, simple_expr { CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 711: // format_const_expr -> const_expr, tkColon, const_expr_or_nothing + case 713: // format_const_expr -> const_expr, tkColon, const_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 712: // format_const_expr -> tkColon, const_expr_or_nothing + case 714: // format_const_expr -> tkColon, const_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 713: // format_const_expr -> const_expr, tkColon, const_expr_or_nothing, tkColon, + case 715: // format_const_expr -> const_expr, tkColon, const_expr_or_nothing, tkColon, // const_expr { CurrentSemanticValue.ex = new format_expr(ValueStack[ValueStack.Depth-5].ex, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 714: // format_const_expr -> tkColon, const_expr_or_nothing, tkColon, const_expr + case 716: // format_const_expr -> tkColon, const_expr_or_nothing, tkColon, const_expr { CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 715: // relop -> tkEqual + case 717: // relop -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 716: // relop -> tkNotEqual + case 718: // relop -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 717: // relop -> tkLower + case 719: // relop -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 718: // relop -> tkGreater + case 720: // relop -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 719: // relop -> tkLowerEqual + case 721: // relop -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 720: // relop -> tkGreaterEqual + case 722: // relop -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 721: // relop -> tkIn + case 723: // relop -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 722: // relop -> tkNot, tkIn + case 724: // relop -> tkNot, tkIn { if (parserTools.buildTreeForFormatter) CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; @@ -6557,10 +6570,10 @@ public partial class GPPGParser: ShiftReduceParser term1 + case 725: // simple_expr -> term1 { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 724: // simple_expr -> simple_expr, tkDotDot, term1 + case 726: // simple_expr -> simple_expr, tkDotDot, term1 { if (parserTools.buildTreeForFormatter) CurrentSemanticValue.ex = new diapason_expr(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); @@ -6568,128 +6581,128 @@ public partial class GPPGParser: ShiftReduceParser term + case 727: // term1 -> term { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 726: // term1 -> term1, addop, term + case 728: // term1 -> term1, 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 727: // term1 -> term1, addop, new_question_expr + case 729: // term1 -> term1, addop, new_question_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 728: // addop -> tkPlus + case 730: // addop -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 729: // addop -> tkMinus + case 731: // addop -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 730: // addop -> tkOr + case 732: // addop -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 731: // addop -> tkXor + case 733: // addop -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 732: // addop -> tkCSharpStyleOr + case 734: // addop -> tkCSharpStyleOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 733: // typecast_op -> tkAs + case 735: // typecast_op -> tkAs { CurrentSemanticValue.ob = op_typecast.as_op; } break; - case 734: // typecast_op -> tkIs + case 736: // typecast_op -> tkIs { CurrentSemanticValue.ob = op_typecast.is_op; } break; - case 735: // as_is_expr -> is_type_expr + case 737: // as_is_expr -> is_type_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 736: // as_is_expr -> as_expr + case 738: // as_is_expr -> as_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 737: // as_expr -> term, tkAs, simple_or_template_type_reference + case 739: // as_expr -> term, tkAs, simple_or_template_type_reference { CurrentSemanticValue.ex = NewAsIsExpr(ValueStack[ValueStack.Depth-3].ex, op_typecast.as_op, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 738: // as_expr -> term, tkAs, array_type + case 740: // as_expr -> term, tkAs, array_type { CurrentSemanticValue.ex = NewAsIsExpr(ValueStack[ValueStack.Depth-3].ex, op_typecast.as_op, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 739: // is_type_expr -> term, tkIs, simple_or_template_type_reference + case 741: // is_type_expr -> term, tkIs, simple_or_template_type_reference { CurrentSemanticValue.ex = NewAsIsExpr(ValueStack[ValueStack.Depth-3].ex, op_typecast.is_op, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 740: // is_type_expr -> term, tkIs, array_type + case 742: // is_type_expr -> term, tkIs, array_type { CurrentSemanticValue.ex = NewAsIsExpr(ValueStack[ValueStack.Depth-3].ex, op_typecast.is_op, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 741: // power_expr -> factor_without_unary_op, tkStarStar, factor + case 743: // power_expr -> factor_without_unary_op, tkStarStar, 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 742: // power_expr -> factor_without_unary_op, tkStarStar, power_expr + case 744: // power_expr -> factor_without_unary_op, tkStarStar, power_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 743: // power_expr -> sign, power_expr + case 745: // power_expr -> sign, power_expr { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 744: // term -> factor + case 746: // term -> factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 745: // term -> new_expr + case 747: // term -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 746: // term -> power_expr + case 748: // term -> power_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 747: // term -> term, mulop, factor + case 749: // 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 748: // term -> term, mulop, power_expr + case 750: // term -> term, mulop, power_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 749: // term -> term, mulop, new_question_expr + case 751: // term -> term, mulop, new_question_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 750: // term -> as_is_expr + case 752: // term -> as_is_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 751: // mulop -> tkStar + case 753: // mulop -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 752: // mulop -> tkSlash + case 754: // mulop -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 753: // mulop -> tkDiv + case 755: // mulop -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 754: // mulop -> tkMod + case 756: // mulop -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 755: // mulop -> tkShl + case 757: // mulop -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 756: // mulop -> tkShr + case 758: // mulop -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 757: // mulop -> tkAnd + case 759: // mulop -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 758: // default_expr -> tkDefault, tkRoundOpen, + case 760: // default_expr -> tkDefault, tkRoundOpen, // simple_or_template_or_question_type_reference, tkRoundClose { CurrentSemanticValue.ex = new default_operator(ValueStack[ValueStack.Depth-2].td as named_type_reference, CurrentLocationSpan); } break; - case 759: // tuple -> tkRoundOpen, expr_l1_or_unpacked, tkComma, expr_l1_or_unpacked_list, + case 761: // tuple -> tkRoundOpen, expr_l1_or_unpacked, tkComma, expr_l1_or_unpacked_list, // lambda_type_ref, optional_full_lambda_fp_list, tkRoundClose { if (ValueStack[ValueStack.Depth-6].ex is unpacked_list_of_ident_or_list) @@ -6708,30 +6721,30 @@ public partial class GPPGParser: ShiftReduceParser literal_or_number + case 762: // factor_without_unary_op -> literal_or_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 761: // factor_without_unary_op -> var_reference + case 763: // factor_without_unary_op -> var_reference { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 762: // factor -> tkNil + case 764: // factor -> tkNil { CurrentSemanticValue.ex = new nil_const(); CurrentSemanticValue.ex.source_context = CurrentLocationSpan; } break; - case 763: // factor -> literal_or_number + case 765: // factor -> literal_or_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 764: // factor -> default_expr + case 766: // factor -> default_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 765: // factor -> tkNot, factor + case 767: // factor -> tkNot, factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 766: // factor -> sign, factor + case 768: // factor -> sign, factor { if (ValueStack[ValueStack.Depth-2].op.type == Operators.Minus) { @@ -6757,103 +6770,103 @@ public partial class GPPGParser: ShiftReduceParser tkDeref, factor + case 769: // factor -> tkDeref, factor { CurrentSemanticValue.ex = new index(ValueStack[ValueStack.Depth-1].ex, true, CurrentLocationSpan); } break; - case 768: // factor -> var_reference + case 770: // factor -> var_reference { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 769: // factor -> tuple + case 771: // factor -> tuple { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 770: // literal_or_number -> literal + case 772: // literal_or_number -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 771: // literal_or_number -> unsigned_number + case 773: // literal_or_number -> unsigned_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 772: // var_question_point -> variable, tkQuestionPoint, variable + case 774: // 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 773: // var_question_point -> variable, tkQuestionPoint, var_question_point + case 775: // 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 774: // var_reference -> var_address, variable + case 776: // 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 775: // var_reference -> variable + case 777: // var_reference -> variable { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 776: // var_reference -> var_question_point + case 778: // var_reference -> var_question_point { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 777: // var_reference -> tkRoundOpen, tkVar, identifier, tkAssign, expr_dq, + case 779: // var_reference -> tkRoundOpen, tkVar, identifier, tkAssign, expr_dq, // tkRoundClose { CurrentSemanticValue.ex = new let_var_expr(ValueStack[ValueStack.Depth-4].id,ValueStack[ValueStack.Depth-2].ex,CurrentLocationSpan); } break; - case 778: // var_address -> tkAddressOf + case 780: // var_address -> tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(CurrentLocationSpan); } break; - case 779: // var_address -> var_address, tkAddressOf + case 781: // var_address -> var_address, tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(ValueStack[ValueStack.Depth-2].stn as get_address, CurrentLocationSpan); } break; - case 780: // attribute_variable -> simple_type_identifier, optional_expr_list_with_bracket + case 782: // 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 781: // attribute_variable -> template_type, optional_expr_list_with_bracket + case 783: // attribute_variable -> template_type, 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 782: // dotted_identifier -> identifier + case 784: // dotted_identifier -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 783: // dotted_identifier -> dotted_identifier, tkPoint, identifier_or_keyword + case 785: // dotted_identifier -> dotted_identifier, tkPoint, identifier_or_keyword { if (ValueStack[ValueStack.Depth-3].ex is index) parserTools.AddErrorFromResource("UNEXPECTED_SYMBOL{0}", LocationStack[LocationStack.Depth-3], "^"); CurrentSemanticValue.ex = new dot_node(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan); } break; - case 784: // variable_as_type -> dotted_identifier + case 786: // variable_as_type -> dotted_identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;} break; - case 785: // variable_as_type -> dotted_identifier, template_type_params + case 787: // 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 786: // var_with_init_for_expr_with_let -> tkVar, identifier, tkAssign, expr, + case 788: // var_with_init_for_expr_with_let -> tkVar, identifier, tkAssign, expr, // tkSemiColon { CurrentSemanticValue.stn = new assign(ValueStack[ValueStack.Depth-4].id as addressed_value, ValueStack[ValueStack.Depth-2].ex, Operators.Assignment, CurrentLocationSpan); } break; - case 787: // var_with_init_for_expr_with_let_list -> var_with_init_for_expr_with_let + case 789: // var_with_init_for_expr_with_let_list -> var_with_init_for_expr_with_let { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 788: // var_with_init_for_expr_with_let_list -> var_with_init_for_expr_with_let_list, + case 790: // var_with_init_for_expr_with_let_list -> var_with_init_for_expr_with_let_list, // var_with_init_for_expr_with_let { ValueStack[ValueStack.Depth-2].stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 789: // proc_func_call -> variable, tkRoundOpen, optional_expr_list_func_param, + case 791: // proc_func_call -> variable, tkRoundOpen, optional_expr_list_func_param, // tkRoundClose { if (ValueStack[ValueStack.Depth-4].ex is index) @@ -6861,18 +6874,18 @@ public partial class GPPGParser: ShiftReduceParser identifier + case 792: // variable -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 791: // variable -> operator_name_ident + case 793: // variable -> operator_name_ident { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 792: // variable -> tkInherited, identifier + case 794: // variable -> tkInherited, identifier { CurrentSemanticValue.ex = new inherited_ident(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 793: // variable -> tkRoundOpen, expr, tkRoundClose + case 795: // variable -> tkRoundOpen, expr, tkRoundClose { if (!parserTools.buildTreeForFormatter) { @@ -6882,7 +6895,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, var_with_init_for_expr_with_let_list, expr, + case 796: // variable -> tkRoundOpen, var_with_init_for_expr_with_let_list, expr, // tkRoundClose { if (!parserTools.buildTreeForFormatter) @@ -6893,25 +6906,25 @@ public partial class GPPGParser: ShiftReduceParser sizeof_expr + case 797: // variable -> sizeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 796: // variable -> typeof_expr + case 798: // variable -> typeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 797: // variable -> literal_or_number, tkPoint, identifier_or_keyword + case 799: // variable -> literal_or_number, tkPoint, identifier_or_keyword { if (ValueStack[ValueStack.Depth-3].ex is index) parserTools.AddErrorFromResource("UNEXPECTED_SYMBOL{0}", LocationStack[LocationStack.Depth-3], "^"); CurrentSemanticValue.ex = new dot_node(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan); } break; - case 798: // variable -> variable, tkSquareOpen, expr_list, tkSquareClose + case 800: // variable -> variable, tkSquareOpen, expr_list, tkSquareClose { CurrentSemanticValue.ex = NewIndexerOrSlice(ValueStack[ValueStack.Depth-4].ex as addressed_value,ValueStack[ValueStack.Depth-2].stn as expression_list,CurrentLocationSpan); } break; - case 799: // variable -> literal_or_number, tkSquareOpen, expr_list, tkSquareClose + case 801: // variable -> literal_or_number, tkSquareOpen, expr_list, tkSquareClose { CurrentSemanticValue.ex = NewIndexerOrSlice(ValueStack[ValueStack.Depth-4].ex as addressed_value,ValueStack[ValueStack.Depth-2].stn as expression_list,CurrentLocationSpan); /*var el = $3 as expression_list; // SSM 10/03/16 @@ -6957,7 +6970,7 @@ public partial class GPPGParser: ShiftReduceParser variable, tkQuestionSquareOpen, format_expr, tkSquareClose + case 802: // variable -> variable, tkQuestionSquareOpen, format_expr, tkSquareClose { var fe = ValueStack[ValueStack.Depth-2].ex as format_expr; // SSM 9/01/17 if (!parserTools.buildTreeForFormatter) @@ -6970,7 +6983,7 @@ public partial class GPPGParser: ShiftReduceParser literal_or_number, tkQuestionSquareOpen, format_expr, tkSquareClose + case 803: // variable -> literal_or_number, tkQuestionSquareOpen, format_expr, tkSquareClose { var fe = ValueStack[ValueStack.Depth-2].ex as format_expr; // SSM 9/01/17 if (!parserTools.buildTreeForFormatter) @@ -6983,87 +6996,87 @@ public partial class GPPGParser: ShiftReduceParser tkVertParen, elem_list, tkVertParen + case 804: // variable -> tkVertParen, elem_list, tkVertParen { CurrentSemanticValue.ex = new array_const_new(ValueStack[ValueStack.Depth-2].stn as expression_list, '|', CurrentLocationSpan); } break; - case 803: // variable -> pascal_set_const + case 805: // variable -> pascal_set_const { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 804: // variable -> proc_func_call + case 806: // variable -> proc_func_call { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 805: // variable -> variable, tkPoint, identifier_keyword_operatorname + case 807: // variable -> variable, tkPoint, identifier_keyword_operatorname { if (ValueStack[ValueStack.Depth-3].ex is index) parserTools.AddErrorFromResource("UNEXPECTED_SYMBOL{0}", LocationStack[LocationStack.Depth-3], "^"); CurrentSemanticValue.ex = new dot_node(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan); } break; - case 806: // variable -> tuple, tkPoint, identifier_keyword_operatorname + case 808: // 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 807: // variable -> variable, tkDeref + case 809: // variable -> variable, tkDeref { CurrentSemanticValue.ex = new roof_dereference(ValueStack[ValueStack.Depth-2].ex as addressed_value,CurrentLocationSpan); } break; - case 808: // variable -> variable, tkAmpersend, template_type_params + case 810: // 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 809: // optional_expr_list -> expr_list + case 811: // optional_expr_list -> expr_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 810: // optional_expr_list -> /* empty */ + case 812: // optional_expr_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 811: // optional_expr_list_func_param -> expr_list_func_param + case 813: // optional_expr_list_func_param -> expr_list_func_param { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 812: // optional_expr_list_func_param -> /* empty */ + case 814: // optional_expr_list_func_param -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 813: // elem_list -> elem_list1 + case 815: // elem_list -> elem_list1 { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 814: // elem_list -> /* empty */ + case 816: // elem_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 815: // elem_list1 -> elem + case 817: // elem_list1 -> elem { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 816: // elem_list1 -> elem_list1, tkComma, elem + case 818: // 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 817: // elem -> expr + case 819: // elem -> expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 818: // elem -> expr, tkDotDot, expr + case 820: // elem -> expr, tkDotDot, expr { CurrentSemanticValue.ex = new diapason_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 819: // one_literal -> tkStringLiteral + case 821: // one_literal -> tkStringLiteral { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 820: // one_literal -> tkAsciiChar + case 822: // one_literal -> tkAsciiChar { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 821: // literal -> literal_list + case 823: // literal -> literal_list { CurrentSemanticValue.ex = NewLiteral(ValueStack[ValueStack.Depth-1].stn as literal_const_line); } break; - case 822: // literal -> tkFormatStringLiteral + case 824: // literal -> tkFormatStringLiteral { if (parserTools.buildTreeForFormatter) { @@ -7075,7 +7088,7 @@ public partial class GPPGParser: ShiftReduceParser tkMultilineStringLiteral + case 825: // literal -> tkMultilineStringLiteral { if (parserTools.buildTreeForFormatter) { @@ -7089,12 +7102,12 @@ public partial class GPPGParser: ShiftReduceParser one_literal + case 826: // literal_list -> one_literal { CurrentSemanticValue.stn = new literal_const_line(ValueStack[ValueStack.Depth-1].ex as literal, CurrentLocationSpan); } break; - case 825: // literal_list -> literal_list, one_literal + case 827: // literal_list -> literal_list, one_literal { var line = ValueStack[ValueStack.Depth-2].stn as literal_const_line; if (line.literals.Last() is string_const && ValueStack[ValueStack.Depth-1].ex is string_const) @@ -7102,481 +7115,481 @@ public partial class GPPGParser: ShiftReduceParser tkOperator, overload_operator + case 828: // 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 827: // optional_method_modificators -> tkSemiColon + case 829: // optional_method_modificators -> tkSemiColon { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 828: // optional_method_modificators -> tkSemiColon, meth_modificators, tkSemiColon + case 830: // 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 829: // optional_method_modificators1 -> /* empty */ + case 831: // optional_method_modificators1 -> /* empty */ { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 830: // optional_method_modificators1 -> tkSemiColon, meth_modificators + case 832: // 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 831: // meth_modificators -> meth_modificator + case 833: // meth_modificators -> meth_modificator { CurrentSemanticValue.stn = new procedure_attributes_list(ValueStack[ValueStack.Depth-1].id as procedure_attribute, CurrentLocationSpan); } break; - case 832: // meth_modificators -> meth_modificators, tkSemiColon, meth_modificator + case 834: // 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 833: // identifier -> tkIdentifier + case 835: // identifier -> tkIdentifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 834: // identifier -> property_specifier_directives + case 836: // identifier -> property_specifier_directives { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 835: // identifier -> non_reserved + case 837: // identifier -> non_reserved { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 836: // identifier -> tkStep + case 838: // identifier -> tkStep { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 837: // identifier -> tkIndex + case 839: // identifier -> tkIndex { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 838: // identifier_or_keyword -> identifier + case 840: // identifier_or_keyword -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 839: // identifier_or_keyword -> keyword + case 841: // identifier_or_keyword -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 840: // identifier_or_keyword -> reserved_keyword + case 842: // identifier_or_keyword -> reserved_keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 841: // identifier_keyword_operatorname -> identifier + case 843: // identifier_keyword_operatorname -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 842: // identifier_keyword_operatorname -> keyword + case 844: // identifier_keyword_operatorname -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 843: // identifier_keyword_operatorname -> operator_name_ident + case 845: // identifier_keyword_operatorname -> operator_name_ident { CurrentSemanticValue.id = (ident)ValueStack[ValueStack.Depth-1].ex; } break; - case 844: // meth_modificator -> tkAbstract + case 846: // meth_modificator -> tkAbstract { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 845: // meth_modificator -> tkOverload + case 847: // 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 846: // meth_modificator -> tkReintroduce + case 848: // meth_modificator -> tkReintroduce { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 847: // meth_modificator -> tkOverride + case 849: // meth_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 848: // meth_modificator -> tkExtensionMethod + case 850: // meth_modificator -> tkExtensionMethod { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 849: // meth_modificator -> tkVirtual + case 851: // meth_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 850: // property_modificator -> tkVirtual + case 852: // property_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 851: // property_modificator -> tkOverride + case 853: // property_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 852: // property_modificator -> tkAbstract + case 854: // property_modificator -> tkAbstract { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 853: // property_modificator -> tkReintroduce + case 855: // property_modificator -> tkReintroduce { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 854: // property_specifier_directives -> tkRead + case 856: // property_specifier_directives -> tkRead { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 855: // property_specifier_directives -> tkWrite + case 857: // property_specifier_directives -> tkWrite { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 856: // non_reserved -> tkName + case 858: // non_reserved -> tkName { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 857: // non_reserved -> tkNew + case 859: // non_reserved -> tkNew { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 858: // visibility_specifier -> tkInternal + case 860: // visibility_specifier -> tkInternal { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 859: // visibility_specifier -> tkPublic + case 861: // visibility_specifier -> tkPublic { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 860: // visibility_specifier -> tkProtected + case 862: // visibility_specifier -> tkProtected { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 861: // visibility_specifier -> tkPrivate + case 863: // visibility_specifier -> tkPrivate { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 862: // keyword -> visibility_specifier + case 864: // keyword -> visibility_specifier { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 863: // keyword -> tkSealed + case 865: // keyword -> tkSealed { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 864: // keyword -> tkTemplate + case 866: // keyword -> tkTemplate { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 865: // keyword -> tkOr + case 867: // keyword -> tkOr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 866: // keyword -> tkTypeOf + case 868: // keyword -> tkTypeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 867: // keyword -> tkSizeOf + case 869: // keyword -> tkSizeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 868: // keyword -> tkDefault + case 870: // keyword -> tkDefault { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 869: // keyword -> tkWhere + case 871: // keyword -> tkWhere { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 870: // keyword -> tkXor + case 872: // keyword -> tkXor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 871: // keyword -> tkAnd + case 873: // keyword -> tkAnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 872: // keyword -> tkDiv + case 874: // keyword -> tkDiv { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 873: // keyword -> tkMod + case 875: // keyword -> tkMod { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 874: // keyword -> tkShl + case 876: // keyword -> tkShl { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 875: // keyword -> tkShr + case 877: // keyword -> tkShr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 876: // keyword -> tkNot + case 878: // keyword -> tkNot { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 877: // keyword -> tkAs + case 879: // keyword -> tkAs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 878: // keyword -> tkIn + case 880: // keyword -> tkIn { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 879: // keyword -> tkIs + case 881: // keyword -> tkIs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 880: // keyword -> tkArray + case 882: // keyword -> tkArray { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 881: // keyword -> tkSequence + case 883: // keyword -> tkSequence { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 882: // keyword -> tkBegin + case 884: // keyword -> tkBegin { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 883: // keyword -> tkCase + case 885: // keyword -> tkCase { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 884: // keyword -> tkClass + case 886: // keyword -> tkClass { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 885: // keyword -> tkConst + case 887: // keyword -> tkConst { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 886: // keyword -> tkConstructor + case 888: // keyword -> tkConstructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 887: // keyword -> tkDestructor + case 889: // keyword -> tkDestructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 888: // keyword -> tkDownto + case 890: // keyword -> tkDownto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 889: // keyword -> tkDo + case 891: // keyword -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 890: // keyword -> tkElse + case 892: // keyword -> tkElse { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 891: // keyword -> tkEnd + case 893: // keyword -> tkEnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 892: // keyword -> tkExcept + case 894: // keyword -> tkExcept { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 893: // keyword -> tkFile + case 895: // keyword -> tkFile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 894: // keyword -> tkAuto + case 896: // keyword -> tkAuto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 895: // keyword -> tkFinalization + case 897: // keyword -> tkFinalization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 896: // keyword -> tkFinally + case 898: // keyword -> tkFinally { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 897: // keyword -> tkFor + case 899: // keyword -> tkFor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 898: // keyword -> tkForeach + case 900: // keyword -> tkForeach { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 899: // keyword -> tkFunction + case 901: // keyword -> tkFunction { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 900: // keyword -> tkIf + case 902: // keyword -> tkIf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 901: // keyword -> tkImplementation + case 903: // keyword -> tkImplementation { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 902: // keyword -> tkInherited + case 904: // keyword -> tkInherited { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 903: // keyword -> tkInitialization + case 905: // keyword -> tkInitialization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 904: // keyword -> tkInterface + case 906: // keyword -> tkInterface { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 905: // keyword -> tkProcedure + case 907: // keyword -> tkProcedure { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 906: // keyword -> tkProperty + case 908: // keyword -> tkProperty { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 907: // keyword -> tkRaise + case 909: // keyword -> tkRaise { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 908: // keyword -> tkRecord + case 910: // keyword -> tkRecord { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 909: // keyword -> tkRepeat + case 911: // keyword -> tkRepeat { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 910: // keyword -> tkSet + case 912: // keyword -> tkSet { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 911: // keyword -> tkTry + case 913: // keyword -> tkTry { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 912: // keyword -> tkType + case 914: // keyword -> tkType { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 913: // keyword -> tkStatic + case 915: // keyword -> tkStatic { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 914: // keyword -> tkThen + case 916: // keyword -> tkThen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 915: // keyword -> tkTo + case 917: // keyword -> tkTo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 916: // keyword -> tkUntil + case 918: // keyword -> tkUntil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 917: // keyword -> tkUses + case 919: // keyword -> tkUses { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 918: // keyword -> tkVar + case 920: // keyword -> tkVar { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 919: // keyword -> tkWhile + case 921: // keyword -> tkWhile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 920: // keyword -> tkWith + case 922: // keyword -> tkWith { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 921: // keyword -> tkNil + case 923: // keyword -> tkNil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 922: // keyword -> tkGoto + case 924: // keyword -> tkGoto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 923: // keyword -> tkOf + case 925: // keyword -> tkOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 924: // keyword -> tkLabel + case 926: // keyword -> tkLabel { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 925: // keyword -> tkProgram + case 927: // keyword -> tkProgram { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 926: // keyword -> tkUnit + case 928: // keyword -> tkUnit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 927: // keyword -> tkLibrary + case 929: // keyword -> tkLibrary { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 928: // keyword -> tkNamespace + case 930: // keyword -> tkNamespace { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 929: // keyword -> tkExternal + case 931: // keyword -> tkExternal { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 930: // keyword -> tkParams + case 932: // keyword -> tkParams { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 931: // keyword -> tkEvent + case 933: // keyword -> tkEvent { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 932: // keyword -> tkYield + case 934: // keyword -> tkYield { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 933: // keyword -> tkMatch + case 935: // keyword -> tkMatch { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 934: // keyword -> tkWhen + case 936: // keyword -> tkWhen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 935: // keyword -> tkPartial + case 937: // keyword -> tkPartial { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 936: // keyword -> tkAbstract + case 938: // keyword -> tkAbstract { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 937: // keyword -> tkLock + case 939: // keyword -> tkLock { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 938: // keyword -> tkImplicit + case 940: // keyword -> tkImplicit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 939: // keyword -> tkExplicit + case 941: // keyword -> tkExplicit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 940: // keyword -> tkOn + case 942: // keyword -> tkOn { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 941: // keyword -> tkVirtual + case 943: // keyword -> tkVirtual { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 942: // keyword -> tkOverride + case 944: // keyword -> tkOverride { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 943: // keyword -> tkLoop + case 945: // keyword -> tkLoop { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 944: // keyword -> tkExtensionMethod + case 946: // keyword -> tkExtensionMethod { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 945: // keyword -> tkOverload + case 947: // keyword -> tkOverload { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 946: // keyword -> tkReintroduce + case 948: // keyword -> tkReintroduce { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 947: // keyword -> tkForward + case 949: // keyword -> tkForward { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 948: // reserved_keyword -> tkOperator + case 950: // reserved_keyword -> tkOperator { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 949: // overload_operator -> tkMinus + case 951: // overload_operator -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 950: // overload_operator -> tkPlus + case 952: // overload_operator -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 951: // overload_operator -> tkSlash + case 953: // overload_operator -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 952: // overload_operator -> tkStar + case 954: // overload_operator -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 953: // overload_operator -> tkEqual + case 955: // overload_operator -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 954: // overload_operator -> tkGreater + case 956: // overload_operator -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 955: // overload_operator -> tkGreaterEqual + case 957: // overload_operator -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 956: // overload_operator -> tkLower + case 958: // overload_operator -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 957: // overload_operator -> tkLowerEqual + case 959: // overload_operator -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 958: // overload_operator -> tkNotEqual + case 960: // overload_operator -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 959: // overload_operator -> tkOr + case 961: // overload_operator -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 960: // overload_operator -> tkXor + case 962: // overload_operator -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 961: // overload_operator -> tkAnd + case 963: // overload_operator -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 962: // overload_operator -> tkDiv + case 964: // overload_operator -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 963: // overload_operator -> tkMod + case 965: // overload_operator -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 964: // overload_operator -> tkShl + case 966: // overload_operator -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 965: // overload_operator -> tkShr + case 967: // overload_operator -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 966: // overload_operator -> tkNot + case 968: // overload_operator -> tkNot { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 967: // overload_operator -> tkIn + case 969: // overload_operator -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 968: // overload_operator -> tkImplicit + case 970: // overload_operator -> tkImplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 969: // overload_operator -> tkExplicit + case 971: // overload_operator -> tkExplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 970: // overload_operator -> assign_operator + case 972: // overload_operator -> assign_operator { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 971: // overload_operator -> tkStarStar + case 973: // overload_operator -> tkStarStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 972: // assign_operator -> tkAssign + case 974: // assign_operator -> tkAssign { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 973: // assign_operator -> tkPlusEqual + case 975: // assign_operator -> tkPlusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 974: // assign_operator -> tkMinusEqual + case 976: // assign_operator -> tkMinusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 975: // assign_operator -> tkMultEqual + case 977: // assign_operator -> tkMultEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 976: // assign_operator -> tkDivEqual + case 978: // assign_operator -> tkDivEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 977: // lambda_unpacked_params -> tkBackSlashRoundOpen, + case 979: // lambda_unpacked_params -> tkBackSlashRoundOpen, // lambda_list_of_unpacked_params_or_id, tkComma, // lambda_unpacked_params_or_id, tkRoundClose { @@ -7585,24 +7598,24 @@ public partial class GPPGParser: ShiftReduceParser lambda_unpacked_params + case 980: // lambda_unpacked_params_or_id -> lambda_unpacked_params { CurrentSemanticValue.ob = new ident_or_list(ValueStack[ValueStack.Depth-1].ex as unpacked_list_of_ident_or_list); } break; - case 979: // lambda_unpacked_params_or_id -> identifier + case 981: // lambda_unpacked_params_or_id -> identifier { CurrentSemanticValue.ob = new ident_or_list(ValueStack[ValueStack.Depth-1].id as ident); } break; - case 980: // lambda_list_of_unpacked_params_or_id -> lambda_unpacked_params_or_id + case 982: // lambda_list_of_unpacked_params_or_id -> lambda_unpacked_params_or_id { CurrentSemanticValue.ob = new unpacked_list_of_ident_or_list(); (CurrentSemanticValue.ob as unpacked_list_of_ident_or_list).Add(ValueStack[ValueStack.Depth-1].ob as ident_or_list); (CurrentSemanticValue.ob as unpacked_list_of_ident_or_list).source_context = LocationStack[LocationStack.Depth-1]; } break; - case 981: // lambda_list_of_unpacked_params_or_id -> lambda_list_of_unpacked_params_or_id, + case 983: // lambda_list_of_unpacked_params_or_id -> lambda_list_of_unpacked_params_or_id, // tkComma, lambda_unpacked_params_or_id { CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-3].ob; @@ -7610,24 +7623,24 @@ public partial class GPPGParser: ShiftReduceParser expr_l1 + case 984: // expr_l1_or_unpacked -> expr_l1 { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 983: // expr_l1_or_unpacked -> lambda_unpacked_params + case 985: // expr_l1_or_unpacked -> lambda_unpacked_params { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 984: // expr_l1_or_unpacked_list -> expr_l1_or_unpacked + case 986: // expr_l1_or_unpacked_list -> expr_l1_or_unpacked { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 985: // expr_l1_or_unpacked_list -> expr_l1_or_unpacked_list, tkComma, + case 987: // expr_l1_or_unpacked_list -> expr_l1_or_unpacked_list, tkComma, // expr_l1_or_unpacked { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as expression_list).Add(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 986: // func_decl_lambda -> identifier, tkArrow, lambda_function_body + case 988: // 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 lambda_any_type_node_syntax(), LocationStack[LocationStack.Depth-3]), parametr_kind.none, null, LocationStack[LocationStack.Depth-3]), LocationStack[LocationStack.Depth-3]); @@ -7638,7 +7651,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, + case 989: // func_decl_lambda -> tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, // tkArrow, lambda_function_body { // �?дес�? надо анализи�?ова�?�? по �?ел�? и либо ос�?авля�?�? lambda_inferred_type, либо дела�?�? его null! @@ -7648,7 +7661,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkColon, fptype, tkRoundClose, + case 990: // 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]); @@ -7660,7 +7673,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, + case 991: // func_decl_lambda -> tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, // tkRoundClose, lambda_type_ref_noproctype, tkArrow, // lambda_function_body { @@ -7674,7 +7687,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, + case 992: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, // full_lambda_fp_list, tkRoundClose, // lambda_type_ref_noproctype, tkArrow, lambda_function_body { @@ -7689,7 +7702,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, expr_l1_or_unpacked, tkComma, + case 993: // func_decl_lambda -> tkRoundOpen, expr_l1_or_unpacked, tkComma, // expr_l1_or_unpacked_list, lambda_type_ref, // optional_full_lambda_fp_list, tkRoundClose, rem_lambda { @@ -7799,7 +7812,7 @@ public partial class GPPGParser: ShiftReduceParser lambda_unpacked_params, rem_lambda + case 994: // func_decl_lambda -> lambda_unpacked_params, rem_lambda { var pair = ValueStack[ValueStack.Depth-1].ob as pair_type_stlist; // пока �?о�?мал�?н�?е па�?аме�?�?�? - null. Раск�?оем и�? са�?а�?н�?м визи�?о�?ом @@ -7811,62 +7824,62 @@ public partial class GPPGParser: ShiftReduceParser expl_func_decl_lambda + case 995: // func_decl_lambda -> expl_func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 994: // optional_full_lambda_fp_list -> /* empty */ + case 996: // optional_full_lambda_fp_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 995: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list + case 997: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 996: // rem_lambda -> lambda_type_ref_noproctype, tkArrow, lambda_function_body + case 998: // 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 997: // expl_func_decl_lambda -> tkFunction, lambda_type_ref_noproctype, tkArrow, + case 999: // expl_func_decl_lambda -> tkFunction, 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, 1, CurrentLocationSpan); } break; - case 998: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, tkRoundClose, - // lambda_type_ref_noproctype, tkArrow, - // lambda_function_body + case 1000: // expl_func_decl_lambda -> tkFunction, 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, 1, CurrentLocationSpan); } break; - case 999: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, - // tkRoundClose, lambda_type_ref_noproctype, tkArrow, - // lambda_function_body + case 1001: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, + // tkRoundClose, lambda_type_ref_noproctype, 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 1000: // expl_func_decl_lambda -> tkProcedure, tkArrow, lambda_procedure_body + case 1002: // 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 1001: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, tkRoundClose, tkArrow, + case 1003: // 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 1002: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, full_lambda_fp_list, + case 1004: // 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 1003: // full_lambda_fp_list -> lambda_simple_fp_sect + case 1005: // 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) @@ -7886,102 +7899,102 @@ public partial class GPPGParser: ShiftReduceParser full_lambda_fp_list, tkSemiColon, lambda_simple_fp_sect + case 1006: // 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 1005: // lambda_simple_fp_sect -> ident_list, lambda_type_ref + case 1007: // 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 1006: // lambda_type_ref -> /* empty */ + case 1008: // lambda_type_ref -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new lambda_any_type_node_syntax(), null); } break; - case 1007: // lambda_type_ref -> tkColon, fptype + case 1009: // lambda_type_ref -> tkColon, fptype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 1008: // lambda_type_ref_noproctype -> /* empty */ + case 1010: // lambda_type_ref_noproctype -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new lambda_any_type_node_syntax(), null); } break; - case 1009: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype + case 1011: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 1010: // common_lambda_body -> compound_stmt + case 1012: // common_lambda_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 1011: // common_lambda_body -> if_stmt + case 1013: // common_lambda_body -> if_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1012: // common_lambda_body -> while_stmt + case 1014: // common_lambda_body -> while_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1013: // common_lambda_body -> repeat_stmt + case 1015: // common_lambda_body -> repeat_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1014: // common_lambda_body -> for_stmt + case 1016: // common_lambda_body -> for_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1015: // common_lambda_body -> foreach_stmt + case 1017: // common_lambda_body -> foreach_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1016: // common_lambda_body -> loop_stmt + case 1018: // common_lambda_body -> loop_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1017: // common_lambda_body -> case_stmt + case 1019: // common_lambda_body -> case_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1018: // common_lambda_body -> try_stmt + case 1020: // common_lambda_body -> try_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1019: // common_lambda_body -> lock_stmt + case 1021: // common_lambda_body -> lock_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1020: // common_lambda_body -> raise_stmt + case 1022: // common_lambda_body -> raise_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1021: // common_lambda_body -> yield_stmt + case 1023: // common_lambda_body -> yield_stmt { parserTools.AddErrorFromResource("YIELD_STATEMENT_CANNOT_BE_USED_IN_LAMBDA_BODY", CurrentLocationSpan); } break; - case 1022: // common_lambda_body -> tkRoundOpen, assignment, tkRoundClose + case 1024: // common_lambda_body -> tkRoundOpen, assignment, tkRoundClose { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-2].stn as statement, LocationStack[LocationStack.Depth-2]); } break; - case 1023: // lambda_function_body -> expr_l1_for_lambda + case 1025: // lambda_function_body -> expr_l1_for_lambda { var id = SyntaxVisitors.HasNameVisitor.HasName(ValueStack[ValueStack.Depth-1].ex, "Result"); if (id != null) @@ -7993,22 +8006,22 @@ public partial class GPPGParser: ShiftReduceParser common_lambda_body + case 1026: // lambda_function_body -> common_lambda_body { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 1025: // lambda_procedure_body -> proc_call + case 1027: // lambda_procedure_body -> proc_call { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1026: // lambda_procedure_body -> assignment + case 1028: // lambda_procedure_body -> assignment { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1027: // lambda_procedure_body -> common_lambda_body + case 1029: // lambda_procedure_body -> common_lambda_body { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } diff --git a/Parsers/PascalABCParserNewSaushkin/PABC.ymc b/Parsers/PascalABCParserNewSaushkin/PABC.ymc index a23cd3029..04e805f7b 100644 --- a/Parsers/PascalABCParserNewSaushkin/PABC.ymc +++ b/Parsers/PascalABCParserNewSaushkin/PABC.ymc @@ -396,5 +396,6 @@ script= + diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index 521c7661c..001952aa7 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.11.1.3762 +3.11.1.3763 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index f7eebd55a..0db453963 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.11.1.3762' +!define VERSION '3.11.1.3763' diff --git a/TreeConverter/TreeConversion/convertion_data_and_alghoritms.cs b/TreeConverter/TreeConversion/convertion_data_and_alghoritms.cs index fece2bba2..8414e9d14 100644 --- a/TreeConverter/TreeConversion/convertion_data_and_alghoritms.cs +++ b/TreeConverter/TreeConversion/convertion_data_and_alghoritms.cs @@ -3083,7 +3083,7 @@ namespace PascalABCCompiler.TreeConverter return AddError(err_out); return list[0]; } - else + else // здесь логика именованных аргументов { var indexOfFirstNamedArgumentSem = indexOfFirstNamedArgument + params_inc; diff --git a/bin/Lib/MLABC.pas b/bin/Lib/MLABC.pas index 8bb25e18d..18a76962e 100644 --- a/bin/Lib/MLABC.pas +++ b/bin/Lib/MLABC.pas @@ -47,6 +47,7 @@ type RandomForestRegressor = MLModelsABC.RandomForestRegressor; RandomForestClassifier = MLModelsABC.RandomForestClassifier; GradientBoostingRegressor = MLModelsABC.GradientBoostingRegressor; + GradientBoostingClassifier = MLModelsABC.GradientBoostingClassifier; TGBLoss = MLModelsABC.TGBLoss; TMaxFeaturesMode = MLModelsABC.TMaxFeaturesMode; diff --git a/bin/Lib/MLModelsABC.pas b/bin/Lib/MLModelsABC.pas index 3c91aae88..71c06d3a4 100644 --- a/bin/Lib/MLModelsABC.pas +++ b/bin/Lib/MLModelsABC.pas @@ -495,6 +495,75 @@ type property ValLossHistory: List read fValLossHistory; property BestIteration: integer read fBestIteration; end; + + TGBCLoss = (LogLoss); + + type + GradientBoostingClassifier = class(IProbabilisticClassifier) + private + // hyperparams + fNEstimators: integer; + fLearningRate: real; + fMaxDepth: integer; + fMinSamplesSplit: integer; + fMinSamplesLeaf: integer; + fSubsample: real; + fRandomSeed: integer; + fEarlyStoppingPatience: integer; + + // fitted state + fFitted: boolean; + fFeatureCount: integer; + + fClassCount: integer; + fClasses: array of integer; // реальные метки классов (unique) + fClassIndex: Dictionary; // label -> 0..K-1 + + // [m][k] дерево для класса k на итерации m + fEstimators: List; + + // init logits (как минимум нули; позже можно log-prior) + fInitLogits: array of real; // длины K + + // diagnostics + fTrainLossHistory: List; + fValLossHistory: List; + fBestIteration: integer; + fBestValLoss: real; + + private + function FitInternal(XTrain: Matrix; yTrain: Vector; XVal: Matrix; yVal: Vector; useValidation: boolean): IModel; + + procedure BuildClassMapping(y: Vector); + function EncodeLabels(y: Vector): array of integer; + + procedure SoftmaxRow(var logits: array of real; var probs: array of real); + procedure SoftmaxMatrix(logits: Matrix; probs: Matrix); + + function ComputeLogLoss(yEncoded: array of integer; probs: Matrix): real; + public + constructor Create( + nEstimators: integer := 200; + learningRate: real := 0.05; + maxDepth: integer := 3; + minSamplesSplit: integer := 2; + minSamplesLeaf: integer := 1; + subsample: real := 1.0; + randomSeed: integer := 42; + earlyStoppingPatience: integer := 20); + + function Fit(X: Matrix; y: Vector): IModel; + function FitWithValidation(XTrain: Matrix; yTrain: Vector; XVal: Matrix; yVal: Vector): IModel; + + function Predict(X: Matrix): Vector; + function PredictProba(X: Matrix): Matrix; + + function Clone: IModel; + + property TrainLossHistory: List read fTrainLossHistory; + property ValLossHistory: List read fValLossHistory; + property BestIteration: integer read fBestIteration; + end; {$endregion Models} @@ -844,7 +913,18 @@ const ER_LEARNING_RATE_NOT_POSITIVE = 'Параметр learningRate должен быть > 0!!learningRate must be > 0'; ER_SUBSAMPLE_OUT_OF_RANGE = - 'Параметр subsample должен быть в диапазоне (0, 1]!!subsample must be in (0, 1]'; + 'Параметр subsample должен быть в диапазоне (0, 1]!!subsample must be in (0, 1]'; + ER_LABELS_NOT_INTEGER = + 'Метки классов должны быть целыми!!Class labels must be integers'; + ER_N_ESTIMATORS_INVALID = + 'nEstimators должен быть > 0!!nEstimators must be > 0'; + ER_LEARNING_RATE_INVALID = + 'learningRate должен быть > 0!!learningRate must be > 0'; + ER_MAX_DEPTH_INVALID = + 'maxDepth должен быть > 0!!maxDepth must be > 0'; + ER_SUBSAMPLE_INVALID = + 'subsample должен быть > 0!!subsample must be > 0'; + {$endregion ErrConstants} @@ -1242,7 +1322,21 @@ begin var p := X.ColCount; // --- internal encoding - var unique := y.data.Select(v -> integer(v)).Distinct.ToArray; + var classes := new HashSet; + + for var i := 0 to y.Length - 1 do + begin + var r := y[i]; + var ir := Round(r); + + if Abs(r - ir) > 1e-12 then + ArgumentError(ER_LABELS_NOT_INTEGER); + + classes.Add(ir); + end; + + var unique := classes.ToArray; + &Array.Sort(unique); fClassCount := unique.Length; @@ -1255,18 +1349,27 @@ begin fIndexToClass[i] := unique[i]; end; + // --- encode labels var yEncoded := new Vector(m); + for var i := 0 to m - 1 do - yEncoded[i] := fClassToIndex[integer(y[i])]; - + begin + var ir := Round(y[i]); // безопасно после проверки + yEncoded[i] := fClassToIndex[ir]; + end; + // --- init fW := new Matrix(p, fClassCount); fIntercept := new Vector(fClassCount); - + // --- one-hot var YoneHot := new Matrix(m, fClassCount); + for var i := 0 to m - 1 do - YoneHot[i, integer(yEncoded[i])] := 1.0; + begin + var cls := Round(yEncoded[i]); // индекс класса 0..K-1 + YoneHot[i, cls] := 1.0; + end; for var epoch := 1 to fEpochs do begin @@ -1312,23 +1415,6 @@ begin Result := Self; end; -{function LogisticRegression.PredictProba(X: Matrix): Vector; -begin - if not fFitted then - NotFittedError(ER_FIT_NOT_CALLED); - - var P := PredictProbaMatrix(X); - - var m := P.RowCount; - Result := new Vector(m); - - for var i := 0 to m - 1 do - begin - var k := P.RowArgMax(i); - Result[i] := P[i, k]; - end; -end;} - function LogisticRegression.PredictProba(X: Matrix): Matrix; begin if not fFitted then @@ -1971,31 +2057,39 @@ begin fFeatureImportances := new Vector(X.Cols); - // --- 1. Найти уникальные классы - var unique := new HashSet; - + // --- 1. Найти уникальные классы (с проверкой целочисленности) + var classes := new HashSet; + for var i := 0 to y.Length - 1 do - unique.Add(integer(y[i])); - - fClassCount := unique.Count; - - // --- 2. Создать массив index -> original class - SetLength(fIndexToClass, fClassCount); - fClassToIndex := new Dictionary; - - var idx := 0; - foreach var c in unique do begin - fIndexToClass[idx] := c; - fClassToIndex[c] := idx; - idx += 1; + var r := y[i]; + var ir := Round(r); + + if Abs(r - ir) > 1e-12 then + ArgumentError(ER_LABELS_NOT_INTEGER); + + classes.Add(ir); end; - + + fClassCount := classes.Count; + + // --- 2. Отсортировать классы для детерминизма + fIndexToClass := classes.ToArray; + &Array.Sort(fIndexToClass); + + fClassToIndex := new Dictionary; + + for var idx := 0 to fClassCount - 1 do + fClassToIndex[fIndexToClass[idx]] := idx; + // --- 3. Создать закодированный y var yEncoded := new Vector(y.Length); - + for var i := 0 to y.Length - 1 do - yEncoded[i] := fClassToIndex[integer(y[i])]; + begin + var ir := Round(y[i]); // безопасно после проверки + yEncoded[i] := fClassToIndex[ir]; + end; // --- 4. Создать массив индексов строк var indices := new integer[X.Rows]; @@ -2769,6 +2863,500 @@ begin Result := copy; end; +//----------------------------- +// GradientBoostingClassifier +//----------------------------- + +function GradientBoostingClassifier.FitInternal( + XTrain: Matrix; yTrain: Vector; + XVal: Matrix; yVal: Vector; + useValidation: boolean): IModel; +begin + // --- checks + if XTrain = nil then + ArgumentNullError(ER_X_NULL); + + if yTrain = nil then + ArgumentNullError(ER_Y_NULL); + + if XTrain.Rows <> yTrain.Length then + DimensionError(ER_XY_SIZE_MISMATCH); + + if XTrain.Rows = 0 then + ArgumentError(ER_EMPTY_DATASET); + + if useValidation then + begin + if XVal = nil then + ArgumentNullError(ER_X_NULL); + + if yVal = nil then + ArgumentNullError(ER_Y_NULL); + + if XVal.Rows <> yVal.Length then + DimensionError(ER_XY_SIZE_MISMATCH); + + if XVal.Cols <> XTrain.Cols then + DimensionError(ER_FEATURE_COUNT_MISMATCH); + end; + + // --- reset state + fEstimators.Clear; + fTrainLossHistory.Clear; + fValLossHistory.Clear; + + fFeatureCount := XTrain.Cols; + fBestIteration := -1; + fBestValLoss := real.PositiveInfinity; + fFitted := false; + + // --- mapping + BuildClassMapping(yTrain); + var yEncoded := EncodeLabels(yTrain); + + var nTrain := XTrain.Rows; + var classCount := fClassCount; + + // --- compute class priors + fInitLogits := new real[classCount]; + + var counts := new integer[classCount]; + + for var i := 0 to nTrain - 1 do + counts[yEncoded[i]] += 1; + + for var cls := 0 to classCount - 1 do + begin + var pi := counts[cls] / nTrain; + + if pi <= 0 then + fInitLogits[cls] := -20.0 // защита от log(0) + else + fInitLogits[cls] := Ln(pi); + end; + + // --- init logits + var logitsTrain := new Matrix(nTrain, classCount); + + for var i := 0 to nTrain - 1 do + for var cls := 0 to classCount - 1 do + logitsTrain[i, cls] := fInitLogits[cls]; + + for var i := 0 to nTrain - 1 do + for var cls := 0 to classCount - 1 do + logitsTrain[i, cls] := fInitLogits[cls]; + + var logitsVal: Matrix := nil; + var yValEncoded: array of integer; + + if useValidation then + begin + logitsVal := new Matrix(XVal.Rows, classCount); + yValEncoded := EncodeLabels(yVal); + + // --- инициализация log-prior + for var i := 0 to XVal.Rows - 1 do + for var cls := 0 to classCount - 1 do + logitsVal[i, cls] := fInitLogits[cls]; + end; + + // --- RNG + Randomize(fRandomSeed); + + var noImprove := 0; + + // --- boosting loop + for var iter := 0 to fNEstimators - 1 do + begin + // --- compute probabilities (train) + var probsTrain := new Matrix(nTrain, classCount); + SoftmaxMatrix(logitsTrain, probsTrain); + + // --- compute residuals + var residuals := new Matrix(nTrain, classCount); + + for var i := 0 to nTrain - 1 do + for var cls := 0 to classCount - 1 do + begin + var yik := 0.0; + if yEncoded[i] = cls then + yik := 1.0; + + residuals[i, cls] := yik - probsTrain[i, cls]; + end; + + // --- train trees + var trees := new DecisionTreeRegressor[classCount]; + + for var cls := 0 to classCount - 1 do + begin + var rvec := new Vector(nTrain); + for var i := 0 to nTrain - 1 do + rvec[i] := residuals[i, cls]; + + var tree := new DecisionTreeRegressor( + fMaxDepth, + fMinSamplesSplit, + fMinSamplesLeaf + ); + + tree.Fit(XTrain, rvec); + trees[cls] := tree; + + var deltaTrain := tree.Predict(XTrain); + + for var i := 0 to nTrain - 1 do + logitsTrain[i, cls] += fLearningRate * deltaTrain[i]; + + if useValidation then + begin + var deltaVal := tree.Predict(XVal); + for var i := 0 to XVal.Rows - 1 do + logitsVal[i, cls] += fLearningRate * deltaVal[i]; + end; + end; + + fEstimators.Add(trees); + + // --- compute loss + SoftmaxMatrix(logitsTrain, probsTrain); + var trainLoss := ComputeLogLoss(yEncoded, probsTrain); + fTrainLossHistory.Add(trainLoss); + + var scoreLoss := trainLoss; + + if useValidation then + begin + var probsVal := new Matrix(XVal.Rows, classCount); + SoftmaxMatrix(logitsVal, probsVal); + + var valLoss := ComputeLogLoss(yValEncoded, probsVal); + fValLossHistory.Add(valLoss); + + scoreLoss := valLoss; + end; + + // --- early stopping + if fEarlyStoppingPatience > 0 then + begin + if fBestValLoss - scoreLoss > MinImprovement then + begin + fBestValLoss := scoreLoss; + fBestIteration := iter; + noImprove := 0; + end + else + begin + noImprove += 1; + if noImprove >= fEarlyStoppingPatience then + break; + end; + end; + end; + + // --- cut trees after best iteration + if (fEarlyStoppingPatience > 0) and (fBestIteration >= 0) then + begin + var keep := fBestIteration + 1; + if fEstimators.Count > keep then + fEstimators.RemoveRange(keep, fEstimators.Count - keep); + end; + + fFitted := true; + Result := Self; +end; + +procedure GradientBoostingClassifier.BuildClassMapping(y: Vector); +begin + var classes := new HashSet; + + for var i := 0 to y.Length - 1 do + begin + var r := y[i]; + var ir := Round(r); + + if Abs(r - ir) > 1e-12 then + ArgumentError(ER_LABELS_NOT_INTEGER); + + classes.Add(ir); + end; + + fClasses := classes.ToArray; + &Array.Sort(fClasses); + + fClassCount := fClasses.Length; + + fClassIndex := new Dictionary; + for var cls := 0 to fClassCount - 1 do + fClassIndex[fClasses[cls]] := cls; +end; + +function GradientBoostingClassifier.EncodeLabels(y: Vector): array of integer; +begin + var n := y.Length; + Result := new integer[n]; + + for var i := 0 to n - 1 do + begin + var ir := Round(y[i]); + Result[i] := fClassIndex[ir]; + end; +end; + +procedure GradientBoostingClassifier.SoftmaxRow( + var logits: array of real; + var probs: array of real); +begin + var classCount := Length(logits); + + var maxLogit := logits[0]; + for var cls := 1 to classCount - 1 do + if logits[cls] > maxLogit then + maxLogit := logits[cls]; + + var sumExp := 0.0; + + for var cls := 0 to classCount - 1 do + begin + var e := Exp(logits[cls] - maxLogit); + probs[cls] := e; + sumExp += e; + end; + + for var cls := 0 to classCount - 1 do + probs[cls] /= sumExp; +end; + +procedure GradientBoostingClassifier.SoftmaxMatrix( + logits: Matrix; + probs: Matrix); +begin + var nSamples := logits.Rows; + var classCount := logits.Cols; + + for var i := 0 to nSamples - 1 do + begin + var rowLogits := new real[classCount]; + var rowProbs := new real[classCount]; + + for var cls := 0 to classCount - 1 do + rowLogits[cls] := logits[i, cls]; + + SoftmaxRow(rowLogits, rowProbs); + + for var cls := 0 to classCount - 1 do + probs[i, cls] := rowProbs[cls]; + end; +end; + +function GradientBoostingClassifier.ComputeLogLoss( + yEncoded: array of integer; + probs: Matrix): real; +begin + var n := Length(yEncoded); + var eps := 1e-15; + + var loss := 0.0; + + for var i := 0 to n - 1 do + begin + var cls := yEncoded[i]; + var p := probs[i, cls]; + + if p < eps then + p := eps; + + loss -= Ln(p); + end; + + Result := loss / n; +end; + +constructor GradientBoostingClassifier.Create( + nEstimators: integer; + learningRate: real; + maxDepth: integer; + minSamplesSplit: integer; + minSamplesLeaf: integer; + subsample: real; + randomSeed: integer; + earlyStoppingPatience: integer); +begin + if nEstimators <= 0 then + ArgumentError(ER_N_ESTIMATORS_INVALID); + + if learningRate <= 0 then + ArgumentError(ER_LEARNING_RATE_INVALID); + + if maxDepth <= 0 then + ArgumentError(ER_MAX_DEPTH_INVALID); + + if subsample <= 0 then + ArgumentError(ER_SUBSAMPLE_INVALID); + + fNEstimators := nEstimators; + fLearningRate := learningRate; + fMaxDepth := maxDepth; + fMinSamplesSplit := minSamplesSplit; + fMinSamplesLeaf := minSamplesLeaf; + fSubsample := subsample; + fRandomSeed := randomSeed; + fEarlyStoppingPatience := earlyStoppingPatience; + + fEstimators := new List; + fTrainLossHistory := new List; + fValLossHistory := new List; + + fFitted := false; + fFeatureCount := 0; + fClassCount := 0; + + fBestIteration := -1; + fBestValLoss := real.PositiveInfinity; +end; + + +function GradientBoostingClassifier.PredictProba(X: Matrix): Matrix; +begin + if not fFitted then + NotFittedError(ER_FIT_NOT_CALLED); + + var nSamples := X.Rows; + var classCount := fClassCount; + + var logits := new Matrix(nSamples, classCount); + + // --- накопление логитов от всех итераций + foreach var trees in fEstimators do + begin + for var cls := 0 to classCount - 1 do + begin + var delta := trees[cls].Predict(X); + + for var i := 0 to nSamples - 1 do + logits[i, cls] += fLearningRate * delta[i]; + end; + end; + + // --- softmax + var probs := new Matrix(nSamples, classCount); + + for var i := 0 to nSamples - 1 do + begin + var rowLogits := new real[classCount]; + var rowProbs := new real[classCount]; + + for var cls := 0 to classCount - 1 do + rowLogits[cls] := logits[i, cls]; + + SoftmaxRow(rowLogits, rowProbs); + + for var cls := 0 to classCount - 1 do + probs[i, cls] := rowProbs[cls]; + end; + + Result := probs; +end; + +function GradientBoostingClassifier.Clone: IModel; +begin + var model := new GradientBoostingClassifier( + fNEstimators, + fLearningRate, + fMaxDepth, + fMinSamplesSplit, + fMinSamplesLeaf, + fSubsample, + fRandomSeed, + fEarlyStoppingPatience + ); + + // --- fitted state + model.fFitted := fFitted; + model.fFeatureCount := fFeatureCount; + model.fClassCount := fClassCount; + + // --- classes + if fClasses <> nil then + begin + SetLength(model.fClasses, Length(fClasses)); + for var i := 0 to Length(fClasses) - 1 do + model.fClasses[i] := fClasses[i]; + end; + + if fClassIndex <> nil then + begin + model.fClassIndex := new Dictionary; + foreach var kv in fClassIndex do + model.fClassIndex.Add(kv.Key, kv.Value); + end; + + // --- estimators (deep copy) + foreach var trees in fEstimators do + begin + var newTrees := new DecisionTreeRegressor[Length(trees)]; + + for var cls := 0 to Length(trees) - 1 do + newTrees[cls] := trees[cls].Clone as DecisionTreeRegressor; + + model.fEstimators.Add(newTrees); + end; + + // --- history + foreach var v in fTrainLossHistory do + model.fTrainLossHistory.Add(v); + + foreach var v in fValLossHistory do + model.fValLossHistory.Add(v); + + model.fBestIteration := fBestIteration; + model.fBestValLoss := fBestValLoss; + + Result := model; +end; + +function GradientBoostingClassifier.Fit(X: Matrix; y: Vector): IModel; +begin + Result := FitInternal(X, y, nil, nil, false); +end; + +function GradientBoostingClassifier.FitWithValidation( + XTrain: Matrix; yTrain: Vector; + XVal: Matrix; yVal: Vector): IModel; +begin + Result := FitInternal(XTrain, yTrain, XVal, yVal, true); +end; + +function GradientBoostingClassifier.Predict(X: Matrix): Vector; +begin + if not fFitted then + NotFittedError(ER_FIT_NOT_CALLED); + + var probs := PredictProba(X); + + var nSamples := X.Rows; + var classCount := fClassCount; + + Result := new Vector(nSamples); + + for var i := 0 to nSamples - 1 do + begin + var bestClassIndex := 0; + var bestValue := probs[i, 0]; + + for var cls := 1 to classCount - 1 do + if probs[i, cls] > bestValue then + begin + bestValue := probs[i, cls]; + bestClassIndex := cls; + end; + + // возвращаем оригинальную метку + Result[i] := fClasses[bestClassIndex]; + end; +end; + + //----------------------------- // Pipeline