From e8e70ff33d4627c3cbeac0ae58ac7ae81a501b64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80=20?= =?UTF-8?q?=D0=9F=D0=BE=D0=B3=D0=BE=D1=80=D0=B5=D0=BB=D0=BE=D0=B2?= Date: Fri, 3 Jul 2020 06:45:23 +0300 Subject: [PATCH] =?UTF-8?q?a=20is=20[collection],=20a=20is=20(tuple)=20?= =?UTF-8?q?=D1=82=D0=B5=D0=BF=D0=B5=D1=80=D1=8C=20=D0=BD=D0=B5=D0=BB=D0=B5?= =?UTF-8?q?=D0=B3=D0=B0=D0=BB=D1=8C=D0=BD=D1=8B.=20=D0=9F=D0=BE=D1=87?= =?UTF-8?q?=D0=B8=D0=BD=D0=B8=D0=BB=20=D0=B2=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD?= =?UTF-8?q?=D0=BD=D1=8B=D0=B9=20=D0=BC=D0=B0=D1=82=D1=87=D0=B8=D0=BD=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PascalABCParserNewSaushkin/ABCPascal.cs | 6 +- .../PascalABCParserNewSaushkin/ABCPascal.y | 3 +- .../ABCPascalYacc.cs | 4356 ++++++++--------- .../PatternsDesugaringVisitor.cs | 11 +- 4 files changed, 2184 insertions(+), 2192 deletions(-) diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index 69daf597b..c66116756 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs @@ -1,9 +1,9 @@ // // This CSharp output file generated by Gardens Point LEX // Version: 1.1.3.301 -// Machine: DESKTOP-G8V08V4 -// DateTime: 21.06.2020 18:37:06 -// UserName: ????????? +// Machine: DESKTOP-P4NLNB1 +// DateTime: 6/25/2020 11:59:19 AM +// UserName: fatco // GPLEX input file // GPLEX frame file // diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y index 4d921c61b..a41395440 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y @@ -3365,7 +3365,7 @@ relop_expr var deconstructorPattern = new deconstructor_pattern($3 as List, isTypeCheck.type_def, null, @$); $$ = new is_pattern_expr(isTypeCheck.expr, deconstructorPattern, @$); } - + /* | term tkIs collection_pattern { $$ = new is_pattern_expr($1, $3 as pattern_node, @$); @@ -3374,6 +3374,7 @@ relop_expr { $$ = new is_pattern_expr($1, $3 as pattern_node, @$); } + */ ; pattern diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index b4424b456..8677bbe6f 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -1,10 +1,10 @@ // (see accompanying GPPGcopyright.rtf) // GPPG version 1.3.6 -// Machine: DESKTOP-G8V08V4 -// DateTime: 21.06.2020 18:37:06 -// UserName: ????????? -// Input file +// Machine: DESKTOP-P4NLNB1 +// DateTime: 6/25/2020 11:59:20 AM +// UserName: fatco +// Input file // options: no-lines gplex @@ -59,7 +59,7 @@ public abstract class ScanBase : AbstractScanner { - // Verbatim content from D:\PABC_Git\Parsers\PascalABCParserNewSaushkin\ABCPascal.y + // Verbatim content from ABCPascal.y // ��� ���������� ����������� � ����� GPPGParser, �������������� ����� ������, ������������ �������� gppg public syntax_tree_node root; // �������� ���� ��������������� ������ @@ -71,13 +71,13 @@ public partial class GPPGParser: ShiftReduceParser scanner) : base(scanner) { } - // End verbatim content from D:\PABC_Git\Parsers\PascalABCParserNewSaushkin\ABCPascal.y + // End verbatim content from ABCPascal.y #pragma warning disable 649 private static Dictionary aliasses; #pragma warning restore 649 - private static Rule[] rules = new Rule[974]; - private static State[] states = new State[1603]; + private static Rule[] rules = new Rule[972]; + private static State[] states = new State[1599]; 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", @@ -167,13 +167,13 @@ public partial class GPPGParser: ShiftReduceParser term, tkIs, collection_pattern -{ - CurrentSemanticValue.ex = new is_pattern_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); - } - break; - case 622: // relop_expr -> term, tkIs, tuple_pattern -{ - CurrentSemanticValue.ex = new is_pattern_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); - } - break; - case 623: // pattern -> simple_or_template_type_reference, tkRoundOpen, + case 621: // 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 624: // pattern_optional_var -> simple_or_template_type_reference, tkRoundOpen, + case 622: // 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 625: // deconstruction_or_const_pattern -> simple_or_template_type_reference, + case 623: // deconstruction_or_const_pattern -> simple_or_template_type_reference, // tkRoundOpen, // pattern_out_param_list_optional_var, // tkRoundClose @@ -5774,18 +5758,18 @@ public partial class GPPGParser: ShiftReduceParser, ValueStack[ValueStack.Depth-4].td, null, CurrentLocationSpan); } break; - case 626: // deconstruction_or_const_pattern -> const_pattern_expr_list + case 624: // deconstruction_or_const_pattern -> const_pattern_expr_list { CurrentSemanticValue.stn = new const_pattern(ValueStack[ValueStack.Depth-1].ob as List, CurrentLocationSpan); } break; - case 627: // const_pattern_expr_list -> const_pattern_expression + case 625: // const_pattern_expr_list -> const_pattern_expression { CurrentSemanticValue.ob = new List(); (CurrentSemanticValue.ob as List).Add(ValueStack[ValueStack.Depth-1].stn); } break; - case 628: // const_pattern_expr_list -> const_pattern_expr_list, tkComma, + case 626: // const_pattern_expr_list -> const_pattern_expr_list, tkComma, // const_pattern_expression { var list = ValueStack[ValueStack.Depth-3].ob as List; @@ -5793,36 +5777,36 @@ public partial class GPPGParser: ShiftReduceParser literal_or_number + case 627: // const_pattern_expression -> literal_or_number { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].ex; } break; - case 630: // const_pattern_expression -> simple_or_template_type_reference + case 628: // const_pattern_expression -> simple_or_template_type_reference { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].td; } break; - case 631: // const_pattern_expression -> tkNil + case 629: // const_pattern_expression -> tkNil { CurrentSemanticValue.stn = new nil_const(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 632: // const_pattern_expression -> sizeof_expr + case 630: // const_pattern_expression -> sizeof_expr { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].ex; } break; - case 633: // const_pattern_expression -> typeof_expr + case 631: // const_pattern_expression -> typeof_expr { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].ex; } break; - case 634: // collection_pattern -> tkSquareOpen, collection_pattern_expr_list, tkSquareClose + case 632: // collection_pattern -> tkSquareOpen, collection_pattern_expr_list, tkSquareClose { CurrentSemanticValue.stn = new collection_pattern(ValueStack[ValueStack.Depth-2].ob as List, CurrentLocationSpan); } break; - case 635: // collection_pattern_expr_list -> collection_pattern_list_item + case 633: // 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 636: // collection_pattern_expr_list -> collection_pattern_expr_list, tkComma, + case 634: // collection_pattern_expr_list -> collection_pattern_expr_list, tkComma, // collection_pattern_list_item { var list = ValueStack[ValueStack.Depth-3].ob as List; @@ -5830,108 +5814,108 @@ public partial class GPPGParser: ShiftReduceParser literal_or_number + case 635: // collection_pattern_list_item -> literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 638: // collection_pattern_list_item -> collection_pattern_var_item + case 636: // collection_pattern_list_item -> collection_pattern_var_item { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 639: // collection_pattern_list_item -> tkUnderscore + case 637: // collection_pattern_list_item -> tkUnderscore { CurrentSemanticValue.stn = new collection_pattern_wild_card(CurrentLocationSpan); } break; - case 640: // collection_pattern_list_item -> pattern_optional_var + case 638: // collection_pattern_list_item -> pattern_optional_var { CurrentSemanticValue.stn = new recursive_deconstructor_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 641: // collection_pattern_list_item -> collection_pattern + case 639: // collection_pattern_list_item -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 642: // collection_pattern_list_item -> tuple_pattern + case 640: // collection_pattern_list_item -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 643: // collection_pattern_list_item -> tkDotDot + case 641: // collection_pattern_list_item -> tkDotDot { CurrentSemanticValue.stn = new collection_pattern_gap_parameter(CurrentLocationSpan); } break; - case 644: // collection_pattern_var_item -> tkVar, identifier + case 642: // collection_pattern_var_item -> tkVar, identifier { CurrentSemanticValue.stn = new collection_pattern_var_parameter(ValueStack[ValueStack.Depth-1].id, null, CurrentLocationSpan); } break; - case 645: // tuple_pattern -> tkRoundOpen, tuple_pattern_item_list, tkRoundClose + case 643: // 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 646: // tuple_pattern_item -> tkUnderscore + case 644: // tuple_pattern_item -> tkUnderscore { CurrentSemanticValue.stn = new tuple_pattern_wild_card(CurrentLocationSpan); } break; - case 647: // tuple_pattern_item -> literal_or_number + case 645: // tuple_pattern_item -> literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 648: // tuple_pattern_item -> sign, literal_or_number + case 646: // 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 649: // tuple_pattern_item -> tkVar, identifier + case 647: // tuple_pattern_item -> tkVar, identifier { CurrentSemanticValue.stn = new tuple_pattern_var_parameter(ValueStack[ValueStack.Depth-1].id, null, CurrentLocationSpan); } break; - case 650: // tuple_pattern_item -> pattern_optional_var + case 648: // tuple_pattern_item -> pattern_optional_var { CurrentSemanticValue.stn = new recursive_deconstructor_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 651: // tuple_pattern_item -> collection_pattern + case 649: // tuple_pattern_item -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 652: // tuple_pattern_item -> tuple_pattern + case 650: // tuple_pattern_item -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 653: // tuple_pattern_item_list -> tuple_pattern_item + case 651: // 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 654: // tuple_pattern_item_list -> tuple_pattern_item_list, tkComma, tuple_pattern_item + case 652: // 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 655: // pattern_out_param_list_optional_var -> pattern_out_param_optional_var + case 653: // 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 656: // pattern_out_param_list_optional_var -> pattern_out_param_list_optional_var, + case 654: // pattern_out_param_list_optional_var -> pattern_out_param_list_optional_var, // tkSemiColon, // pattern_out_param_optional_var { @@ -5940,7 +5924,7 @@ public partial class GPPGParser: ShiftReduceParser pattern_out_param_list_optional_var, + case 655: // pattern_out_param_list_optional_var -> pattern_out_param_list_optional_var, // tkComma, // pattern_out_param_optional_var { @@ -5949,13 +5933,13 @@ public partial class GPPGParser: ShiftReduceParser pattern_out_param + case 656: // 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 659: // pattern_out_param_list -> pattern_out_param_list, tkSemiColon, + case 657: // pattern_out_param_list -> pattern_out_param_list, tkSemiColon, // pattern_out_param { var list = ValueStack[ValueStack.Depth-3].ob as List; @@ -5963,185 +5947,185 @@ public partial class GPPGParser: ShiftReduceParser pattern_out_param_list, tkComma, pattern_out_param + case 658: // 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 661: // pattern_out_param -> tkUnderscore + case 659: // pattern_out_param -> tkUnderscore { CurrentSemanticValue.stn = new wild_card_deconstructor_parameter(CurrentLocationSpan); } break; - case 662: // pattern_out_param -> literal_or_number + case 660: // pattern_out_param -> literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 663: // pattern_out_param -> tkVar, identifier, tkColon, type_ref + case 661: // 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 664: // pattern_out_param -> tkVar, identifier + case 662: // pattern_out_param -> tkVar, identifier { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-1].id, null, true, CurrentLocationSpan); } break; - case 665: // pattern_out_param -> pattern + case 663: // pattern_out_param -> pattern { CurrentSemanticValue.stn = new recursive_deconstructor_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 666: // pattern_out_param -> collection_pattern + case 664: // pattern_out_param -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 667: // pattern_out_param -> tuple_pattern + case 665: // pattern_out_param -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 668: // pattern_out_param_optional_var -> tkUnderscore + case 666: // pattern_out_param_optional_var -> tkUnderscore { CurrentSemanticValue.stn = new wild_card_deconstructor_parameter(CurrentLocationSpan); } break; - case 669: // pattern_out_param_optional_var -> literal_or_number + case 667: // pattern_out_param_optional_var -> literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 670: // pattern_out_param_optional_var -> sign, literal_or_number + case 668: // 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 671: // pattern_out_param_optional_var -> identifier, tkColon, type_ref + case 669: // 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 672: // pattern_out_param_optional_var -> identifier + case 670: // pattern_out_param_optional_var -> identifier { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-1].id, null, false, CurrentLocationSpan); } break; - case 673: // pattern_out_param_optional_var -> tkVar, identifier, tkColon, type_ref + case 671: // 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 674: // pattern_out_param_optional_var -> tkVar, identifier + case 672: // pattern_out_param_optional_var -> tkVar, identifier { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-1].id, null, true, CurrentLocationSpan); } break; - case 675: // pattern_out_param_optional_var -> pattern_optional_var + case 673: // 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 676: // pattern_out_param_optional_var -> collection_pattern + case 674: // pattern_out_param_optional_var -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 677: // pattern_out_param_optional_var -> tuple_pattern + case 675: // pattern_out_param_optional_var -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 678: // simple_expr_or_nothing -> simple_expr + case 676: // simple_expr_or_nothing -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 679: // simple_expr_or_nothing -> /* empty */ + case 677: // simple_expr_or_nothing -> /* empty */ { CurrentSemanticValue.ex = null; } break; - case 680: // const_expr_or_nothing -> const_expr + case 678: // const_expr_or_nothing -> const_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 681: // const_expr_or_nothing -> /* empty */ + case 679: // const_expr_or_nothing -> /* empty */ { CurrentSemanticValue.ex = null; } break; - case 682: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing + case 680: // 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 683: // format_expr -> tkColon, simple_expr_or_nothing + case 681: // format_expr -> tkColon, simple_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 684: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing, tkColon, + case 682: // 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 685: // format_expr -> tkColon, simple_expr_or_nothing, tkColon, simple_expr + case 683: // 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 686: // format_const_expr -> const_expr, tkColon, const_expr_or_nothing + case 684: // 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 687: // format_const_expr -> tkColon, const_expr_or_nothing + case 685: // format_const_expr -> tkColon, const_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 688: // format_const_expr -> const_expr, tkColon, const_expr_or_nothing, tkColon, + case 686: // 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 689: // format_const_expr -> tkColon, const_expr_or_nothing, tkColon, const_expr + case 687: // 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 690: // relop -> tkEqual + case 688: // relop -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 691: // relop -> tkNotEqual + case 689: // relop -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 692: // relop -> tkLower + case 690: // relop -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 693: // relop -> tkGreater + case 691: // relop -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 694: // relop -> tkLowerEqual + case 692: // relop -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 695: // relop -> tkGreaterEqual + case 693: // relop -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 696: // relop -> tkIn + case 694: // relop -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 697: // simple_expr -> term1 + case 695: // simple_expr -> term1 { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 698: // simple_expr -> simple_expr, tkDotDot, term1 + case 696: // simple_expr -> simple_expr, tkDotDot, term1 { if (parsertools.build_tree_for_formatter) CurrentSemanticValue.ex = new diapason_expr(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); @@ -6149,115 +6133,115 @@ public partial class GPPGParser: ShiftReduceParser term + case 697: // term1 -> term { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 700: // term1 -> term1, addop, term + case 698: // 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 701: // term1 -> term1, addop, new_question_expr + case 699: // 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 702: // addop -> tkPlus + case 700: // addop -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 703: // addop -> tkMinus + case 701: // addop -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 704: // addop -> tkOr + case 702: // addop -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 705: // addop -> tkXor + case 703: // addop -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 706: // addop -> tkCSharpStyleOr + case 704: // addop -> tkCSharpStyleOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 707: // typecast_op -> tkAs + case 705: // typecast_op -> tkAs { CurrentSemanticValue.ob = op_typecast.as_op; } break; - case 708: // typecast_op -> tkIs + case 706: // typecast_op -> tkIs { CurrentSemanticValue.ob = op_typecast.is_op; } break; - case 709: // as_is_expr -> is_type_expr + case 707: // as_is_expr -> is_type_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 710: // as_is_expr -> as_expr + case 708: // as_is_expr -> as_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 711: // as_expr -> term, tkAs, simple_or_template_type_reference + case 709: // 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 712: // is_type_expr -> term, tkIs, simple_or_template_type_reference + case 710: // 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 713: // simple_term -> factor + case 711: // simple_term -> factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 714: // power_expr -> simple_term, tkStarStar, factor + case 712: // power_expr -> simple_term, 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 715: // term -> factor + case 713: // term -> factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 716: // term -> new_expr + case 714: // term -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 717: // term -> power_expr + case 715: // term -> power_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 718: // term -> term, mulop, factor + case 716: // 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 719: // term -> term, mulop, power_expr + case 717: // 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 720: // term -> term, mulop, new_question_expr + case 718: // 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 721: // term -> as_is_expr + case 719: // term -> as_is_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 722: // mulop -> tkStar + case 720: // mulop -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 723: // mulop -> tkSlash + case 721: // mulop -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 724: // mulop -> tkDiv + case 722: // mulop -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 725: // mulop -> tkMod + case 723: // mulop -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 726: // mulop -> tkShl + case 724: // mulop -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 727: // mulop -> tkShr + case 725: // mulop -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 728: // mulop -> tkAnd + case 726: // mulop -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 729: // default_expr -> tkDefault, tkRoundOpen, simple_or_template_type_reference, + case 727: // default_expr -> tkDefault, tkRoundOpen, simple_or_template_type_reference, // tkRoundClose { CurrentSemanticValue.ex = new default_operator(ValueStack[ValueStack.Depth-2].td as named_type_reference, CurrentLocationSpan); } break; - case 730: // tuple -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, lambda_type_ref, + case 728: // tuple -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, lambda_type_ref, // optional_full_lambda_fp_list, tkRoundClose { /*if ($5 != null) @@ -6271,29 +6255,29 @@ public partial class GPPGParser: ShiftReduceParser tkNil + case 729: // factor -> tkNil { CurrentSemanticValue.ex = new nil_const(); CurrentSemanticValue.ex.source_context = CurrentLocationSpan; } break; - case 732: // factor -> literal_or_number + case 730: // factor -> literal_or_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 733: // factor -> default_expr + case 731: // factor -> default_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 734: // factor -> tkSquareOpen, elem_list, tkSquareClose + case 732: // factor -> tkSquareOpen, elem_list, tkSquareClose { CurrentSemanticValue.ex = new pascal_set_constant(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 735: // factor -> tkNot, factor + case 733: // factor -> tkNot, factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 736: // factor -> sign, factor + case 734: // factor -> sign, factor { if (ValueStack[ValueStack.Depth-2].op.type == Operators.Minus) { @@ -6320,96 +6304,96 @@ public partial class GPPGParser: ShiftReduceParser tkDeref, factor + case 735: // factor -> tkDeref, factor { CurrentSemanticValue.ex = new index(ValueStack[ValueStack.Depth-1].ex, true, CurrentLocationSpan); } break; - case 738: // factor -> var_reference + case 736: // factor -> var_reference { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 739: // factor -> tuple + case 737: // factor -> tuple { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 740: // literal_or_number -> literal + case 738: // literal_or_number -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 741: // literal_or_number -> unsigned_number + case 739: // literal_or_number -> unsigned_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 742: // var_question_point -> variable, tkQuestionPoint, variable + case 740: // 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 743: // var_question_point -> variable, tkQuestionPoint, var_question_point + case 741: // 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 744: // var_reference -> var_address, variable + case 742: // 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 745: // var_reference -> variable + case 743: // var_reference -> variable { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 746: // var_reference -> var_question_point + case 744: // var_reference -> var_question_point { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 747: // var_address -> tkAddressOf + case 745: // var_address -> tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(CurrentLocationSpan); } break; - case 748: // var_address -> var_address, tkAddressOf + case 746: // var_address -> var_address, tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(ValueStack[ValueStack.Depth-2].stn as get_address, CurrentLocationSpan); } break; - case 749: // attribute_variable -> simple_type_identifier, optional_expr_list_with_bracket + case 747: // 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 750: // attribute_variable -> template_type, optional_expr_list_with_bracket + case 748: // 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 751: // dotted_identifier -> identifier + case 749: // dotted_identifier -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 752: // dotted_identifier -> dotted_identifier, tkPoint, identifier_or_keyword + case 750: // dotted_identifier -> dotted_identifier, tkPoint, identifier_or_keyword { CurrentSemanticValue.ex = new dot_node(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan); } break; - case 753: // variable_as_type -> dotted_identifier + case 751: // variable_as_type -> dotted_identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;} break; - case 754: // variable_as_type -> dotted_identifier, template_type_params + case 752: // 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 755: // variable_or_literal_or_number -> variable + case 753: // variable_or_literal_or_number -> variable { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 756: // variable_or_literal_or_number -> literal_or_number + case 754: // variable_or_literal_or_number -> literal_or_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 757: // variable -> identifier + case 755: // variable -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 758: // variable -> operator_name_ident + case 756: // variable -> operator_name_ident { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 759: // variable -> tkInherited, identifier + case 757: // variable -> tkInherited, identifier { CurrentSemanticValue.ex = new inherited_ident(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 760: // variable -> tkRoundOpen, expr, tkRoundClose + case 758: // variable -> tkRoundOpen, expr, tkRoundClose { if (!parsertools.build_tree_for_formatter) { @@ -6419,18 +6403,18 @@ public partial class GPPGParser: ShiftReduceParser sizeof_expr + case 759: // variable -> sizeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 762: // variable -> typeof_expr + case 760: // variable -> typeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 763: // variable -> literal_or_number, tkPoint, identifier_or_keyword + case 761: // variable -> literal_or_number, tkPoint, identifier_or_keyword { CurrentSemanticValue.ex = new dot_node(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan); } break; - case 764: // variable -> variable_or_literal_or_number, tkSquareOpen, expr_list, + case 762: // variable -> variable_or_literal_or_number, tkSquareOpen, expr_list, // tkSquareClose { var el = ValueStack[ValueStack.Depth-2].stn as expression_list; // SSM 10/03/16 @@ -6449,7 +6433,7 @@ public partial class GPPGParser: ShiftReduceParser variable, tkQuestionSquareOpen, format_expr, tkSquareClose + case 763: // variable -> variable, tkQuestionSquareOpen, format_expr, tkSquareClose { var fe = ValueStack[ValueStack.Depth-2].ex as format_expr; // SSM 9/01/17 if (!parsertools.build_tree_for_formatter) @@ -6462,71 +6446,71 @@ public partial class GPPGParser: ShiftReduceParser variable, tkRoundOpen, optional_expr_list, tkRoundClose + case 764: // variable -> variable, tkRoundOpen, optional_expr_list, tkRoundClose { CurrentSemanticValue.ex = new method_call(ValueStack[ValueStack.Depth-4].ex as addressed_value,ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 767: // variable -> variable, tkPoint, identifier_keyword_operatorname + case 765: // variable -> variable, tkPoint, identifier_keyword_operatorname { CurrentSemanticValue.ex = new dot_node(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan); } break; - case 768: // variable -> tuple, tkPoint, identifier_keyword_operatorname + case 766: // 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 769: // variable -> variable, tkDeref + case 767: // variable -> variable, tkDeref { CurrentSemanticValue.ex = new roof_dereference(ValueStack[ValueStack.Depth-2].ex as addressed_value,CurrentLocationSpan); } break; - case 770: // variable -> variable, tkAmpersend, template_type_params + case 768: // 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 771: // optional_expr_list -> expr_list + case 769: // optional_expr_list -> expr_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 772: // optional_expr_list -> /* empty */ + case 770: // optional_expr_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 773: // elem_list -> elem_list1 + case 771: // elem_list -> elem_list1 { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 774: // elem_list -> /* empty */ + case 772: // elem_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 775: // elem_list1 -> elem + case 773: // elem_list1 -> elem { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 776: // elem_list1 -> elem_list1, tkComma, elem + case 774: // 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 777: // elem -> expr + case 775: // elem -> expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 778: // elem -> expr, tkDotDot, expr + case 776: // elem -> expr, tkDotDot, expr { CurrentSemanticValue.ex = new diapason_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 779: // one_literal -> tkStringLiteral + case 777: // one_literal -> tkStringLiteral { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 780: // one_literal -> tkAsciiChar + case 778: // one_literal -> tkAsciiChar { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 781: // literal -> literal_list + case 779: // literal -> literal_list { CurrentSemanticValue.ex = NewLiteral(ValueStack[ValueStack.Depth-1].stn as literal_const_line); } break; - case 782: // literal -> tkFormatStringLiteral + case 780: // literal -> tkFormatStringLiteral { if (parsertools.build_tree_for_formatter) { @@ -6538,12 +6522,12 @@ public partial class GPPGParser: ShiftReduceParser one_literal + case 781: // literal_list -> one_literal { CurrentSemanticValue.stn = new literal_const_line(ValueStack[ValueStack.Depth-1].ex as literal, CurrentLocationSpan); } break; - case 784: // literal_list -> literal_list, one_literal + case 782: // 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) @@ -6551,488 +6535,488 @@ public partial class GPPGParser: ShiftReduceParser tkOperator, overload_operator + case 783: // 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 786: // optional_method_modificators -> tkSemiColon + case 784: // optional_method_modificators -> tkSemiColon { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 787: // optional_method_modificators -> tkSemiColon, meth_modificators, tkSemiColon + case 785: // 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 788: // optional_method_modificators1 -> /* empty */ + case 786: // optional_method_modificators1 -> /* empty */ { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 789: // optional_method_modificators1 -> tkSemiColon, meth_modificators + case 787: // 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 790: // meth_modificators -> meth_modificator + case 788: // meth_modificators -> meth_modificator { CurrentSemanticValue.stn = new procedure_attributes_list(ValueStack[ValueStack.Depth-1].id as procedure_attribute, CurrentLocationSpan); } break; - case 791: // meth_modificators -> meth_modificators, tkSemiColon, meth_modificator + case 789: // 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 792: // identifier -> tkIdentifier + case 790: // identifier -> tkIdentifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 793: // identifier -> property_specifier_directives + case 791: // identifier -> property_specifier_directives { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 794: // identifier -> non_reserved + case 792: // identifier -> non_reserved { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 795: // identifier_or_keyword -> identifier + case 793: // identifier_or_keyword -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 796: // identifier_or_keyword -> keyword + case 794: // identifier_or_keyword -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 797: // identifier_or_keyword -> reserved_keyword + case 795: // identifier_or_keyword -> reserved_keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 798: // identifier_keyword_operatorname -> identifier + case 796: // identifier_keyword_operatorname -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 799: // identifier_keyword_operatorname -> keyword + case 797: // identifier_keyword_operatorname -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 800: // identifier_keyword_operatorname -> operator_name_ident + case 798: // identifier_keyword_operatorname -> operator_name_ident { CurrentSemanticValue.id = (ident)ValueStack[ValueStack.Depth-1].ex; } break; - case 801: // meth_modificator -> tkAbstract + case 799: // meth_modificator -> tkAbstract { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 802: // meth_modificator -> tkOverload + case 800: // 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 803: // meth_modificator -> tkReintroduce + case 801: // meth_modificator -> tkReintroduce { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 804: // meth_modificator -> tkOverride + case 802: // meth_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 805: // meth_modificator -> tkExtensionMethod + case 803: // meth_modificator -> tkExtensionMethod { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 806: // meth_modificator -> tkVirtual + case 804: // meth_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 807: // property_modificator -> tkVirtual + case 805: // property_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 808: // property_modificator -> tkOverride + case 806: // property_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 809: // property_modificator -> tkAbstract + case 807: // property_modificator -> tkAbstract { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 810: // property_modificator -> tkReintroduce + case 808: // property_modificator -> tkReintroduce { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 811: // property_specifier_directives -> tkRead + case 809: // property_specifier_directives -> tkRead { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 812: // property_specifier_directives -> tkWrite + case 810: // property_specifier_directives -> tkWrite { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 813: // non_reserved -> tkName + case 811: // non_reserved -> tkName { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 814: // non_reserved -> tkNew + case 812: // non_reserved -> tkNew { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 815: // visibility_specifier -> tkInternal + case 813: // visibility_specifier -> tkInternal { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 816: // visibility_specifier -> tkPublic + case 814: // visibility_specifier -> tkPublic { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 817: // visibility_specifier -> tkProtected + case 815: // visibility_specifier -> tkProtected { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 818: // visibility_specifier -> tkPrivate + case 816: // visibility_specifier -> tkPrivate { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 819: // keyword -> visibility_specifier + case 817: // keyword -> visibility_specifier { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 820: // keyword -> tkSealed + case 818: // keyword -> tkSealed { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 821: // keyword -> tkTemplate + case 819: // keyword -> tkTemplate { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 822: // keyword -> tkOr + case 820: // keyword -> tkOr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 823: // keyword -> tkTypeOf + case 821: // keyword -> tkTypeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 824: // keyword -> tkSizeOf + case 822: // keyword -> tkSizeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 825: // keyword -> tkDefault + case 823: // keyword -> tkDefault { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 826: // keyword -> tkWhere + case 824: // keyword -> tkWhere { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 827: // keyword -> tkXor + case 825: // keyword -> tkXor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 828: // keyword -> tkAnd + case 826: // keyword -> tkAnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 829: // keyword -> tkDiv + case 827: // keyword -> tkDiv { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 830: // keyword -> tkMod + case 828: // keyword -> tkMod { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 831: // keyword -> tkShl + case 829: // keyword -> tkShl { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 832: // keyword -> tkShr + case 830: // keyword -> tkShr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 833: // keyword -> tkNot + case 831: // keyword -> tkNot { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 834: // keyword -> tkAs + case 832: // keyword -> tkAs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 835: // keyword -> tkIn + case 833: // keyword -> tkIn { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 836: // keyword -> tkIs + case 834: // keyword -> tkIs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 837: // keyword -> tkArray + case 835: // keyword -> tkArray { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 838: // keyword -> tkSequence + case 836: // keyword -> tkSequence { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 839: // keyword -> tkBegin + case 837: // keyword -> tkBegin { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 840: // keyword -> tkCase + case 838: // keyword -> tkCase { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 841: // keyword -> tkClass + case 839: // keyword -> tkClass { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 842: // keyword -> tkConst + case 840: // keyword -> tkConst { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 843: // keyword -> tkConstructor + case 841: // keyword -> tkConstructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 844: // keyword -> tkDestructor + case 842: // keyword -> tkDestructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 845: // keyword -> tkDownto + case 843: // keyword -> tkDownto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 846: // keyword -> tkDo + case 844: // keyword -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 847: // keyword -> tkElse + case 845: // keyword -> tkElse { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 848: // keyword -> tkEnd + case 846: // keyword -> tkEnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 849: // keyword -> tkExcept + case 847: // keyword -> tkExcept { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 850: // keyword -> tkFile + case 848: // keyword -> tkFile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 851: // keyword -> tkAuto + case 849: // keyword -> tkAuto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 852: // keyword -> tkFinalization + case 850: // keyword -> tkFinalization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 853: // keyword -> tkFinally + case 851: // keyword -> tkFinally { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 854: // keyword -> tkFor + case 852: // keyword -> tkFor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 855: // keyword -> tkForeach + case 853: // keyword -> tkForeach { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 856: // keyword -> tkFunction + case 854: // keyword -> tkFunction { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 857: // keyword -> tkIf + case 855: // keyword -> tkIf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 858: // keyword -> tkImplementation + case 856: // keyword -> tkImplementation { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 859: // keyword -> tkInherited + case 857: // keyword -> tkInherited { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 860: // keyword -> tkInitialization + case 858: // keyword -> tkInitialization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 861: // keyword -> tkInterface + case 859: // keyword -> tkInterface { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 862: // keyword -> tkProcedure + case 860: // keyword -> tkProcedure { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 863: // keyword -> tkProperty + case 861: // keyword -> tkProperty { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 864: // keyword -> tkRaise + case 862: // keyword -> tkRaise { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 865: // keyword -> tkRecord + case 863: // keyword -> tkRecord { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 866: // keyword -> tkRepeat + case 864: // keyword -> tkRepeat { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 867: // keyword -> tkSet + case 865: // keyword -> tkSet { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 868: // keyword -> tkTry + case 866: // keyword -> tkTry { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 869: // keyword -> tkType + case 867: // keyword -> tkType { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 870: // keyword -> tkStatic + case 868: // keyword -> tkStatic { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 871: // keyword -> tkThen + case 869: // keyword -> tkThen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 872: // keyword -> tkTo + case 870: // keyword -> tkTo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 873: // keyword -> tkUntil + case 871: // keyword -> tkUntil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 874: // keyword -> tkUses + case 872: // keyword -> tkUses { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 875: // keyword -> tkVar + case 873: // keyword -> tkVar { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 876: // keyword -> tkWhile + case 874: // keyword -> tkWhile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 877: // keyword -> tkWith + case 875: // keyword -> tkWith { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 878: // keyword -> tkNil + case 876: // keyword -> tkNil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 879: // keyword -> tkGoto + case 877: // keyword -> tkGoto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 880: // keyword -> tkOf + case 878: // keyword -> tkOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 881: // keyword -> tkLabel + case 879: // keyword -> tkLabel { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 882: // keyword -> tkProgram + case 880: // keyword -> tkProgram { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 883: // keyword -> tkUnit + case 881: // keyword -> tkUnit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 884: // keyword -> tkLibrary + case 882: // keyword -> tkLibrary { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 885: // keyword -> tkNamespace + case 883: // keyword -> tkNamespace { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 886: // keyword -> tkExternal + case 884: // keyword -> tkExternal { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 887: // keyword -> tkParams + case 885: // keyword -> tkParams { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 888: // keyword -> tkEvent + case 886: // keyword -> tkEvent { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 889: // keyword -> tkYield + case 887: // keyword -> tkYield { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 890: // keyword -> tkMatch + case 888: // keyword -> tkMatch { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 891: // keyword -> tkWhen + case 889: // keyword -> tkWhen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 892: // keyword -> tkPartial + case 890: // keyword -> tkPartial { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 893: // keyword -> tkAbstract + case 891: // keyword -> tkAbstract { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 894: // keyword -> tkLock + case 892: // keyword -> tkLock { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 895: // keyword -> tkImplicit + case 893: // keyword -> tkImplicit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 896: // keyword -> tkExplicit + case 894: // keyword -> tkExplicit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 897: // keyword -> tkOn + case 895: // keyword -> tkOn { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 898: // keyword -> tkVirtual + case 896: // keyword -> tkVirtual { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 899: // keyword -> tkOverride + case 897: // keyword -> tkOverride { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 900: // keyword -> tkLoop + case 898: // keyword -> tkLoop { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 901: // keyword -> tkExtensionMethod + case 899: // keyword -> tkExtensionMethod { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 902: // keyword -> tkOverload + case 900: // keyword -> tkOverload { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 903: // keyword -> tkReintroduce + case 901: // keyword -> tkReintroduce { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 904: // keyword -> tkForward + case 902: // keyword -> tkForward { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 905: // reserved_keyword -> tkOperator + case 903: // reserved_keyword -> tkOperator { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 906: // overload_operator -> tkMinus + case 904: // overload_operator -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 907: // overload_operator -> tkPlus + case 905: // overload_operator -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 908: // overload_operator -> tkSlash + case 906: // overload_operator -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 909: // overload_operator -> tkStar + case 907: // overload_operator -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 910: // overload_operator -> tkEqual + case 908: // overload_operator -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 911: // overload_operator -> tkGreater + case 909: // overload_operator -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 912: // overload_operator -> tkGreaterEqual + case 910: // overload_operator -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 913: // overload_operator -> tkLower + case 911: // overload_operator -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 914: // overload_operator -> tkLowerEqual + case 912: // overload_operator -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 915: // overload_operator -> tkNotEqual + case 913: // overload_operator -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 916: // overload_operator -> tkOr + case 914: // overload_operator -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 917: // overload_operator -> tkXor + case 915: // overload_operator -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 918: // overload_operator -> tkAnd + case 916: // overload_operator -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 919: // overload_operator -> tkDiv + case 917: // overload_operator -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 920: // overload_operator -> tkMod + case 918: // overload_operator -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 921: // overload_operator -> tkShl + case 919: // overload_operator -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 922: // overload_operator -> tkShr + case 920: // overload_operator -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 923: // overload_operator -> tkNot + case 921: // overload_operator -> tkNot { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 924: // overload_operator -> tkIn + case 922: // overload_operator -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 925: // overload_operator -> tkImplicit + case 923: // overload_operator -> tkImplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 926: // overload_operator -> tkExplicit + case 924: // overload_operator -> tkExplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 927: // overload_operator -> assign_operator + case 925: // overload_operator -> assign_operator { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 928: // overload_operator -> tkStarStar + case 926: // overload_operator -> tkStarStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 929: // assign_operator -> tkAssign + case 927: // assign_operator -> tkAssign { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 930: // assign_operator -> tkPlusEqual + case 928: // assign_operator -> tkPlusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 931: // assign_operator -> tkMinusEqual + case 929: // assign_operator -> tkMinusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 932: // assign_operator -> tkMultEqual + case 930: // assign_operator -> tkMultEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 933: // assign_operator -> tkDivEqual + case 931: // assign_operator -> tkDivEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 934: // func_decl_lambda -> identifier, tkArrow, lambda_function_body + case 932: // func_decl_lambda -> identifier, tkArrow, lambda_function_body { var idList = new ident_list(ValueStack[ValueStack.Depth-3].id, LocationStack[LocationStack.Depth-3]); var formalPars = new formal_parameters(new typed_parameters(idList, new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), LocationStack[LocationStack.Depth-3]), parametr_kind.none, null, LocationStack[LocationStack.Depth-3]), LocationStack[LocationStack.Depth-3]); CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), formalPars, new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), LocationStack[LocationStack.Depth-3]), ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 935: // func_decl_lambda -> tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, + case 933: // func_decl_lambda -> tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, // tkArrow, lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 936: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkRoundClose, + case 934: // 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]); @@ -7041,7 +7025,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, + case 935: // func_decl_lambda -> tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, // tkRoundClose, lambda_type_ref_noproctype, tkArrow, // lambda_function_body { @@ -7052,7 +7036,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, + case 936: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, // full_lambda_fp_list, tkRoundClose, // lambda_type_ref_noproctype, tkArrow, lambda_function_body { @@ -7064,7 +7048,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, expr_l1, tkComma, expr_l1_list, + case 937: // func_decl_lambda -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, // lambda_type_ref, optional_full_lambda_fp_list, // tkRoundClose, rem_lambda { @@ -7126,61 +7110,61 @@ public partial class GPPGParser: ShiftReduceParser expl_func_decl_lambda + case 938: // func_decl_lambda -> expl_func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 941: // optional_full_lambda_fp_list -> /* empty */ + case 939: // optional_full_lambda_fp_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 942: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list + case 940: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 943: // rem_lambda -> lambda_type_ref_noproctype, tkArrow, lambda_function_body + case 941: // 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 944: // expl_func_decl_lambda -> tkFunction, lambda_type_ref, tkArrow, + case 942: // expl_func_decl_lambda -> tkFunction, lambda_type_ref, tkArrow, // lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, 1, CurrentLocationSpan); } break; - case 945: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, tkRoundClose, lambda_type_ref, + case 943: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, tkRoundClose, lambda_type_ref, // tkArrow, lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, 1, CurrentLocationSpan); } break; - case 946: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, + case 944: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, // tkRoundClose, lambda_type_ref, tkArrow, // lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), ValueStack[ValueStack.Depth-5].stn as formal_parameters, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, 1, CurrentLocationSpan); } break; - case 947: // expl_func_decl_lambda -> tkProcedure, tkArrow, lambda_procedure_body + case 945: // 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 948: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, tkRoundClose, tkArrow, + case 946: // 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 949: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, full_lambda_fp_list, + case 947: // 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 950: // full_lambda_fp_list -> lambda_simple_fp_sect + case 948: // 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) @@ -7200,97 +7184,97 @@ public partial class GPPGParser: ShiftReduceParser full_lambda_fp_list, tkSemiColon, lambda_simple_fp_sect + case 949: // 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 952: // lambda_simple_fp_sect -> ident_list, lambda_type_ref + case 950: // 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 953: // lambda_type_ref -> /* empty */ + case 951: // lambda_type_ref -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 954: // lambda_type_ref -> tkColon, fptype + case 952: // lambda_type_ref -> tkColon, fptype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 955: // lambda_type_ref_noproctype -> /* empty */ + case 953: // lambda_type_ref_noproctype -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 956: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype + case 954: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 957: // common_lambda_body -> compound_stmt + case 955: // common_lambda_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 958: // common_lambda_body -> if_stmt + case 956: // common_lambda_body -> if_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 959: // common_lambda_body -> while_stmt + case 957: // common_lambda_body -> while_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 960: // common_lambda_body -> repeat_stmt + case 958: // common_lambda_body -> repeat_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 961: // common_lambda_body -> for_stmt + case 959: // common_lambda_body -> for_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 962: // common_lambda_body -> foreach_stmt + case 960: // common_lambda_body -> foreach_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 963: // common_lambda_body -> loop_stmt + case 961: // common_lambda_body -> loop_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 964: // common_lambda_body -> case_stmt + case 962: // common_lambda_body -> case_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 965: // common_lambda_body -> try_stmt + case 963: // common_lambda_body -> try_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 966: // common_lambda_body -> lock_stmt + case 964: // common_lambda_body -> lock_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 967: // common_lambda_body -> raise_stmt + case 965: // common_lambda_body -> raise_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 968: // common_lambda_body -> yield_stmt + case 966: // common_lambda_body -> yield_stmt { parsertools.AddErrorFromResource("YIELD_STATEMENT_CANNOT_BE_USED_IN_LAMBDA_BODY", CurrentLocationSpan); } break; - case 969: // lambda_function_body -> expr_l1_for_lambda + case 967: // lambda_function_body -> expr_l1_for_lambda { var id = SyntaxVisitors.ExprHasNameVisitor.HasName(ValueStack[ValueStack.Depth-1].ex, "Result"); if (id != null) @@ -7302,22 +7286,22 @@ public partial class GPPGParser: ShiftReduceParser common_lambda_body + case 968: // lambda_function_body -> common_lambda_body { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 971: // lambda_procedure_body -> proc_call + case 969: // lambda_procedure_body -> proc_call { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 972: // lambda_procedure_body -> assignment + case 970: // lambda_procedure_body -> assignment { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 973: // lambda_procedure_body -> common_lambda_body + case 971: // lambda_procedure_body -> common_lambda_body { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } diff --git a/SyntaxVisitors/SugarVisitors/PatternsDesugaringVisitor.cs b/SyntaxVisitors/SugarVisitors/PatternsDesugaringVisitor.cs index 3c9310e80..cbc1cb65a 100644 --- a/SyntaxVisitors/SugarVisitors/PatternsDesugaringVisitor.cs +++ b/SyntaxVisitors/SugarVisitors/PatternsDesugaringVisitor.cs @@ -100,6 +100,7 @@ namespace SyntaxVisitors.SugarVisitors private int successVariableCounter = 0; private int labelVariableCounter = 0; private int deconstructParamVariableCounter = 0; + private int matchExprVariableCounter = 0; private if_node _previousIf; private statement desugaredMatchWith; @@ -116,11 +117,12 @@ namespace SyntaxVisitors.SugarVisitors desugaredMatchWith = null; _previousIf = null; + var matchExprVariableName = NewMatchExprVariableId(); matchedExprVarDeclaration = new var_statement( - new ident(GeneratedMatchExprVariableName, matchWith.expr.source_context), + new ident(matchExprVariableName, matchWith.expr.source_context), matchWith.expr.Clone() as expression, matchWith.expr.source_context); - ReplaceUsingParent(matchWith.expr, new ident(GeneratedMatchExprVariableName, matchWith.expr.source_context)); + ReplaceUsingParent(matchWith.expr, new ident(matchExprVariableName, matchWith.expr.source_context)); /*if (matchWith.Parent is statement_list stl) { @@ -1059,6 +1061,11 @@ namespace SyntaxVisitors.SugarVisitors { return GeneratedPatternNamePrefix + "DeconstructParam" + deconstructParamVariableCounter++.ToString(); } + + private string NewMatchExprVariableId() + { + return GeneratedMatchExprVariableName + "matchExprVariableCounter" + deconstructParamVariableCounter++.ToString(); + } } }