From da4406700f900beaae8efe7ff8ecbbd41329800e Mon Sep 17 00:00:00 2001 From: Mikhalkovich Stanislav Date: Mon, 13 Jan 2020 02:01:52 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=B3=D1=80=D0=B0=D0=BC=D0=BC=D0=B0=D1=82=D0=B8?= =?UTF-8?q?=D0=BA=D0=B8=20-=20=D0=B7=D0=B0=D0=BF=D1=80=D0=B5=D1=82=20?= =?UTF-8?q?=D1=83=D1=81=D0=BB=D0=BE=D0=B2=D0=BD=D0=BE=D0=B9=20=D0=BE=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B0=D1=86=D0=B8=D0=B8=20=D0=BA=D0=B0=D0=BA=20?= =?UTF-8?q?=D1=82=D0=B5=D0=BB=D0=B0=20=D0=BB=D1=8F=D0=BC=D0=B1=D0=B4=D1=8B?= =?UTF-8?q?=20(=D0=B2=D0=BE=20=D0=B8=D0=B7=D0=B1=D0=B5=D0=B6=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BA=D0=BE=D0=BD=D1=84=D0=BB=D0=B8=D0=BA=D1=82?= =?UTF-8?q?=D0=BE=D0=B2=20=D1=81=20=D1=83=D1=81=D0=BB=D0=BE=D0=B2=D0=BD?= =?UTF-8?q?=D1=8B=D0=BC=20=D0=BE=D0=BF=D0=B5=D1=80=D0=B0=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D0=BE=D0=BC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Configuration/GlobalAssemblyInfo.cs | 2 +- Configuration/Version.defs | 2 +- .../PascalABCParserNewSaushkin/ABCPascal.cs | 2 +- .../PascalABCParserNewSaushkin/ABCPascal.y | 43 +- .../ABCPascalYacc.cs | 5655 +++++++++-------- Parsers/PascalABCParserNewSaushkin/PABC.ymc | 4 + Release/pabcversion.txt | 2 +- ReleaseGenerators/PascalABCNET_version.nsh | 2 +- TestSuite/CompilationSamples/LambdaIf.pas | 4 +- TestSuite/CompilationSamples/LambdaProc2.pas | 4 +- TestSuite/CompilationSamples/PABCSystem.pas | 185 +- .../SyntaxTreeVisitorNodes/Foreach.cs | 7 +- 12 files changed, 3041 insertions(+), 2871 deletions(-) diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 1965f5cb9..9c7896b6d 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 = "5"; public const string Build = "1"; - public const string Revision = "2300"; + public const string Revision = "2310"; 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 f06efc51a..984a616bb 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %COREVERSION%=1 -%REVISION%=2300 +%REVISION%=2310 %MINOR%=5 %MAJOR%=3 diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index 3830b1ccd..328f73cdb 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-G8V08V4 -// DateTime: 12.01.2020 19:05:36 +// DateTime: 13.01.2020 1:44:39 // UserName: ????????? // GPLEX input file // GPLEX frame file diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y index cda14b5c9..f90aa48e7 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y @@ -82,8 +82,8 @@ %type typed_const_list1 typed_const_list optional_expr_list elem_list optional_expr_list_with_bracket expr_list const_elem_list1 /*const_func_expr_list*/ case_label_list const_elem_list optional_const_func_expr_list elem_list1 %type enumeration_id expr_l1_list %type enumeration_id_list -%type const_simple_expr term term1 simple_term typed_const typed_const_plus typed_var_init_expression expr expr_with_func_decl_lambda const_expr elem range_expr const_elem array_const factor relop_expr expr_dq expr_l1 expr_l1_func_decl_lambda simple_expr range_term range_factor -%type external_directive_ident init_const_expr case_label variable var_reference /*optional_write_expr*/ optional_read_expr simple_expr_or_nothing var_question_point +%type const_simple_expr term term1 simple_term typed_const typed_const_plus typed_var_init_expression expr expr_with_func_decl_lambda const_expr elem range_expr const_elem array_const factor relop_expr expr_dq expr_l1 expr_l1_func_decl_lambda expr_l1_for_lambda simple_expr range_term range_factor +%type external_directive_ident init_const_expr case_label variable var_reference /*optional_write_expr*/ optional_read_expr simple_expr_or_nothing var_question_point expr_l1_for_question_expr expr_l1_for_new_question_expr %type for_cycle_type %type format_expr format_const_expr const_expr_or_nothing %type foreach_stmt @@ -134,7 +134,7 @@ %type parameter_decl %type parameter_decl_list property_parameter_list %type const_set -%type question_expr question_constexpr +%type question_expr question_constexpr new_question_expr %type record_const const_field_list_1 const_field_list %type const_field %type repeat_stmt @@ -3124,14 +3124,39 @@ expr_l1 { $$ = $1; } | question_expr { $$ = $1; } + | new_question_expr + { $$ = $1; } ; +expr_l1_for_question_expr + : expr_dq + { $$ = $1; } + | question_expr + { $$ = $1; } + ; + +expr_l1_for_new_question_expr + : expr_dq + { $$ = $1; } + | new_question_expr + { $$ = $1; } + ; + expr_l1_func_decl_lambda : expr_l1 { $$ = $1; } | func_decl_lambda { $$ = $1; } ; + +expr_l1_for_lambda + : expr_dq + { $$ = $1; } + | question_expr + { $$ = $1; } + | func_decl_lambda + { $$ = $1; } + ; expr_dq : relop_expr @@ -3160,13 +3185,16 @@ typeof_expr ; question_expr - : expr_l1 tkQuestion expr_l1 tkColon expr_l1 + : expr_l1_for_question_expr tkQuestion expr_l1_for_question_expr tkColon expr_l1_for_question_expr { if ($3 is nil_const && $5 is nil_const) parsertools.AddErrorFromResource("TWO_NILS_IN_QUESTION_EXPR",@3); $$ = new question_colon_expression($1, $3, $5, @$); } - | tkIf expr_dq tkThen expr_l1 tkElse expr_l1 + ; + +new_question_expr + : tkIf expr_l1_for_new_question_expr tkThen expr_l1_for_new_question_expr tkElse expr_l1_for_new_question_expr { if (parsertools.build_tree_for_formatter) { @@ -3179,7 +3207,8 @@ question_expr $$ = new question_colon_expression($2, $4, $6, @$); } } - ; + ; + empty_template_type_reference : simple_type_identifier template_type_empty_params @@ -4684,7 +4713,7 @@ common_lambda_body lambda_function_body - : expr_l1_func_decl_lambda + : expr_l1_for_lambda { var id = SyntaxVisitors.ExprHasNameVisitor.HasName($1, "Result"); if (id != null) diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index 84a6420ab..f7e6de280 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -2,7 +2,7 @@ // GPPG version 1.3.6 // Machine: DESKTOP-G8V08V4 -// DateTime: 12.01.2020 19:05:36 +// DateTime: 13.01.2020 1:44:39 // UserName: ????????? // Input file @@ -76,8 +76,8 @@ public partial class GPPGParser: ShiftReduceParser aliasses; #pragma warning restore 649 - private static Rule[] rules = new Rule[946]; - private static State[] states = new State[1568]; + private static Rule[] rules = new Rule[954]; + private static State[] states = new State[1575]; 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", @@ -101,1696 +101,1703 @@ public partial class GPPGParser: ShiftReduceParser question_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 583: // expr_l1_func_decl_lambda -> expr_l1 + case 583: // expr_l1 -> new_question_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 584: // expr_l1_func_decl_lambda -> func_decl_lambda + case 584: // expr_l1_for_question_expr -> expr_dq { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 585: // expr_dq -> relop_expr + case 585: // expr_l1_for_question_expr -> question_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 586: // expr_dq -> expr_dq, tkDoubleQuestion, relop_expr + case 586: // expr_l1_for_new_question_expr -> expr_dq +{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } + break; + case 587: // expr_l1_for_new_question_expr -> new_question_expr +{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } + break; + case 588: // expr_l1_func_decl_lambda -> expr_l1 +{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } + break; + case 589: // expr_l1_func_decl_lambda -> func_decl_lambda +{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } + break; + case 590: // expr_l1_for_lambda -> expr_dq +{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } + break; + case 591: // expr_l1_for_lambda -> question_expr +{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } + break; + case 592: // expr_l1_for_lambda -> func_decl_lambda +{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } + break; + case 593: // expr_dq -> relop_expr +{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } + break; + case 594: // expr_dq -> expr_dq, tkDoubleQuestion, relop_expr { CurrentSemanticValue.ex = new double_question_node(ValueStack[ValueStack.Depth-3].ex as expression, ValueStack[ValueStack.Depth-1].ex as expression, CurrentLocationSpan);} break; - case 587: // sizeof_expr -> tkSizeOf, tkRoundOpen, simple_or_template_type_reference, + case 595: // sizeof_expr -> tkSizeOf, tkRoundOpen, simple_or_template_type_reference, // tkRoundClose { CurrentSemanticValue.ex = new sizeof_operator((named_type_reference)ValueStack[ValueStack.Depth-2].td, null, CurrentLocationSpan); } break; - case 588: // typeof_expr -> tkTypeOf, tkRoundOpen, simple_or_template_type_reference, + case 596: // typeof_expr -> tkTypeOf, tkRoundOpen, simple_or_template_type_reference, // tkRoundClose { CurrentSemanticValue.ex = new typeof_operator((named_type_reference)ValueStack[ValueStack.Depth-2].td, CurrentLocationSpan); } break; - case 589: // typeof_expr -> tkTypeOf, tkRoundOpen, empty_template_type_reference, + case 597: // typeof_expr -> tkTypeOf, tkRoundOpen, empty_template_type_reference, // tkRoundClose { CurrentSemanticValue.ex = new typeof_operator((named_type_reference)ValueStack[ValueStack.Depth-2].td, CurrentLocationSpan); } break; - case 590: // question_expr -> expr_l1, tkQuestion, expr_l1, tkColon, expr_l1 + case 598: // question_expr -> expr_l1_for_question_expr, tkQuestion, + // expr_l1_for_question_expr, tkColon, + // expr_l1_for_question_expr { if (ValueStack[ValueStack.Depth-3].ex is nil_const && ValueStack[ValueStack.Depth-1].ex is nil_const) parsertools.AddErrorFromResource("TWO_NILS_IN_QUESTION_EXPR",LocationStack[LocationStack.Depth-3]); CurrentSemanticValue.ex = new question_colon_expression(ValueStack[ValueStack.Depth-5].ex, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 591: // question_expr -> tkIf, expr_dq, tkThen, expr_l1, tkElse, expr_l1 + case 599: // new_question_expr -> tkIf, expr_l1_for_new_question_expr, tkThen, + // expr_l1_for_new_question_expr, tkElse, + // expr_l1_for_new_question_expr { if (parsertools.build_tree_for_formatter) { @@ -5505,47 +5548,47 @@ public partial class GPPGParser: ShiftReduceParser simple_type_identifier, + case 600: // empty_template_type_reference -> simple_type_identifier, // template_type_empty_params { CurrentSemanticValue.td = new template_type_reference((named_type_reference)ValueStack[ValueStack.Depth-2].td, (template_param_list)ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 593: // empty_template_type_reference -> simple_type_identifier, tkAmpersend, + case 601: // empty_template_type_reference -> simple_type_identifier, tkAmpersend, // template_type_empty_params { CurrentSemanticValue.td = new template_type_reference((named_type_reference)ValueStack[ValueStack.Depth-3].td, (template_param_list)ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 594: // simple_or_template_type_reference -> simple_type_identifier + case 602: // simple_or_template_type_reference -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 595: // simple_or_template_type_reference -> simple_type_identifier, + case 603: // simple_or_template_type_reference -> simple_type_identifier, // template_type_params { CurrentSemanticValue.td = new template_type_reference((named_type_reference)ValueStack[ValueStack.Depth-2].td, (template_param_list)ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 596: // simple_or_template_type_reference -> simple_type_identifier, tkAmpersend, + case 604: // simple_or_template_type_reference -> simple_type_identifier, tkAmpersend, // template_type_params { CurrentSemanticValue.td = new template_type_reference((named_type_reference)ValueStack[ValueStack.Depth-3].td, (template_param_list)ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 597: // optional_array_initializer -> tkRoundOpen, typed_const_list, tkRoundClose + case 605: // optional_array_initializer -> tkRoundOpen, typed_const_list, tkRoundClose { CurrentSemanticValue.stn = new array_const((expression_list)ValueStack[ValueStack.Depth-2].stn, CurrentLocationSpan); } break; - case 599: // new_expr -> tkNew, simple_or_template_type_reference, + case 607: // new_expr -> tkNew, simple_or_template_type_reference, // optional_expr_list_with_bracket { CurrentSemanticValue.ex = new new_expr(ValueStack[ValueStack.Depth-2].td, ValueStack[ValueStack.Depth-1].stn as expression_list, false, null, CurrentLocationSpan); } break; - case 600: // new_expr -> tkNew, simple_or_template_type_reference, tkSquareOpen, + case 608: // new_expr -> tkNew, simple_or_template_type_reference, tkSquareOpen, // optional_expr_list, tkSquareClose, optional_array_initializer { var el = ValueStack[ValueStack.Depth-3].stn as expression_list; @@ -5561,7 +5604,7 @@ public partial class GPPGParser: ShiftReduceParser tkNew, tkClass, tkRoundOpen, list_fields_in_unnamed_object, + case 609: // new_expr -> tkNew, tkClass, tkRoundOpen, list_fields_in_unnamed_object, // tkRoundClose { // sugared node @@ -5576,14 +5619,14 @@ public partial class GPPGParser: ShiftReduceParser identifier, tkAssign, relop_expr + case 610: // field_in_unnamed_object -> identifier, tkAssign, relop_expr { if (ValueStack[ValueStack.Depth-1].ex is nil_const) parsertools.AddErrorFromResource("NIL_IN_UNNAMED_OBJECT",CurrentLocationSpan); CurrentSemanticValue.ob = new name_assign_expr(ValueStack[ValueStack.Depth-3].id,ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); } break; - case 603: // field_in_unnamed_object -> relop_expr + case 611: // field_in_unnamed_object -> relop_expr { ident name = null; var id = ValueStack[ValueStack.Depth-1].ex as ident; @@ -5603,13 +5646,13 @@ public partial class GPPGParser: ShiftReduceParser field_in_unnamed_object + case 612: // list_fields_in_unnamed_object -> field_in_unnamed_object { var l = new name_assign_expr_list(); CurrentSemanticValue.ob = l.Add(ValueStack[ValueStack.Depth-1].ob as name_assign_expr); } break; - case 605: // list_fields_in_unnamed_object -> list_fields_in_unnamed_object, tkComma, + case 613: // list_fields_in_unnamed_object -> list_fields_in_unnamed_object, tkComma, // field_in_unnamed_object { var nel = ValueStack[ValueStack.Depth-3].ob as name_assign_expr_list; @@ -5620,51 +5663,51 @@ public partial class GPPGParser: ShiftReduceParser /* empty */ + case 614: // optional_expr_list_with_bracket -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 607: // optional_expr_list_with_bracket -> tkRoundOpen, optional_expr_list, + case 615: // optional_expr_list_with_bracket -> tkRoundOpen, optional_expr_list, // tkRoundClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 608: // relop_expr -> simple_expr + case 616: // relop_expr -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 609: // relop_expr -> relop_expr, relop, simple_expr + case 617: // relop_expr -> relop_expr, relop, simple_expr { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 610: // relop_expr -> is_type_expr, tkRoundOpen, pattern_out_param_list, tkRoundClose + case 618: // 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 611: // relop_expr -> term, tkIs, collection_pattern + case 619: // relop_expr -> 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 612: // relop_expr -> term, tkIs, tuple_pattern + case 620: // 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 613: // 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 614: // 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 615: // 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 @@ -5672,18 +5715,18 @@ public partial class GPPGParser: ShiftReduceParser, ValueStack[ValueStack.Depth-4].td, null, CurrentLocationSpan); } break; - case 616: // 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 617: // 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 618: // 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; @@ -5691,36 +5734,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 620: // 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 621: // const_pattern_expression -> tkNil + case 629: // const_pattern_expression -> tkNil { CurrentSemanticValue.stn = new nil_const(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 622: // const_pattern_expression -> sizeof_expr + case 630: // const_pattern_expression -> sizeof_expr { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].ex; } break; - case 623: // const_pattern_expression -> typeof_expr + case 631: // const_pattern_expression -> typeof_expr { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].ex; } break; - case 624: // 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 625: // 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 626: // 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; @@ -5728,103 +5771,103 @@ 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 628: // 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 629: // collection_pattern_list_item -> tkUnderscore + case 637: // collection_pattern_list_item -> tkUnderscore { CurrentSemanticValue.stn = new collection_pattern_wild_card(CurrentLocationSpan); } break; - case 630: // 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 631: // 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 632: // 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 633: // collection_pattern_list_item -> tkDotDot + case 641: // collection_pattern_list_item -> tkDotDot { CurrentSemanticValue.stn = new collection_pattern_gap_parameter(CurrentLocationSpan); } break; - case 634: // 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 635: // 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 636: // tuple_pattern_item -> tkUnderscore + case 644: // tuple_pattern_item -> tkUnderscore { CurrentSemanticValue.stn = new tuple_pattern_wild_card(CurrentLocationSpan); } break; - case 637: // 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 638: // tuple_pattern_item -> tkVar, identifier + case 646: // tuple_pattern_item -> tkVar, identifier { CurrentSemanticValue.stn = new tuple_pattern_var_parameter(ValueStack[ValueStack.Depth-1].id, null, CurrentLocationSpan); } break; - case 639: // tuple_pattern_item -> pattern_optional_var + case 647: // tuple_pattern_item -> pattern_optional_var { CurrentSemanticValue.stn = new recursive_deconstructor_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 640: // tuple_pattern_item -> collection_pattern + case 648: // tuple_pattern_item -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 641: // tuple_pattern_item -> tuple_pattern + case 649: // tuple_pattern_item -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 642: // tuple_pattern_item_list -> tuple_pattern_item + case 650: // 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 643: // tuple_pattern_item_list -> tuple_pattern_item_list, tkComma, tuple_pattern_item + case 651: // 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 644: // pattern_out_param_list_optional_var -> pattern_out_param_optional_var + case 652: // 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 645: // pattern_out_param_list_optional_var -> pattern_out_param_list_optional_var, + case 653: // pattern_out_param_list_optional_var -> pattern_out_param_list_optional_var, // tkSemiColon, // pattern_out_param_optional_var { @@ -5833,7 +5876,7 @@ public partial class GPPGParser: ShiftReduceParser pattern_out_param_list_optional_var, + case 654: // pattern_out_param_list_optional_var -> pattern_out_param_list_optional_var, // tkComma, // pattern_out_param_optional_var { @@ -5842,13 +5885,13 @@ public partial class GPPGParser: ShiftReduceParser pattern_out_param + case 655: // 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 648: // pattern_out_param_list -> pattern_out_param_list, tkSemiColon, + case 656: // pattern_out_param_list -> pattern_out_param_list, tkSemiColon, // pattern_out_param { var list = ValueStack[ValueStack.Depth-3].ob as List; @@ -5856,180 +5899,180 @@ public partial class GPPGParser: ShiftReduceParser pattern_out_param_list, tkComma, pattern_out_param + case 657: // 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 650: // pattern_out_param -> tkUnderscore + case 658: // pattern_out_param -> tkUnderscore { CurrentSemanticValue.stn = new wild_card_deconstructor_parameter(CurrentLocationSpan); } break; - case 651: // pattern_out_param -> literal_or_number + case 659: // pattern_out_param -> literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 652: // pattern_out_param -> tkVar, identifier, tkColon, type_ref + case 660: // 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 653: // pattern_out_param -> tkVar, identifier + case 661: // pattern_out_param -> tkVar, identifier { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-1].id, null, true, CurrentLocationSpan); } break; - case 654: // pattern_out_param -> pattern + case 662: // pattern_out_param -> pattern { CurrentSemanticValue.stn = new recursive_deconstructor_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 655: // pattern_out_param -> collection_pattern + case 663: // pattern_out_param -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 656: // pattern_out_param -> tuple_pattern + case 664: // pattern_out_param -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 657: // pattern_out_param_optional_var -> tkUnderscore + case 665: // pattern_out_param_optional_var -> tkUnderscore { CurrentSemanticValue.stn = new wild_card_deconstructor_parameter(CurrentLocationSpan); } break; - case 658: // pattern_out_param_optional_var -> literal_or_number + case 666: // pattern_out_param_optional_var -> literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 659: // pattern_out_param_optional_var -> identifier, tkColon, type_ref + case 667: // 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 660: // pattern_out_param_optional_var -> identifier + case 668: // pattern_out_param_optional_var -> identifier { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-1].id, null, false, CurrentLocationSpan); } break; - case 661: // pattern_out_param_optional_var -> tkVar, identifier, tkColon, type_ref + case 669: // 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 662: // pattern_out_param_optional_var -> tkVar, identifier + case 670: // pattern_out_param_optional_var -> tkVar, identifier { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-1].id, null, true, CurrentLocationSpan); } break; - case 663: // pattern_out_param_optional_var -> pattern_optional_var + case 671: // 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 664: // pattern_out_param_optional_var -> collection_pattern + case 672: // pattern_out_param_optional_var -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 665: // pattern_out_param_optional_var -> tuple_pattern + case 673: // pattern_out_param_optional_var -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 666: // simple_expr_or_nothing -> simple_expr + case 674: // simple_expr_or_nothing -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 667: // simple_expr_or_nothing -> /* empty */ + case 675: // simple_expr_or_nothing -> /* empty */ { CurrentSemanticValue.ex = null; } break; - case 668: // const_expr_or_nothing -> const_expr + case 676: // const_expr_or_nothing -> const_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 669: // const_expr_or_nothing -> /* empty */ + case 677: // const_expr_or_nothing -> /* empty */ { CurrentSemanticValue.ex = null; } break; - case 670: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing + case 678: // 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 671: // format_expr -> tkColon, simple_expr_or_nothing + case 679: // format_expr -> tkColon, simple_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 672: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing, tkColon, + case 680: // 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 673: // format_expr -> tkColon, simple_expr_or_nothing, tkColon, simple_expr + case 681: // 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 674: // format_const_expr -> const_expr, tkColon, const_expr_or_nothing + case 682: // 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 675: // format_const_expr -> tkColon, const_expr_or_nothing + case 683: // format_const_expr -> tkColon, const_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 676: // format_const_expr -> const_expr, tkColon, const_expr_or_nothing, tkColon, + case 684: // 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 677: // format_const_expr -> tkColon, const_expr_or_nothing, tkColon, const_expr + case 685: // 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 678: // relop -> tkEqual + case 686: // relop -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 679: // relop -> tkNotEqual + case 687: // relop -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 680: // relop -> tkLower + case 688: // relop -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 681: // relop -> tkGreater + case 689: // relop -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 682: // relop -> tkLowerEqual + case 690: // relop -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 683: // relop -> tkGreaterEqual + case 691: // relop -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 684: // relop -> tkIn + case 692: // relop -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 685: // simple_expr -> term1 + case 693: // simple_expr -> term1 { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 686: // simple_expr -> simple_expr, tkDotDot, term1 + case 694: // 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); @@ -6037,107 +6080,107 @@ public partial class GPPGParser: ShiftReduceParser term + case 695: // term1 -> term { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 688: // term1 -> term1, addop, term + case 696: // 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 689: // addop -> tkPlus + case 697: // addop -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 690: // addop -> tkMinus + case 698: // addop -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 691: // addop -> tkOr + case 699: // addop -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 692: // addop -> tkXor + case 700: // addop -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 693: // addop -> tkCSharpStyleOr + case 701: // addop -> tkCSharpStyleOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 694: // typecast_op -> tkAs + case 702: // typecast_op -> tkAs { CurrentSemanticValue.ob = op_typecast.as_op; } break; - case 695: // typecast_op -> tkIs + case 703: // typecast_op -> tkIs { CurrentSemanticValue.ob = op_typecast.is_op; } break; - case 696: // as_is_expr -> is_type_expr + case 704: // as_is_expr -> is_type_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 697: // as_is_expr -> as_expr + case 705: // as_is_expr -> as_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 698: // as_expr -> term, tkAs, simple_or_template_type_reference + case 706: // 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 699: // is_type_expr -> term, tkIs, simple_or_template_type_reference + case 707: // 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 700: // simple_term -> factor + case 708: // simple_term -> factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 701: // power_expr -> simple_term, tkStarStar, factor + case 709: // 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 702: // term -> factor + case 710: // term -> factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 703: // term -> new_expr + case 711: // term -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 704: // term -> power_expr + case 712: // term -> power_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 705: // term -> term, mulop, factor + case 713: // 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 706: // term -> term, mulop, power_expr + case 714: // 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 707: // term -> as_is_expr + case 715: // term -> as_is_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 708: // mulop -> tkStar + case 716: // mulop -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 709: // mulop -> tkSlash + case 717: // mulop -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 710: // mulop -> tkDiv + case 718: // mulop -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 711: // mulop -> tkMod + case 719: // mulop -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 712: // mulop -> tkShl + case 720: // mulop -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 713: // mulop -> tkShr + case 721: // mulop -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 714: // mulop -> tkAnd + case 722: // mulop -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 715: // default_expr -> tkDefault, tkRoundOpen, simple_or_template_type_reference, + case 723: // 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 716: // tuple -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, lambda_type_ref, + case 724: // tuple -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, lambda_type_ref, // optional_full_lambda_fp_list, tkRoundClose { /*if ($5 != null) @@ -6151,29 +6194,29 @@ public partial class GPPGParser: ShiftReduceParser tkNil + case 725: // factor -> tkNil { CurrentSemanticValue.ex = new nil_const(); CurrentSemanticValue.ex.source_context = CurrentLocationSpan; } break; - case 718: // factor -> literal_or_number + case 726: // factor -> literal_or_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 719: // factor -> default_expr + case 727: // factor -> default_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 720: // factor -> tkSquareOpen, elem_list, tkSquareClose + case 728: // factor -> tkSquareOpen, elem_list, tkSquareClose { CurrentSemanticValue.ex = new pascal_set_constant(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 721: // factor -> tkNot, factor + case 729: // factor -> tkNot, factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 722: // factor -> sign, factor + case 730: // factor -> sign, factor { if (ValueStack[ValueStack.Depth-2].op.type == Operators.Minus) { @@ -6200,91 +6243,91 @@ public partial class GPPGParser: ShiftReduceParser var_reference + case 731: // factor -> var_reference { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 724: // factor -> tuple + case 732: // factor -> tuple { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 725: // literal_or_number -> literal + case 733: // literal_or_number -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 726: // literal_or_number -> unsigned_number + case 734: // literal_or_number -> unsigned_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 727: // var_question_point -> variable, tkQuestionPoint, variable + case 735: // 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 728: // var_question_point -> variable, tkQuestionPoint, var_question_point + case 736: // 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 729: // var_reference -> var_address, variable + case 737: // 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 730: // var_reference -> variable + case 738: // var_reference -> variable { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 731: // var_reference -> var_question_point + case 739: // var_reference -> var_question_point { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 732: // var_address -> tkAddressOf + case 740: // var_address -> tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(CurrentLocationSpan); } break; - case 733: // var_address -> var_address, tkAddressOf + case 741: // var_address -> var_address, tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(ValueStack[ValueStack.Depth-2].stn as get_address, CurrentLocationSpan); } break; - case 734: // attribute_variable -> simple_type_identifier, optional_expr_list_with_bracket + case 742: // 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 735: // attribute_variable -> template_type, optional_expr_list_with_bracket + case 743: // 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 736: // dotted_identifier -> identifier + case 744: // dotted_identifier -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 737: // dotted_identifier -> dotted_identifier, tkPoint, identifier_or_keyword + case 745: // 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 738: // variable_as_type -> dotted_identifier + case 746: // variable_as_type -> dotted_identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;} break; - case 739: // variable_as_type -> dotted_identifier, template_type_params + case 747: // 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 740: // variable_or_literal_or_number -> variable + case 748: // variable_or_literal_or_number -> variable { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 741: // variable_or_literal_or_number -> literal_or_number + case 749: // variable_or_literal_or_number -> literal_or_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 742: // variable -> identifier + case 750: // variable -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 743: // variable -> operator_name_ident + case 751: // variable -> operator_name_ident { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 744: // variable -> tkInherited, identifier + case 752: // variable -> tkInherited, identifier { CurrentSemanticValue.ex = new inherited_ident(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 745: // variable -> tkRoundOpen, expr, tkRoundClose + case 753: // variable -> tkRoundOpen, expr, tkRoundClose { if (!parsertools.build_tree_for_formatter) { @@ -6294,18 +6337,18 @@ public partial class GPPGParser: ShiftReduceParser sizeof_expr + case 754: // variable -> sizeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 747: // variable -> typeof_expr + case 755: // variable -> typeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 748: // variable -> literal_or_number, tkPoint, identifier_or_keyword + case 756: // 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 749: // variable -> variable_or_literal_or_number, tkSquareOpen, expr_list, + case 757: // variable -> variable_or_literal_or_number, tkSquareOpen, expr_list, // tkSquareClose { var el = ValueStack[ValueStack.Depth-2].stn as expression_list; // SSM 10/03/16 @@ -6324,7 +6367,7 @@ public partial class GPPGParser: ShiftReduceParser variable, tkQuestionSquareOpen, format_expr, tkSquareClose + case 758: // 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) @@ -6337,71 +6380,71 @@ public partial class GPPGParser: ShiftReduceParser variable, tkRoundOpen, optional_expr_list, tkRoundClose + case 759: // 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 752: // variable -> variable, tkPoint, identifier_keyword_operatorname + case 760: // 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 753: // variable -> tuple, tkPoint, identifier_keyword_operatorname + case 761: // 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 754: // variable -> variable, tkDeref + case 762: // variable -> variable, tkDeref { CurrentSemanticValue.ex = new roof_dereference(ValueStack[ValueStack.Depth-2].ex as addressed_value,CurrentLocationSpan); } break; - case 755: // variable -> variable, tkAmpersend, template_type_params + case 763: // 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 756: // optional_expr_list -> expr_list + case 764: // optional_expr_list -> expr_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 757: // optional_expr_list -> /* empty */ + case 765: // optional_expr_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 758: // elem_list -> elem_list1 + case 766: // elem_list -> elem_list1 { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 759: // elem_list -> /* empty */ + case 767: // elem_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 760: // elem_list1 -> elem + case 768: // elem_list1 -> elem { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 761: // elem_list1 -> elem_list1, tkComma, elem + case 769: // 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 762: // elem -> expr + case 770: // elem -> expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 763: // elem -> expr, tkDotDot, expr + case 771: // elem -> expr, tkDotDot, expr { CurrentSemanticValue.ex = new diapason_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 764: // one_literal -> tkStringLiteral + case 772: // one_literal -> tkStringLiteral { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 765: // one_literal -> tkAsciiChar + case 773: // one_literal -> tkAsciiChar { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 766: // literal -> literal_list + case 774: // literal -> literal_list { CurrentSemanticValue.ex = NewLiteral(ValueStack[ValueStack.Depth-1].stn as literal_const_line); } break; - case 767: // literal -> tkFormatStringLiteral + case 775: // literal -> tkFormatStringLiteral { if (parsertools.build_tree_for_formatter) { @@ -6413,12 +6456,12 @@ public partial class GPPGParser: ShiftReduceParser one_literal + case 776: // literal_list -> one_literal { CurrentSemanticValue.stn = new literal_const_line(ValueStack[ValueStack.Depth-1].ex as literal, CurrentLocationSpan); } break; - case 769: // literal_list -> literal_list, one_literal + case 777: // 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) @@ -6426,449 +6469,449 @@ public partial class GPPGParser: ShiftReduceParser tkOperator, overload_operator + case 778: // 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 771: // optional_method_modificators -> tkSemiColon + case 779: // optional_method_modificators -> tkSemiColon { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 772: // optional_method_modificators -> tkSemiColon, meth_modificators, tkSemiColon + case 780: // 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 773: // optional_method_modificators1 -> /* empty */ + case 781: // optional_method_modificators1 -> /* empty */ { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 774: // optional_method_modificators1 -> tkSemiColon, meth_modificators + case 782: // 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 775: // meth_modificators -> meth_modificator + case 783: // meth_modificators -> meth_modificator { CurrentSemanticValue.stn = new procedure_attributes_list(ValueStack[ValueStack.Depth-1].id as procedure_attribute, CurrentLocationSpan); } break; - case 776: // meth_modificators -> meth_modificators, tkSemiColon, meth_modificator + case 784: // 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 777: // identifier -> tkIdentifier + case 785: // identifier -> tkIdentifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 778: // identifier -> property_specifier_directives + case 786: // identifier -> property_specifier_directives { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 779: // identifier -> non_reserved + case 787: // identifier -> non_reserved { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 780: // identifier_or_keyword -> identifier + case 788: // identifier_or_keyword -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 781: // identifier_or_keyword -> keyword + case 789: // identifier_or_keyword -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 782: // identifier_or_keyword -> reserved_keyword + case 790: // identifier_or_keyword -> reserved_keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 783: // identifier_keyword_operatorname -> identifier + case 791: // identifier_keyword_operatorname -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 784: // identifier_keyword_operatorname -> keyword + case 792: // identifier_keyword_operatorname -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 785: // identifier_keyword_operatorname -> operator_name_ident + case 793: // identifier_keyword_operatorname -> operator_name_ident { CurrentSemanticValue.id = (ident)ValueStack[ValueStack.Depth-1].ex; } break; - case 786: // meth_modificator -> tkAbstract + case 794: // meth_modificator -> tkAbstract { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 787: // meth_modificator -> tkOverload + case 795: // 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 788: // meth_modificator -> tkReintroduce + case 796: // meth_modificator -> tkReintroduce { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 789: // meth_modificator -> tkOverride + case 797: // meth_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 790: // meth_modificator -> tkExtensionMethod + case 798: // meth_modificator -> tkExtensionMethod { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 791: // meth_modificator -> tkVirtual + case 799: // meth_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 792: // property_modificator -> tkVirtual + case 800: // property_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 793: // property_modificator -> tkOverride + case 801: // property_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 794: // property_modificator -> tkAbstract + case 802: // property_modificator -> tkAbstract { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 795: // property_modificator -> tkReintroduce + case 803: // property_modificator -> tkReintroduce { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 796: // property_specifier_directives -> tkRead + case 804: // property_specifier_directives -> tkRead { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 797: // property_specifier_directives -> tkWrite + case 805: // property_specifier_directives -> tkWrite { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 798: // non_reserved -> tkName + case 806: // non_reserved -> tkName { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 799: // non_reserved -> tkNew + case 807: // non_reserved -> tkNew { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 800: // visibility_specifier -> tkInternal + case 808: // visibility_specifier -> tkInternal { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 801: // visibility_specifier -> tkPublic + case 809: // visibility_specifier -> tkPublic { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 802: // visibility_specifier -> tkProtected + case 810: // visibility_specifier -> tkProtected { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 803: // visibility_specifier -> tkPrivate + case 811: // visibility_specifier -> tkPrivate { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 804: // keyword -> visibility_specifier + case 812: // keyword -> visibility_specifier { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 805: // keyword -> tkSealed + case 813: // keyword -> tkSealed { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 806: // keyword -> tkTemplate + case 814: // keyword -> tkTemplate { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 807: // keyword -> tkOr + case 815: // keyword -> tkOr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 808: // keyword -> tkTypeOf + case 816: // keyword -> tkTypeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 809: // keyword -> tkSizeOf + case 817: // keyword -> tkSizeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 810: // keyword -> tkDefault + case 818: // keyword -> tkDefault { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 811: // keyword -> tkWhere + case 819: // keyword -> tkWhere { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 812: // keyword -> tkXor + case 820: // keyword -> tkXor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 813: // keyword -> tkAnd + case 821: // keyword -> tkAnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 814: // keyword -> tkDiv + case 822: // keyword -> tkDiv { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 815: // keyword -> tkMod + case 823: // keyword -> tkMod { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 816: // keyword -> tkShl + case 824: // keyword -> tkShl { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 817: // keyword -> tkShr + case 825: // keyword -> tkShr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 818: // keyword -> tkNot + case 826: // keyword -> tkNot { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 819: // keyword -> tkAs + case 827: // keyword -> tkAs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 820: // keyword -> tkIn + case 828: // keyword -> tkIn { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 821: // keyword -> tkIs + case 829: // keyword -> tkIs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 822: // keyword -> tkArray + case 830: // keyword -> tkArray { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 823: // keyword -> tkSequence + case 831: // keyword -> tkSequence { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 824: // keyword -> tkBegin + case 832: // keyword -> tkBegin { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 825: // keyword -> tkCase + case 833: // keyword -> tkCase { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 826: // keyword -> tkClass + case 834: // keyword -> tkClass { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 827: // keyword -> tkConst + case 835: // keyword -> tkConst { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 828: // keyword -> tkConstructor + case 836: // keyword -> tkConstructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 829: // keyword -> tkDestructor + case 837: // keyword -> tkDestructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 830: // keyword -> tkDownto + case 838: // keyword -> tkDownto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 831: // keyword -> tkDo + case 839: // keyword -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 832: // keyword -> tkElse + case 840: // keyword -> tkElse { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 833: // keyword -> tkEnd + case 841: // keyword -> tkEnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 834: // keyword -> tkExcept + case 842: // keyword -> tkExcept { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 835: // keyword -> tkFile + case 843: // keyword -> tkFile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 836: // keyword -> tkAuto + case 844: // keyword -> tkAuto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 837: // keyword -> tkFinalization + case 845: // keyword -> tkFinalization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 838: // keyword -> tkFinally + case 846: // keyword -> tkFinally { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 839: // keyword -> tkFor + case 847: // keyword -> tkFor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 840: // keyword -> tkForeach + case 848: // keyword -> tkForeach { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 841: // keyword -> tkFunction + case 849: // keyword -> tkFunction { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 842: // keyword -> tkIf + case 850: // keyword -> tkIf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 843: // keyword -> tkImplementation + case 851: // keyword -> tkImplementation { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 844: // keyword -> tkInherited + case 852: // keyword -> tkInherited { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 845: // keyword -> tkInitialization + case 853: // keyword -> tkInitialization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 846: // keyword -> tkInterface + case 854: // keyword -> tkInterface { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 847: // keyword -> tkProcedure + case 855: // keyword -> tkProcedure { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 848: // keyword -> tkProperty + case 856: // keyword -> tkProperty { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 849: // keyword -> tkRaise + case 857: // keyword -> tkRaise { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 850: // keyword -> tkRecord + case 858: // keyword -> tkRecord { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 851: // keyword -> tkRepeat + case 859: // keyword -> tkRepeat { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 852: // keyword -> tkSet + case 860: // keyword -> tkSet { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 853: // keyword -> tkTry + case 861: // keyword -> tkTry { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 854: // keyword -> tkType + case 862: // keyword -> tkType { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 855: // keyword -> tkStatic + case 863: // keyword -> tkStatic { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 856: // keyword -> tkThen + case 864: // keyword -> tkThen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 857: // keyword -> tkTo + case 865: // keyword -> tkTo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 858: // keyword -> tkUntil + case 866: // keyword -> tkUntil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 859: // keyword -> tkUses + case 867: // keyword -> tkUses { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 860: // keyword -> tkVar + case 868: // keyword -> tkVar { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 861: // keyword -> tkWhile + case 869: // keyword -> tkWhile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 862: // keyword -> tkWith + case 870: // keyword -> tkWith { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 863: // keyword -> tkNil + case 871: // keyword -> tkNil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 864: // keyword -> tkGoto + case 872: // keyword -> tkGoto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 865: // keyword -> tkOf + case 873: // keyword -> tkOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 866: // keyword -> tkLabel + case 874: // keyword -> tkLabel { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 867: // keyword -> tkProgram + case 875: // keyword -> tkProgram { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 868: // keyword -> tkUnit + case 876: // keyword -> tkUnit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 869: // keyword -> tkLibrary + case 877: // keyword -> tkLibrary { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 870: // keyword -> tkNamespace + case 878: // keyword -> tkNamespace { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 871: // keyword -> tkExternal + case 879: // keyword -> tkExternal { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 872: // keyword -> tkParams + case 880: // keyword -> tkParams { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 873: // keyword -> tkEvent + case 881: // keyword -> tkEvent { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 874: // keyword -> tkYield + case 882: // keyword -> tkYield { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 875: // keyword -> tkMatch + case 883: // keyword -> tkMatch { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 876: // keyword -> tkWhen + case 884: // keyword -> tkWhen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 877: // reserved_keyword -> tkOperator + case 885: // reserved_keyword -> tkOperator { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 878: // overload_operator -> tkMinus + case 886: // overload_operator -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 879: // overload_operator -> tkPlus + case 887: // overload_operator -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 880: // overload_operator -> tkSlash + case 888: // overload_operator -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 881: // overload_operator -> tkStar + case 889: // overload_operator -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 882: // overload_operator -> tkEqual + case 890: // overload_operator -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 883: // overload_operator -> tkGreater + case 891: // overload_operator -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 884: // overload_operator -> tkGreaterEqual + case 892: // overload_operator -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 885: // overload_operator -> tkLower + case 893: // overload_operator -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 886: // overload_operator -> tkLowerEqual + case 894: // overload_operator -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 887: // overload_operator -> tkNotEqual + case 895: // overload_operator -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 888: // overload_operator -> tkOr + case 896: // overload_operator -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 889: // overload_operator -> tkXor + case 897: // overload_operator -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 890: // overload_operator -> tkAnd + case 898: // overload_operator -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 891: // overload_operator -> tkDiv + case 899: // overload_operator -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 892: // overload_operator -> tkMod + case 900: // overload_operator -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 893: // overload_operator -> tkShl + case 901: // overload_operator -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 894: // overload_operator -> tkShr + case 902: // overload_operator -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 895: // overload_operator -> tkNot + case 903: // overload_operator -> tkNot { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 896: // overload_operator -> tkIn + case 904: // overload_operator -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 897: // overload_operator -> tkImplicit + case 905: // overload_operator -> tkImplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 898: // overload_operator -> tkExplicit + case 906: // overload_operator -> tkExplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 899: // overload_operator -> assign_operator + case 907: // overload_operator -> assign_operator { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 900: // overload_operator -> tkStarStar + case 908: // overload_operator -> tkStarStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 901: // assign_operator -> tkAssign + case 909: // assign_operator -> tkAssign { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 902: // assign_operator -> tkPlusEqual + case 910: // assign_operator -> tkPlusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 903: // assign_operator -> tkMinusEqual + case 911: // assign_operator -> tkMinusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 904: // assign_operator -> tkMultEqual + case 912: // assign_operator -> tkMultEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 905: // assign_operator -> tkDivEqual + case 913: // assign_operator -> tkDivEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 906: // func_decl_lambda -> identifier, tkArrow, lambda_function_body + case 914: // 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 907: // func_decl_lambda -> tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, + case 915: // 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 908: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkRoundClose, + case 916: // 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]); @@ -6877,7 +6920,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, + case 917: // func_decl_lambda -> tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, // tkRoundClose, lambda_type_ref_noproctype, tkArrow, // lambda_function_body { @@ -6888,7 +6931,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, + case 918: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, // full_lambda_fp_list, tkRoundClose, // lambda_type_ref_noproctype, tkArrow, lambda_function_body { @@ -6900,7 +6943,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, expr_l1, tkComma, expr_l1_list, + case 919: // func_decl_lambda -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, // lambda_type_ref, optional_full_lambda_fp_list, // tkRoundClose, rem_lambda { @@ -6962,61 +7005,61 @@ public partial class GPPGParser: ShiftReduceParser expl_func_decl_lambda + case 920: // func_decl_lambda -> expl_func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 913: // optional_full_lambda_fp_list -> /* empty */ + case 921: // optional_full_lambda_fp_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 914: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list + case 922: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 915: // rem_lambda -> lambda_type_ref_noproctype, tkArrow, lambda_function_body + case 923: // 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 916: // expl_func_decl_lambda -> tkFunction, lambda_type_ref, tkArrow, + case 924: // 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 917: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, tkRoundClose, lambda_type_ref, + case 925: // 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 918: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, + case 926: // 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 919: // expl_func_decl_lambda -> tkProcedure, tkArrow, lambda_procedure_body + case 927: // 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 920: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, tkRoundClose, tkArrow, + case 928: // 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 921: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, full_lambda_fp_list, + case 929: // 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 922: // full_lambda_fp_list -> lambda_simple_fp_sect + case 930: // 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) @@ -7036,97 +7079,97 @@ public partial class GPPGParser: ShiftReduceParser full_lambda_fp_list, tkSemiColon, lambda_simple_fp_sect + case 931: // 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 924: // lambda_simple_fp_sect -> ident_list, lambda_type_ref + case 932: // 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 925: // lambda_type_ref -> /* empty */ + case 933: // lambda_type_ref -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 926: // lambda_type_ref -> tkColon, fptype + case 934: // lambda_type_ref -> tkColon, fptype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 927: // lambda_type_ref_noproctype -> /* empty */ + case 935: // lambda_type_ref_noproctype -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 928: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype + case 936: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 929: // common_lambda_body -> compound_stmt + case 937: // common_lambda_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 930: // common_lambda_body -> if_stmt + case 938: // common_lambda_body -> if_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 931: // common_lambda_body -> while_stmt + case 939: // common_lambda_body -> while_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 932: // common_lambda_body -> repeat_stmt + case 940: // common_lambda_body -> repeat_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 933: // common_lambda_body -> for_stmt + case 941: // common_lambda_body -> for_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 934: // common_lambda_body -> foreach_stmt + case 942: // common_lambda_body -> foreach_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 935: // common_lambda_body -> loop_stmt + case 943: // common_lambda_body -> loop_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 936: // common_lambda_body -> case_stmt + case 944: // common_lambda_body -> case_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 937: // common_lambda_body -> try_stmt + case 945: // common_lambda_body -> try_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 938: // common_lambda_body -> lock_stmt + case 946: // common_lambda_body -> lock_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 939: // common_lambda_body -> raise_stmt + case 947: // common_lambda_body -> raise_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 940: // common_lambda_body -> yield_stmt + case 948: // common_lambda_body -> yield_stmt { parsertools.AddErrorFromResource("YIELD_STATEMENT_CANNOT_BE_USED_IN_LAMBDA_BODY", CurrentLocationSpan); } break; - case 941: // lambda_function_body -> expr_l1_func_decl_lambda + case 949: // lambda_function_body -> expr_l1_for_lambda { var id = SyntaxVisitors.ExprHasNameVisitor.HasName(ValueStack[ValueStack.Depth-1].ex, "Result"); if (id != null) @@ -7138,22 +7181,22 @@ public partial class GPPGParser: ShiftReduceParser common_lambda_body + case 950: // lambda_function_body -> common_lambda_body { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 943: // lambda_procedure_body -> proc_call + case 951: // lambda_procedure_body -> proc_call { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 944: // lambda_procedure_body -> assignment + case 952: // lambda_procedure_body -> assignment { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 945: // lambda_procedure_body -> common_lambda_body + case 953: // 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 d5f88f924..9dc11b7da 100644 --- a/Parsers/PascalABCParserNewSaushkin/PABC.ymc +++ b/Parsers/PascalABCParserNewSaushkin/PABC.ymc @@ -255,6 +255,10 @@ script= + + + + diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index 99692298f..afa880c9d 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.5.1.2300 +3.5.1.2310 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index c25ed1d4f..695149731 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.5.1.2300' +!define VERSION '3.5.1.2310' diff --git a/TestSuite/CompilationSamples/LambdaIf.pas b/TestSuite/CompilationSamples/LambdaIf.pas index a17623dc2..6d53b8e20 100644 --- a/TestSuite/CompilationSamples/LambdaIf.pas +++ b/TestSuite/CompilationSamples/LambdaIf.pas @@ -1,5 +1,5 @@ -begin +begin var p: procedure(x: integer); - p := x -> if True then Print(x); + p := procedure(x) -> if True then Print(x); p(666); end. \ No newline at end of file diff --git a/TestSuite/CompilationSamples/LambdaProc2.pas b/TestSuite/CompilationSamples/LambdaProc2.pas index 31785a18d..dfee58084 100644 --- a/TestSuite/CompilationSamples/LambdaProc2.pas +++ b/TestSuite/CompilationSamples/LambdaProc2.pas @@ -1,3 +1,3 @@ -begin - Arr(1,2,3).ForEach(x -> if x>1 then Print(x)); +begin + Arr(1,2,3).ForEach(procedure(x) -> if x>1 then Print(x)); end. \ No newline at end of file diff --git a/TestSuite/CompilationSamples/PABCSystem.pas b/TestSuite/CompilationSamples/PABCSystem.pas index 324a09750..67e6cc6bf 100644 --- a/TestSuite/CompilationSamples/PABCSystem.pas +++ b/TestSuite/CompilationSamples/PABCSystem.pas @@ -628,6 +628,8 @@ function TryRead(var x: single): boolean; /// Возвращает значение типа integer, введенное с клавиатуры function ReadInteger: integer; +/// Возвращает значение типа int64, введенное с клавиатуры +function ReadInt64: int64; /// Возвращает значение типа real, введенное с клавиатуры function ReadReal: real; /// Возвращает значение типа char, введенное с клавиатуры @@ -639,6 +641,8 @@ function ReadBoolean: boolean; /// Возвращает значение типа integer, введенное с клавиатуры, и переходит на следующую строку ввода function ReadlnInteger: integer; +/// Возвращает значение типа int64, введенное с клавиатуры, и переходит на следующую строку ввода +function ReadlnInt64: int64; /// Возвращает значение типа real, введенное с клавиатуры, и переходит на следующую строку ввода function ReadlnReal: real; /// Возвращает значение типа char, введенное с клавиатуры, и переходит на следующую строку ввода @@ -752,6 +756,8 @@ function ReadlnString4(prompt: string): (string, string, string, string); /// Выводит приглашение к вводу и возвращает значение типа integer, введенное с клавиатуры function ReadInteger(prompt: string): integer; +/// Выводит приглашение к вводу и возвращает значение типа int64, введенное с клавиатуры +function ReadInt64(prompt: string): int64; /// Выводит приглашение к вводу и возвращает значение типа real, введенное с клавиатуры function ReadReal(prompt: string): real; /// Выводит приглашение к вводу и возвращает значение типа char, введенное с клавиатуры @@ -764,6 +770,9 @@ function ReadBoolean(prompt: string): boolean; /// Выводит приглашение к вводу и возвращает значение типа integer, введенное с клавиатуры, ///и осуществляет переход на следующую строку ввода function ReadlnInteger(prompt: string): integer; +/// Выводит приглашение к вводу и возвращает значение типа int64, введенное с клавиатуры, +///и осуществляет переход на следующую строку ввода +function ReadlnInt64(prompt: string): int64; /// Выводит приглашение к вводу и возвращает значение типа real, введенное с клавиатуры, ///и осуществляет переход на следующую строку ввода function ReadlnReal(prompt: string): real; @@ -821,6 +830,8 @@ procedure Readln(f: Text; var x: string); /// Возвращает значение типа integer, введенное из текстового файла f function ReadInteger(f: Text): integer; +/// Возвращает значение типа int64, введенное из текстового файла f +function ReadInt64(f: Text): int64; /// Возвращает значение типа real, введенное из текстового файла f function ReadReal(f: Text): real; /// Возвращает значение типа char, введенное из текстового файла f @@ -833,6 +844,9 @@ function ReadBoolean(f: Text): boolean; /// Возвращает значение типа integer, введенное из текстового файла f, ///и осуществляет переход на следующую строку function ReadlnInteger(f: Text): integer; +/// Возвращает значение типа int64, введенное из текстового файла f, +///и осуществляет переход на следующую строку +function ReadlnInt64(f: Text): int64; /// Возвращает значение типа real, введенное из текстового файла f, ///и осуществляет переход на следующую строку function ReadlnReal(f: Text): real; @@ -1913,6 +1927,13 @@ function ReadArrInteger(n: integer): array of integer; function ReadArrReal(n: integer): array of real; /// Возвращает массив из n строк, введенных с клавиатуры function ReadArrString(n: integer): array of string; +///-- +function ReadArrInteger: array of integer; +///-- +function ReadArrReal: array of real; +///-- +function ReadArrString: array of string; + /// Выводит приглашение к вводу и возвращает массив из n целых, введенных с клавиатуры function ReadArrInteger(prompt: string; n: integer): array of integer; @@ -2035,6 +2056,13 @@ function __WildCardsTupleEqual ReadInteger()); @@ -5213,59 +5261,59 @@ begin end end; - function ReadInteger: integer; begin - var x: integer; - read(x); - Result := x; + Read(Result); +end; + +function ReadInt64: int64; +begin + Read(Result); end; function ReadReal: real; begin - var x: real; - read(x); - Result := x; + Read(Result); end; function ReadChar: char; begin - var x: char; - read(x); - Result := x; + Read(Result); end; function ReadString: string; begin - var x: string; - read(x); + Read(Result); readln(); - Result := x; end; function ReadBoolean: boolean; begin - var x: boolean; - read(x); - Result := x; + Read(Result); end; function ReadlnInteger: integer; begin Result := ReadInteger; - readln(); + Readln(); +end; + +function ReadlnInt64: int64; +begin + Result := ReadInt64; + Readln(); end; function ReadlnReal: real; begin Result := ReadReal; - readln(); + Readln(); end; function ReadlnChar: char; begin Result := ReadChar; - readln(); + Readln(); end; function ReadlnString: string; @@ -5276,7 +5324,7 @@ end; function ReadlnBoolean: boolean; begin Result := ReadBoolean; - readln(); + Readln(); end; function ReadInteger2 := (ReadInteger, ReadInteger); @@ -5388,6 +5436,12 @@ begin Result := ReadInteger; end; +function ReadInt64(prompt: string): int64; +begin + Print(prompt); + Result := ReadInt64; +end; + function ReadReal(prompt: string): real; begin Print(prompt); @@ -5418,6 +5472,12 @@ begin Result := ReadlnInteger; end; +function ReadlnInt64(prompt: string): int64; +begin + Print(prompt); + Result := ReadlnInt64; +end; + function ReadlnReal(prompt: string): real; begin Print(prompt); @@ -5674,56 +5734,57 @@ end; function ReadInteger(f: Text): integer; begin - var x: integer; - read(f, x); - Result := x; + Read(f, Result); +end; + +function ReadInt64(f: Text): int64; +begin + Read(f, Result); end; function ReadReal(f: Text): real; begin - var x: real; - read(f, x); - Result := x; + Read(f, Result); end; function ReadChar(f: Text): char; begin - var x: char; - read(f, x); - Result := x; + Read(f, Result); end; function ReadString(f: Text): string; begin - var x: string; - read(f, x); - readln(f); - Result := x; + Read(f, Result); + Readln(f); end; function ReadBoolean(f: Text): boolean; begin - var x: boolean; - read(f, x); - Result := x; + Read(f, Result); end; function ReadlnInteger(f: Text): integer; begin Result := ReadInteger(f); - readln(f); + Readln(f); +end; + +function ReadlnInt64(f: Text): int64; +begin + Result := ReadInt64(f); + Readln(f); end; function ReadlnReal(f: Text): real; begin Result := ReadReal(f); - readln(f); + Readln(f); end; function ReadlnChar(f: Text): char; begin Result := ReadChar(f); - readln(f); + Readln(f); end; function ReadlnString(f: Text): string; @@ -5734,7 +5795,7 @@ end; function ReadlnBoolean(f: Text): boolean; begin Result := ReadBoolean(f); - readln(f); + Readln(f); end; // ----------------------------------------------------- // TextFile methods @@ -9347,6 +9408,26 @@ end; //>> Методы расширения списков # Extension methods for List T // ----------------------------------------------------- +/// Возвращает последовательность индексов списка +function Indices(Self: List): sequence of integer; extensionmethod := Range(0, Self.Count - 1); + +/// Возвращает последовательность индексов элементов списка, удовлетворяющих условию +function Indices(Self: List; cond: T->boolean): sequence of integer; extensionmethod; +begin + for var i := 0 to Self.Count - 1 do + if cond(Self[i]) then + yield i; +end; + +/// Возвращает последовательность индексов элементов списка, удовлетворяющих условию +function Indices(Self: List; cond: (T,integer) ->boolean): sequence of integer; extensionmethod; +begin + for var i := 0 to Self.Count - 1 do + if cond(Self[i], i) then + yield i; +end; + + /// Перемешивает элементы списка случайным образом function Shuffle(Self: List): List; extensionmethod; begin @@ -9725,8 +9806,11 @@ end; function SystemSliceListImpl(Self: List; situation: integer; from, &to: integer; step: integer := 1): List; begin var count := CheckAndCorrectFromToAndCalcCountForSystemSlice(situation, Self.Count, from, &to, step); - - Result := CreateSliceFromListInternal(Self, from, step, count); + {if (step=1) and (count>32) then // 32 - empirical + begin + Result := Self.GetRange(from,count); + end + else} Result := CreateSliceFromListInternal(Self, from, step, count); end; ///-- @@ -10518,8 +10602,12 @@ end; function SystemSliceArrayImpl(Self: array of T; situation: integer; from, &to: integer; step: integer := 1): array of T; begin var count := CheckAndCorrectFromToAndCalcCountForSystemSlice(situation, Self.Length, from, &to, step); - - Result := CreateSliceFromArrayInternal(Self, from, step, count) + {if (step = 1) and (count>32) then // 32 - empirical + begin + Result := new T[count]; + System.Array.Copy(Self,from,Result,0,count); + end + else} Result := CreateSliceFromArrayInternal(Self, from, step, count) end; ///-- @@ -10582,11 +10670,16 @@ begin end; ///-- -function InRangeInternal(Self: integer; a,b: integer): boolean; extensionmethod; +function InRangeInternal(x: integer; a,b: integer): boolean; begin - Result := (a <= Self) and (Self <= b) + Result := (a <= x) and (x <= b) end; +///-- +function InRangeInternal(x: char; a,b: char): boolean; +begin + Result := (a <= x) and (x <= b) +end; // Дополнения февраль 2016: IsEven, IsOdd diff --git a/TreeConverter/TreeConversion/SyntaxTreeVisitorNodes/Foreach.cs b/TreeConverter/TreeConversion/SyntaxTreeVisitorNodes/Foreach.cs index 43e5351a7..0c6602d48 100644 --- a/TreeConverter/TreeConversion/SyntaxTreeVisitorNodes/Foreach.cs +++ b/TreeConverter/TreeConversion/SyntaxTreeVisitorNodes/Foreach.cs @@ -16,8 +16,9 @@ namespace PascalABCCompiler.TreeConverter // SSM 24.12.19 lambda_capture_foreach_counter.pas не проходит если откомментировать эти 2 строки // Причина - лямбда уже начала разбираться // Пробую сделать так: если foreach в лямбде, то оптимизация не делается, а если нет, то делается - - syntax_tree_node p = _foreach_stmt; + // Пока не получилось - ошибка err0157.pas начинает быть правильной программой + // Надо как-то переменную x в стек context.loop_var_stack.Push(foreachVariable); помещать !!! Но не сейчас... (SSM 12.01.20) + /*syntax_tree_node p = _foreach_stmt; do { p = p.Parent; @@ -27,7 +28,7 @@ namespace PascalABCCompiler.TreeConverter { var feWhat = convert_strong(_foreach_stmt.in_what); if (OptimizeForeachInCase1DArray(_foreach_stmt, feWhat)) return; - } + }*/ statements_list sl2 = new statements_list(get_location(_foreach_stmt)); convertion_data_and_alghoritms.statement_list_stack_push(sl2);