From 67f5b8c00e6a528ced50f14d970ee17ddbc5689f Mon Sep 17 00:00:00 2001 From: Mikhalkovich Stanislav Date: Mon, 8 Jun 2020 21:30:03 +0300 Subject: [PATCH] fix #2248 --- .../PascalABCParserNewSaushkin/ABCPascal.cs | 6 +- .../PascalABCParserNewSaushkin/ABCPascal.lst | 63 +- .../PascalABCParserNewSaushkin/ABCPascal.y | 20 +- .../ABCPascalYacc.cs | 4094 +++++++++-------- Parsers/PascalABCParserNewSaushkin/PABC.ymc | 3 + .../convertion_data_and_alghoritms.cs | 2 +- TreeConverter/TreeRealization/type_table.cs | 16 +- bin/Lib/GraphWPF.pas | 18 +- bin/Lib/GraphWPFBase.pas | 8 +- 9 files changed, 2129 insertions(+), 2101 deletions(-) diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index 6a8dae13c..382366f95 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs @@ -1,9 +1,9 @@ // // This CSharp output file generated by Gardens Point LEX // Version: 1.1.3.301 -// Machine: DESKTOP-P4NLNB1 -// DateTime: 5/5/2020 6:55:25 PM -// UserName: fatco +// Machine: DESKTOP-G8V08V4 +// DateTime: 08.06.2020 21:28:01 +// UserName: ????????? // GPLEX input file // GPLEX frame file // diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.lst b/Parsers/PascalABCParserNewSaushkin/ABCPascal.lst index ff8df0824..c3b07eba2 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.lst +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.lst @@ -1,11 +1,11 @@ // ========================================================================== -// GPPG error listing for yacc source file +// GPPG error listing for yacc source file // ========================================================================== // Version: 1.3.6 -// Machine: DESKTOP-P4NLNB1 -// DateTime: 4/20/2020 4:00:49 PM -// UserName: fatco +// Machine: DESKTOP-G8V08V4 +// DateTime: 08.06.2020 21:09:20 +// UserName: Станислав // ========================================================================== @@ -90,13 +90,13 @@ %type exception_handler %type exception_handler_list %type exception_identifier -%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 typed_const_list1 typed_const_list optional_expr_list elem_list optional_expr_list_with_bracket expr_list const_elem_list1 const_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 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 simple_expr_with_deref_or_nothing simple_expr_with_deref /*expr_l1_for_indexer*/ +%type format_expr format_const_expr const_expr_or_nothing /* simple_expr_with_deref_or_nothing simple_expr_with_deref expr_l1_for_indexer*/ %type foreach_stmt %type for_stmt loop_stmt yield_stmt yield_sequence_stmt %type fp_list fp_sect_list @@ -191,17 +191,8 @@ %type pattern_out_param_list pattern_out_param_list_optional_var collection_pattern_expr_list tuple_pattern_item_list const_pattern_expr_list %% -// Error: NonTerminal symbol "simple_expr_with_deref_or_nothing" has no productions -// Warning: NonTerminal symbol "simple_expr_with_deref" is unreachable -// Error: NonTerminal symbol "simple_expr_with_deref" has no productions -// Warning: NonTerminal symbol "simple_expr_with_deref_or_nothing" is unreachable -// Error: There are 2 non-terminating NonTerminal Symbols - // {simple_expr_with_deref_or_nothing, simple_expr_with_deref} -// Warning: Terminating simple_expr_with_deref_or_nothing fixes the following size-1 NonTerminal set - // {simple_expr_with_deref_or_nothing} -// Warning: Terminating simple_expr_with_deref fixes the following size-1 NonTerminal set - // {simple_expr_with_deref} -// ------------------------------------------------------------------------------------------------- +// Warning: NonTerminal symbol "const_expr_list" is unreachable +// ------------------------------------------------------------ parse_goal : program_file @@ -961,9 +952,7 @@ const_variable if (fe.format1 == null) fe.format1 = new int32_const(int.MaxValue,@3); } - var from = fe.expr is index ? fe.expr : new index(fe.expr, false, fe.expr.source_context); - var to = fe.format1 is index ? fe.format1 : new index(fe.format1, false, fe.format1.source_context); - $$ = new slice_expr($1 as addressed_value,from,to,fe.format2,@$); + $$ = new slice_expr($1 as addressed_value,fe.expr,fe.format1,fe.format2,@$); } ; @@ -994,16 +983,16 @@ optional_const_func_expr_list { $$ = null; } ; -/*const_func_expr_list +const_expr_list : const_expr { $$ = new expression_list($1, @$); } - | const_func_expr_list tkComma const_expr + | const_expr_list tkComma const_expr { $$ = ($1 as expression_list).Add($3, @$); } - ;*/ + ; const_elem_list : const_elem_list1 @@ -2734,9 +2723,7 @@ assignment if (fe.format1 == null) fe.format1 = new int32_const(int.MaxValue,@3); } - var from = fe.expr is index ? fe.expr : new index(fe.expr, false, fe.expr.source_context); - var to = fe.format1 is index ? fe.format1 : new index(fe.format1, false, fe.format1.source_context); - var left = new slice_expr_question($1 as addressed_value,from.to,fe.format2,@$); + var left = new slice_expr_question($1 as addressed_value,fe.expr,fe.format1,fe.format2,@$); $$ = new assign(left, $6, $5.type, @$); } ; @@ -3145,16 +3132,12 @@ expr_with_func_decl_lambda expr : expr_l1 { $$ = $1; } - | tkDeref expr_l1 - { $$ = new simple_expr_with_deref($2, true); } | format_expr { $$ = $1; } ; /* expr_l1_for_indexer - : tkDeref expr_l1 - { $$ = new simple_expr_with_deref($2, true); } - | expr_l1 + : expr_l1 { $$ = $1; } | format_expr { $$ = $1; } @@ -3385,6 +3368,10 @@ relop_expr { $$ = new bin_expr($1, $3, $2.type, @$); } + | relop_expr relop new_question_expr + { + $$ = new bin_expr($1, $3, $2.type, @$); + } | is_type_expr tkRoundOpen pattern_out_param_list tkRoundClose { var isTypeCheck = $1 as typecast_node; @@ -3803,6 +3790,10 @@ term1 { $$ = new bin_expr($1, $3, $2.type, @$); } + | term1 addop new_question_expr + { + $$ = new bin_expr($1, $3, $2.type, @$); + } ; addop @@ -3871,6 +3862,8 @@ term { $$ = new bin_expr($1,$3,($2).type, @$); } | term mulop power_expr { $$ = new bin_expr($1,$3,($2).type, @$); } + | term mulop new_question_expr + { $$ = new bin_expr($1,$3,($2).type, @$); } | as_is_expr { $$ = $1; } ; @@ -4080,9 +4073,7 @@ variable if (fe.format1 == null) fe.format1 = new int32_const(int.MaxValue,@3); } - var from = fe.expr is index ? fe.expr : new index(fe.expr, false, fe.expr.source_context); - var to = fe.format1 is index ? fe.format1 : new index(fe.format1, false, fe.format1.source_context); - $$ = new slice_expr($1 as addressed_value,from,to,fe.format2,@$); + $$ = new slice_expr($1 as addressed_value,fe.expr,fe.format1,fe.format2,@$); } else $$ = new indexer($1 as addressed_value, el, @$); } @@ -4096,9 +4087,7 @@ variable if (fe.format1 == null) fe.format1 = new int32_const(int.MaxValue,@3); } - var from = fe.expr is index ? fe.expr : new index(fe.expr, false, fe.expr.source_context); - var to = fe.format1 is index ? fe.format1 : new index(fe.format1, false, fe.format1.source_context); - $$ = new slice_expr_question($1 as addressed_value,from,to,fe.format2,@$); + $$ = new slice_expr_question($1 as addressed_value,fe.expr,fe.format1,fe.format2,@$); } | variable tkRoundOpen optional_expr_list tkRoundClose { diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y index 081cff24d..392fc02c9 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y @@ -79,7 +79,7 @@ %type exception_handler %type exception_handler_list %type exception_identifier -%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 typed_const_list1 typed_const_list optional_expr_list elem_list optional_expr_list_with_bracket expr_list const_elem_list1 /*const_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 expr_l1_for_lambda simple_expr range_term range_factor @@ -970,12 +970,12 @@ optional_const_func_expr_list { $$ = null; } ; -/*const_func_expr_list +/*const_expr_list : const_expr { $$ = new expression_list($1, @$); } - | const_func_expr_list tkComma const_expr + | const_expr_list tkComma const_expr { $$ = ($1 as expression_list).Add($3, @$); } @@ -3512,6 +3512,10 @@ tuple_pattern_item { $$ = new const_pattern_parameter($1, @$); } + | sign literal_or_number + { + $$ = new const_pattern_parameter(new un_expr($2, $1.type, @$), @$); + } | tkVar identifier { $$ = new tuple_pattern_var_parameter($2, null, @$); @@ -3624,6 +3628,10 @@ pattern_out_param_optional_var { $$ = new const_pattern_parameter($1, @$); } + | sign literal_or_number + { + $$ = new const_pattern_parameter(new un_expr($2, $1.type, @$), @$); + } | identifier tkColon type_ref { $$ = new var_deconstructor_parameter($1, $3, false, @$); @@ -3953,7 +3961,11 @@ literal_or_number { $$ = $1; } | unsigned_number { $$ = $1; } - ; +/* | sign unsigned_number + { + $$ = new un_expr($2, $1.type, @$); + }*/ + ; var_question_point diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index 2643bae14..d72ac4949 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -1,10 +1,10 @@ // (see accompanying GPPGcopyright.rtf) // GPPG version 1.3.6 -// Machine: DESKTOP-P4NLNB1 -// DateTime: 5/5/2020 6:55:26 PM -// UserName: fatco -// Input file +// Machine: DESKTOP-G8V08V4 +// DateTime: 08.06.2020 21:28:01 +// UserName: ????????? +// Input file // options: no-lines gplex @@ -59,7 +59,7 @@ public abstract class ScanBase : AbstractScanner { - // Verbatim content from ABCPascal.y + // Verbatim content from D:\PABC_Git\Parsers\PascalABCParserNewSaushkin\ABCPascal.y // ��� ���������� ����������� � ����� GPPGParser, �������������� ����� ������, ������������ �������� gppg public syntax_tree_node root; // �������� ���� ��������������� ������ @@ -71,13 +71,13 @@ public partial class GPPGParser: ShiftReduceParser scanner) : base(scanner) { } - // End verbatim content from ABCPascal.y + // End verbatim content from D:\PABC_Git\Parsers\PascalABCParserNewSaushkin\ABCPascal.y #pragma warning disable 649 private static Dictionary aliasses; #pragma warning restore 649 - private static Rule[] rules = new Rule[959]; - private static State[] states = new State[1586]; + private static Rule[] rules = new Rule[961]; + private static State[] states = new State[1590]; private static string[] nonTerms = new string[] { "parse_goal", "unit_key_word", "class_or_static", "assignment", "optional_array_initializer", "attribute_declarations", "ot_visibility_specifier", "one_attribute", "attribute_variable", @@ -167,13 +167,13 @@ public partial class GPPGParser: ShiftReduceParser tkVar, identifier + case 648: // tuple_pattern_item -> sign, literal_or_number +{ + CurrentSemanticValue.stn = new const_pattern_parameter(new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan), CurrentLocationSpan); + } + break; + case 649: // tuple_pattern_item -> tkVar, identifier { CurrentSemanticValue.stn = new tuple_pattern_var_parameter(ValueStack[ValueStack.Depth-1].id, null, CurrentLocationSpan); } break; - case 649: // tuple_pattern_item -> pattern_optional_var + case 650: // tuple_pattern_item -> pattern_optional_var { CurrentSemanticValue.stn = new recursive_deconstructor_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 650: // tuple_pattern_item -> collection_pattern + case 651: // tuple_pattern_item -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 651: // tuple_pattern_item -> tuple_pattern + case 652: // tuple_pattern_item -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 652: // tuple_pattern_item_list -> tuple_pattern_item + case 653: // 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 653: // tuple_pattern_item_list -> tuple_pattern_item_list, tkComma, tuple_pattern_item + case 654: // 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 654: // pattern_out_param_list_optional_var -> pattern_out_param_optional_var + case 655: // 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 655: // pattern_out_param_list_optional_var -> pattern_out_param_list_optional_var, + case 656: // pattern_out_param_list_optional_var -> pattern_out_param_list_optional_var, // tkSemiColon, // pattern_out_param_optional_var { @@ -5903,7 +5914,7 @@ public partial class GPPGParser: ShiftReduceParser pattern_out_param_list_optional_var, + case 657: // pattern_out_param_list_optional_var -> pattern_out_param_list_optional_var, // tkComma, // pattern_out_param_optional_var { @@ -5912,13 +5923,13 @@ public partial class GPPGParser: ShiftReduceParser pattern_out_param + case 658: // 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 658: // pattern_out_param_list -> pattern_out_param_list, tkSemiColon, + case 659: // pattern_out_param_list -> pattern_out_param_list, tkSemiColon, // pattern_out_param { var list = ValueStack[ValueStack.Depth-3].ob as List; @@ -5926,180 +5937,185 @@ public partial class GPPGParser: ShiftReduceParser pattern_out_param_list, tkComma, pattern_out_param + case 660: // 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 660: // pattern_out_param -> tkUnderscore + case 661: // pattern_out_param -> tkUnderscore { CurrentSemanticValue.stn = new wild_card_deconstructor_parameter(CurrentLocationSpan); } break; - case 661: // pattern_out_param -> literal_or_number + case 662: // pattern_out_param -> literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 662: // pattern_out_param -> tkVar, identifier, tkColon, type_ref + case 663: // 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 663: // pattern_out_param -> tkVar, identifier + case 664: // pattern_out_param -> tkVar, identifier { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-1].id, null, true, CurrentLocationSpan); } break; - case 664: // pattern_out_param -> pattern + case 665: // pattern_out_param -> pattern { CurrentSemanticValue.stn = new recursive_deconstructor_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 665: // pattern_out_param -> collection_pattern + case 666: // pattern_out_param -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 666: // pattern_out_param -> tuple_pattern + case 667: // pattern_out_param -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 667: // pattern_out_param_optional_var -> tkUnderscore + case 668: // pattern_out_param_optional_var -> tkUnderscore { CurrentSemanticValue.stn = new wild_card_deconstructor_parameter(CurrentLocationSpan); } break; - case 668: // pattern_out_param_optional_var -> literal_or_number + case 669: // pattern_out_param_optional_var -> literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 669: // pattern_out_param_optional_var -> identifier, tkColon, type_ref + case 670: // pattern_out_param_optional_var -> sign, literal_or_number +{ + CurrentSemanticValue.stn = new const_pattern_parameter(new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan), CurrentLocationSpan); + } + break; + case 671: // pattern_out_param_optional_var -> identifier, tkColon, type_ref { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-1].td, false, CurrentLocationSpan); } break; - case 670: // pattern_out_param_optional_var -> identifier + case 672: // pattern_out_param_optional_var -> identifier { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-1].id, null, false, CurrentLocationSpan); } break; - case 671: // pattern_out_param_optional_var -> tkVar, identifier, tkColon, type_ref + case 673: // 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 672: // pattern_out_param_optional_var -> tkVar, identifier + case 674: // pattern_out_param_optional_var -> tkVar, identifier { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-1].id, null, true, CurrentLocationSpan); } break; - case 673: // pattern_out_param_optional_var -> pattern_optional_var + case 675: // 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 674: // pattern_out_param_optional_var -> collection_pattern + case 676: // pattern_out_param_optional_var -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 675: // pattern_out_param_optional_var -> tuple_pattern + case 677: // pattern_out_param_optional_var -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 676: // simple_expr_or_nothing -> simple_expr + case 678: // simple_expr_or_nothing -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 677: // simple_expr_or_nothing -> /* empty */ + case 679: // simple_expr_or_nothing -> /* empty */ { CurrentSemanticValue.ex = null; } break; - case 678: // const_expr_or_nothing -> const_expr + case 680: // const_expr_or_nothing -> const_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 679: // const_expr_or_nothing -> /* empty */ + case 681: // const_expr_or_nothing -> /* empty */ { CurrentSemanticValue.ex = null; } break; - case 680: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing + case 682: // 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 681: // format_expr -> tkColon, simple_expr_or_nothing + case 683: // format_expr -> tkColon, simple_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 682: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing, tkColon, + case 684: // 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 683: // format_expr -> tkColon, simple_expr_or_nothing, tkColon, simple_expr + case 685: // 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 684: // format_const_expr -> const_expr, tkColon, const_expr_or_nothing + case 686: // 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 685: // format_const_expr -> tkColon, const_expr_or_nothing + case 687: // format_const_expr -> tkColon, const_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 686: // format_const_expr -> const_expr, tkColon, const_expr_or_nothing, tkColon, + case 688: // 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 687: // format_const_expr -> tkColon, const_expr_or_nothing, tkColon, const_expr + case 689: // 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 688: // relop -> tkEqual + case 690: // relop -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 689: // relop -> tkNotEqual + case 691: // relop -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 690: // relop -> tkLower + case 692: // relop -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 691: // relop -> tkGreater + case 693: // relop -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 692: // relop -> tkLowerEqual + case 694: // relop -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 693: // relop -> tkGreaterEqual + case 695: // relop -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 694: // relop -> tkIn + case 696: // relop -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 695: // simple_expr -> term1 + case 697: // simple_expr -> term1 { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 696: // simple_expr -> simple_expr, tkDotDot, term1 + case 698: // 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); @@ -6107,115 +6123,115 @@ public partial class GPPGParser: ShiftReduceParser term + case 699: // term1 -> term { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 698: // term1 -> term1, addop, term + case 700: // 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 699: // term1 -> term1, addop, new_question_expr + case 701: // term1 -> term1, addop, new_question_expr { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 700: // addop -> tkPlus + case 702: // addop -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 701: // addop -> tkMinus + case 703: // addop -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 702: // addop -> tkOr + case 704: // addop -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 703: // addop -> tkXor + case 705: // addop -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 704: // addop -> tkCSharpStyleOr + case 706: // addop -> tkCSharpStyleOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 705: // typecast_op -> tkAs + case 707: // typecast_op -> tkAs { CurrentSemanticValue.ob = op_typecast.as_op; } break; - case 706: // typecast_op -> tkIs + case 708: // typecast_op -> tkIs { CurrentSemanticValue.ob = op_typecast.is_op; } break; - case 707: // as_is_expr -> is_type_expr + case 709: // as_is_expr -> is_type_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 708: // as_is_expr -> as_expr + case 710: // as_is_expr -> as_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 709: // as_expr -> term, tkAs, simple_or_template_type_reference + case 711: // 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 710: // is_type_expr -> term, tkIs, simple_or_template_type_reference + case 712: // 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 711: // simple_term -> factor + case 713: // simple_term -> factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 712: // power_expr -> simple_term, tkStarStar, factor + case 714: // 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 713: // term -> factor + case 715: // term -> factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 714: // term -> new_expr + case 716: // term -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 715: // term -> power_expr + case 717: // term -> power_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 716: // term -> term, mulop, factor + case 718: // 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 717: // term -> term, mulop, power_expr + case 719: // 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 718: // term -> term, mulop, new_question_expr + case 720: // term -> term, mulop, new_question_expr { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].ex,(ValueStack[ValueStack.Depth-2].op).type, CurrentLocationSpan); } break; - case 719: // term -> as_is_expr + case 721: // term -> as_is_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 720: // mulop -> tkStar + case 722: // mulop -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 721: // mulop -> tkSlash + case 723: // mulop -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 722: // mulop -> tkDiv + case 724: // mulop -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 723: // mulop -> tkMod + case 725: // mulop -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 724: // mulop -> tkShl + case 726: // mulop -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 725: // mulop -> tkShr + case 727: // mulop -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 726: // mulop -> tkAnd + case 728: // mulop -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 727: // default_expr -> tkDefault, tkRoundOpen, simple_or_template_type_reference, + case 729: // 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 728: // tuple -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, lambda_type_ref, + case 730: // tuple -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, lambda_type_ref, // optional_full_lambda_fp_list, tkRoundClose { /*if ($5 != null) @@ -6229,29 +6245,29 @@ public partial class GPPGParser: ShiftReduceParser tkNil + case 731: // factor -> tkNil { CurrentSemanticValue.ex = new nil_const(); CurrentSemanticValue.ex.source_context = CurrentLocationSpan; } break; - case 730: // factor -> literal_or_number + case 732: // factor -> literal_or_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 731: // factor -> default_expr + case 733: // factor -> default_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 732: // factor -> tkSquareOpen, elem_list, tkSquareClose + case 734: // factor -> tkSquareOpen, elem_list, tkSquareClose { CurrentSemanticValue.ex = new pascal_set_constant(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 733: // factor -> tkNot, factor + case 735: // factor -> tkNot, factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 734: // factor -> sign, factor + case 736: // factor -> sign, factor { if (ValueStack[ValueStack.Depth-2].op.type == Operators.Minus) { @@ -6278,96 +6294,96 @@ public partial class GPPGParser: ShiftReduceParser tkDeref, factor + case 737: // factor -> tkDeref, factor { CurrentSemanticValue.ex = new index(ValueStack[ValueStack.Depth-1].ex, true, CurrentLocationSpan); } break; - case 736: // factor -> var_reference + case 738: // factor -> var_reference { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 737: // factor -> tuple + case 739: // factor -> tuple { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 738: // literal_or_number -> literal + case 740: // literal_or_number -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 739: // literal_or_number -> unsigned_number + case 741: // literal_or_number -> unsigned_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 740: // var_question_point -> variable, tkQuestionPoint, variable + case 742: // 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 741: // var_question_point -> variable, tkQuestionPoint, var_question_point + case 743: // 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 742: // var_reference -> var_address, variable + case 744: // 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 743: // var_reference -> variable + case 745: // var_reference -> variable { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 744: // var_reference -> var_question_point + case 746: // var_reference -> var_question_point { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 745: // var_address -> tkAddressOf + case 747: // var_address -> tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(CurrentLocationSpan); } break; - case 746: // var_address -> var_address, tkAddressOf + case 748: // var_address -> var_address, tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(ValueStack[ValueStack.Depth-2].stn as get_address, CurrentLocationSpan); } break; - case 747: // attribute_variable -> simple_type_identifier, optional_expr_list_with_bracket + case 749: // 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 748: // attribute_variable -> template_type, optional_expr_list_with_bracket + case 750: // 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 749: // dotted_identifier -> identifier + case 751: // dotted_identifier -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 750: // dotted_identifier -> dotted_identifier, tkPoint, identifier_or_keyword + case 752: // 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 751: // variable_as_type -> dotted_identifier + case 753: // variable_as_type -> dotted_identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;} break; - case 752: // variable_as_type -> dotted_identifier, template_type_params + case 754: // 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 753: // variable_or_literal_or_number -> variable + case 755: // variable_or_literal_or_number -> variable { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 754: // variable_or_literal_or_number -> literal_or_number + case 756: // variable_or_literal_or_number -> literal_or_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 755: // variable -> identifier + case 757: // variable -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 756: // variable -> operator_name_ident + case 758: // variable -> operator_name_ident { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 757: // variable -> tkInherited, identifier + case 759: // variable -> tkInherited, identifier { CurrentSemanticValue.ex = new inherited_ident(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 758: // variable -> tkRoundOpen, expr, tkRoundClose + case 760: // variable -> tkRoundOpen, expr, tkRoundClose { if (!parsertools.build_tree_for_formatter) { @@ -6377,18 +6393,18 @@ public partial class GPPGParser: ShiftReduceParser sizeof_expr + case 761: // variable -> sizeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 760: // variable -> typeof_expr + case 762: // variable -> typeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 761: // variable -> literal_or_number, tkPoint, identifier_or_keyword + case 763: // 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 762: // variable -> variable_or_literal_or_number, tkSquareOpen, expr_list, + case 764: // variable -> variable_or_literal_or_number, tkSquareOpen, expr_list, // tkSquareClose { var el = ValueStack[ValueStack.Depth-2].stn as expression_list; // SSM 10/03/16 @@ -6407,7 +6423,7 @@ public partial class GPPGParser: ShiftReduceParser variable, tkQuestionSquareOpen, format_expr, tkSquareClose + case 765: // 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) @@ -6420,71 +6436,71 @@ public partial class GPPGParser: ShiftReduceParser variable, tkRoundOpen, optional_expr_list, tkRoundClose + case 766: // 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 765: // variable -> variable, tkPoint, identifier_keyword_operatorname + case 767: // 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 766: // variable -> tuple, tkPoint, identifier_keyword_operatorname + case 768: // 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 767: // variable -> variable, tkDeref + case 769: // variable -> variable, tkDeref { CurrentSemanticValue.ex = new roof_dereference(ValueStack[ValueStack.Depth-2].ex as addressed_value,CurrentLocationSpan); } break; - case 768: // variable -> variable, tkAmpersend, template_type_params + case 770: // 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 769: // optional_expr_list -> expr_list + case 771: // optional_expr_list -> expr_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 770: // optional_expr_list -> /* empty */ + case 772: // optional_expr_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 771: // elem_list -> elem_list1 + case 773: // elem_list -> elem_list1 { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 772: // elem_list -> /* empty */ + case 774: // elem_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 773: // elem_list1 -> elem + case 775: // elem_list1 -> elem { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 774: // elem_list1 -> elem_list1, tkComma, elem + case 776: // 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 775: // elem -> expr + case 777: // elem -> expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 776: // elem -> expr, tkDotDot, expr + case 778: // elem -> expr, tkDotDot, expr { CurrentSemanticValue.ex = new diapason_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 777: // one_literal -> tkStringLiteral + case 779: // one_literal -> tkStringLiteral { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 778: // one_literal -> tkAsciiChar + case 780: // one_literal -> tkAsciiChar { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 779: // literal -> literal_list + case 781: // literal -> literal_list { CurrentSemanticValue.ex = NewLiteral(ValueStack[ValueStack.Depth-1].stn as literal_const_line); } break; - case 780: // literal -> tkFormatStringLiteral + case 782: // literal -> tkFormatStringLiteral { if (parsertools.build_tree_for_formatter) { @@ -6496,12 +6512,12 @@ public partial class GPPGParser: ShiftReduceParser one_literal + case 783: // literal_list -> one_literal { CurrentSemanticValue.stn = new literal_const_line(ValueStack[ValueStack.Depth-1].ex as literal, CurrentLocationSpan); } break; - case 782: // literal_list -> literal_list, one_literal + case 784: // 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) @@ -6509,449 +6525,449 @@ public partial class GPPGParser: ShiftReduceParser tkOperator, overload_operator + case 785: // 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 784: // optional_method_modificators -> tkSemiColon + case 786: // optional_method_modificators -> tkSemiColon { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 785: // optional_method_modificators -> tkSemiColon, meth_modificators, tkSemiColon + case 787: // 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 786: // optional_method_modificators1 -> /* empty */ + case 788: // optional_method_modificators1 -> /* empty */ { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 787: // optional_method_modificators1 -> tkSemiColon, meth_modificators + case 789: // 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 788: // meth_modificators -> meth_modificator + case 790: // meth_modificators -> meth_modificator { CurrentSemanticValue.stn = new procedure_attributes_list(ValueStack[ValueStack.Depth-1].id as procedure_attribute, CurrentLocationSpan); } break; - case 789: // meth_modificators -> meth_modificators, tkSemiColon, meth_modificator + case 791: // 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 790: // identifier -> tkIdentifier + case 792: // identifier -> tkIdentifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 791: // identifier -> property_specifier_directives + case 793: // identifier -> property_specifier_directives { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 792: // identifier -> non_reserved + case 794: // identifier -> non_reserved { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 793: // identifier_or_keyword -> identifier + case 795: // identifier_or_keyword -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 794: // identifier_or_keyword -> keyword + case 796: // identifier_or_keyword -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 795: // identifier_or_keyword -> reserved_keyword + case 797: // identifier_or_keyword -> reserved_keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 796: // identifier_keyword_operatorname -> identifier + case 798: // identifier_keyword_operatorname -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 797: // identifier_keyword_operatorname -> keyword + case 799: // identifier_keyword_operatorname -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 798: // identifier_keyword_operatorname -> operator_name_ident + case 800: // identifier_keyword_operatorname -> operator_name_ident { CurrentSemanticValue.id = (ident)ValueStack[ValueStack.Depth-1].ex; } break; - case 799: // meth_modificator -> tkAbstract + case 801: // meth_modificator -> tkAbstract { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 800: // meth_modificator -> tkOverload + case 802: // 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 801: // meth_modificator -> tkReintroduce + case 803: // meth_modificator -> tkReintroduce { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 802: // meth_modificator -> tkOverride + case 804: // meth_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 803: // meth_modificator -> tkExtensionMethod + case 805: // meth_modificator -> tkExtensionMethod { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 804: // meth_modificator -> tkVirtual + case 806: // meth_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 805: // property_modificator -> tkVirtual + case 807: // property_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 806: // property_modificator -> tkOverride + case 808: // property_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 807: // property_modificator -> tkAbstract + case 809: // property_modificator -> tkAbstract { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 808: // property_modificator -> tkReintroduce + case 810: // property_modificator -> tkReintroduce { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 809: // property_specifier_directives -> tkRead + case 811: // property_specifier_directives -> tkRead { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 810: // property_specifier_directives -> tkWrite + case 812: // property_specifier_directives -> tkWrite { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 811: // non_reserved -> tkName + case 813: // non_reserved -> tkName { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 812: // non_reserved -> tkNew + case 814: // non_reserved -> tkNew { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 813: // visibility_specifier -> tkInternal + case 815: // visibility_specifier -> tkInternal { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 814: // visibility_specifier -> tkPublic + case 816: // visibility_specifier -> tkPublic { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 815: // visibility_specifier -> tkProtected + case 817: // visibility_specifier -> tkProtected { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 816: // visibility_specifier -> tkPrivate + case 818: // visibility_specifier -> tkPrivate { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 817: // keyword -> visibility_specifier + case 819: // keyword -> visibility_specifier { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 818: // keyword -> tkSealed + case 820: // keyword -> tkSealed { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 819: // keyword -> tkTemplate + case 821: // keyword -> tkTemplate { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 820: // keyword -> tkOr + case 822: // keyword -> tkOr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 821: // keyword -> tkTypeOf + case 823: // keyword -> tkTypeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 822: // keyword -> tkSizeOf + case 824: // keyword -> tkSizeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 823: // keyword -> tkDefault + case 825: // keyword -> tkDefault { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 824: // keyword -> tkWhere + case 826: // keyword -> tkWhere { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 825: // keyword -> tkXor + case 827: // keyword -> tkXor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 826: // keyword -> tkAnd + case 828: // keyword -> tkAnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 827: // keyword -> tkDiv + case 829: // keyword -> tkDiv { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 828: // keyword -> tkMod + case 830: // keyword -> tkMod { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 829: // keyword -> tkShl + case 831: // keyword -> tkShl { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 830: // keyword -> tkShr + case 832: // keyword -> tkShr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 831: // keyword -> tkNot + case 833: // keyword -> tkNot { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 832: // keyword -> tkAs + case 834: // keyword -> tkAs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 833: // keyword -> tkIn + case 835: // keyword -> tkIn { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 834: // keyword -> tkIs + case 836: // keyword -> tkIs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 835: // keyword -> tkArray + case 837: // keyword -> tkArray { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 836: // keyword -> tkSequence + case 838: // keyword -> tkSequence { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 837: // keyword -> tkBegin + case 839: // keyword -> tkBegin { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 838: // keyword -> tkCase + case 840: // keyword -> tkCase { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 839: // keyword -> tkClass + case 841: // keyword -> tkClass { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 840: // keyword -> tkConst + case 842: // keyword -> tkConst { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 841: // keyword -> tkConstructor + case 843: // keyword -> tkConstructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 842: // keyword -> tkDestructor + case 844: // keyword -> tkDestructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 843: // keyword -> tkDownto + case 845: // keyword -> tkDownto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 844: // keyword -> tkDo + case 846: // keyword -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 845: // keyword -> tkElse + case 847: // keyword -> tkElse { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 846: // keyword -> tkEnd + case 848: // keyword -> tkEnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 847: // keyword -> tkExcept + case 849: // keyword -> tkExcept { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 848: // keyword -> tkFile + case 850: // keyword -> tkFile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 849: // keyword -> tkAuto + case 851: // keyword -> tkAuto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 850: // keyword -> tkFinalization + case 852: // keyword -> tkFinalization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 851: // keyword -> tkFinally + case 853: // keyword -> tkFinally { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 852: // keyword -> tkFor + case 854: // keyword -> tkFor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 853: // keyword -> tkForeach + case 855: // keyword -> tkForeach { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 854: // keyword -> tkFunction + case 856: // keyword -> tkFunction { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 855: // keyword -> tkIf + case 857: // keyword -> tkIf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 856: // keyword -> tkImplementation + case 858: // keyword -> tkImplementation { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 857: // keyword -> tkInherited + case 859: // keyword -> tkInherited { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 858: // keyword -> tkInitialization + case 860: // keyword -> tkInitialization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 859: // keyword -> tkInterface + case 861: // keyword -> tkInterface { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 860: // keyword -> tkProcedure + case 862: // keyword -> tkProcedure { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 861: // keyword -> tkProperty + case 863: // keyword -> tkProperty { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 862: // keyword -> tkRaise + case 864: // keyword -> tkRaise { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 863: // keyword -> tkRecord + case 865: // keyword -> tkRecord { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 864: // keyword -> tkRepeat + case 866: // keyword -> tkRepeat { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 865: // keyword -> tkSet + case 867: // keyword -> tkSet { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 866: // keyword -> tkTry + case 868: // keyword -> tkTry { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 867: // keyword -> tkType + case 869: // keyword -> tkType { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 868: // keyword -> tkStatic + case 870: // keyword -> tkStatic { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 869: // keyword -> tkThen + case 871: // keyword -> tkThen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 870: // keyword -> tkTo + case 872: // keyword -> tkTo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 871: // keyword -> tkUntil + case 873: // keyword -> tkUntil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 872: // keyword -> tkUses + case 874: // keyword -> tkUses { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 873: // keyword -> tkVar + case 875: // keyword -> tkVar { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 874: // keyword -> tkWhile + case 876: // keyword -> tkWhile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 875: // keyword -> tkWith + case 877: // keyword -> tkWith { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 876: // keyword -> tkNil + case 878: // keyword -> tkNil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 877: // keyword -> tkGoto + case 879: // keyword -> tkGoto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 878: // keyword -> tkOf + case 880: // keyword -> tkOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 879: // keyword -> tkLabel + case 881: // keyword -> tkLabel { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 880: // keyword -> tkProgram + case 882: // keyword -> tkProgram { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 881: // keyword -> tkUnit + case 883: // keyword -> tkUnit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 882: // keyword -> tkLibrary + case 884: // keyword -> tkLibrary { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 883: // keyword -> tkNamespace + case 885: // keyword -> tkNamespace { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 884: // keyword -> tkExternal + case 886: // keyword -> tkExternal { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 885: // keyword -> tkParams + case 887: // keyword -> tkParams { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 886: // keyword -> tkEvent + case 888: // keyword -> tkEvent { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 887: // keyword -> tkYield + case 889: // keyword -> tkYield { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 888: // keyword -> tkMatch + case 890: // keyword -> tkMatch { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 889: // keyword -> tkWhen + case 891: // keyword -> tkWhen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 890: // reserved_keyword -> tkOperator + case 892: // reserved_keyword -> tkOperator { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 891: // overload_operator -> tkMinus + case 893: // overload_operator -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 892: // overload_operator -> tkPlus + case 894: // overload_operator -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 893: // overload_operator -> tkSlash + case 895: // overload_operator -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 894: // overload_operator -> tkStar + case 896: // overload_operator -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 895: // overload_operator -> tkEqual + case 897: // overload_operator -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 896: // overload_operator -> tkGreater + case 898: // overload_operator -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 897: // overload_operator -> tkGreaterEqual + case 899: // overload_operator -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 898: // overload_operator -> tkLower + case 900: // overload_operator -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 899: // overload_operator -> tkLowerEqual + case 901: // overload_operator -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 900: // overload_operator -> tkNotEqual + case 902: // overload_operator -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 901: // overload_operator -> tkOr + case 903: // overload_operator -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 902: // overload_operator -> tkXor + case 904: // overload_operator -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 903: // overload_operator -> tkAnd + case 905: // overload_operator -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 904: // overload_operator -> tkDiv + case 906: // overload_operator -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 905: // overload_operator -> tkMod + case 907: // overload_operator -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 906: // overload_operator -> tkShl + case 908: // overload_operator -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 907: // overload_operator -> tkShr + case 909: // overload_operator -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 908: // overload_operator -> tkNot + case 910: // overload_operator -> tkNot { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 909: // overload_operator -> tkIn + case 911: // overload_operator -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 910: // overload_operator -> tkImplicit + case 912: // overload_operator -> tkImplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 911: // overload_operator -> tkExplicit + case 913: // overload_operator -> tkExplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 912: // overload_operator -> assign_operator + case 914: // overload_operator -> assign_operator { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 913: // overload_operator -> tkStarStar + case 915: // overload_operator -> tkStarStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 914: // assign_operator -> tkAssign + case 916: // assign_operator -> tkAssign { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 915: // assign_operator -> tkPlusEqual + case 917: // assign_operator -> tkPlusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 916: // assign_operator -> tkMinusEqual + case 918: // assign_operator -> tkMinusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 917: // assign_operator -> tkMultEqual + case 919: // assign_operator -> tkMultEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 918: // assign_operator -> tkDivEqual + case 920: // assign_operator -> tkDivEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 919: // func_decl_lambda -> identifier, tkArrow, lambda_function_body + case 921: // 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 920: // func_decl_lambda -> tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, + case 922: // 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 921: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkRoundClose, + case 923: // 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]); @@ -6960,7 +6976,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, + case 924: // func_decl_lambda -> tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, // tkRoundClose, lambda_type_ref_noproctype, tkArrow, // lambda_function_body { @@ -6971,7 +6987,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, + case 925: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, // full_lambda_fp_list, tkRoundClose, // lambda_type_ref_noproctype, tkArrow, lambda_function_body { @@ -6983,7 +6999,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, expr_l1, tkComma, expr_l1_list, + case 926: // func_decl_lambda -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, // lambda_type_ref, optional_full_lambda_fp_list, // tkRoundClose, rem_lambda { @@ -7045,61 +7061,61 @@ public partial class GPPGParser: ShiftReduceParser expl_func_decl_lambda + case 927: // func_decl_lambda -> expl_func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 926: // optional_full_lambda_fp_list -> /* empty */ + case 928: // optional_full_lambda_fp_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 927: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list + case 929: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 928: // rem_lambda -> lambda_type_ref_noproctype, tkArrow, lambda_function_body + case 930: // 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 929: // expl_func_decl_lambda -> tkFunction, lambda_type_ref, tkArrow, + case 931: // 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 930: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, tkRoundClose, lambda_type_ref, + case 932: // 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 931: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, + case 933: // 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 932: // expl_func_decl_lambda -> tkProcedure, tkArrow, lambda_procedure_body + case 934: // 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 933: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, tkRoundClose, tkArrow, + case 935: // 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 934: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, full_lambda_fp_list, + case 936: // 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 935: // full_lambda_fp_list -> lambda_simple_fp_sect + case 937: // 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) @@ -7119,97 +7135,97 @@ public partial class GPPGParser: ShiftReduceParser full_lambda_fp_list, tkSemiColon, lambda_simple_fp_sect + case 938: // 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 937: // lambda_simple_fp_sect -> ident_list, lambda_type_ref + case 939: // 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 938: // lambda_type_ref -> /* empty */ + case 940: // lambda_type_ref -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 939: // lambda_type_ref -> tkColon, fptype + case 941: // lambda_type_ref -> tkColon, fptype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 940: // lambda_type_ref_noproctype -> /* empty */ + case 942: // lambda_type_ref_noproctype -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 941: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype + case 943: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 942: // common_lambda_body -> compound_stmt + case 944: // common_lambda_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 943: // common_lambda_body -> if_stmt + case 945: // common_lambda_body -> if_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 944: // common_lambda_body -> while_stmt + case 946: // common_lambda_body -> while_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 945: // common_lambda_body -> repeat_stmt + case 947: // common_lambda_body -> repeat_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 946: // common_lambda_body -> for_stmt + case 948: // common_lambda_body -> for_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 947: // common_lambda_body -> foreach_stmt + case 949: // common_lambda_body -> foreach_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 948: // common_lambda_body -> loop_stmt + case 950: // common_lambda_body -> loop_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 949: // common_lambda_body -> case_stmt + case 951: // common_lambda_body -> case_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 950: // common_lambda_body -> try_stmt + case 952: // common_lambda_body -> try_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 951: // common_lambda_body -> lock_stmt + case 953: // common_lambda_body -> lock_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 952: // common_lambda_body -> raise_stmt + case 954: // common_lambda_body -> raise_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 953: // common_lambda_body -> yield_stmt + case 955: // common_lambda_body -> yield_stmt { parsertools.AddErrorFromResource("YIELD_STATEMENT_CANNOT_BE_USED_IN_LAMBDA_BODY", CurrentLocationSpan); } break; - case 954: // lambda_function_body -> expr_l1_for_lambda + case 956: // lambda_function_body -> expr_l1_for_lambda { var id = SyntaxVisitors.ExprHasNameVisitor.HasName(ValueStack[ValueStack.Depth-1].ex, "Result"); if (id != null) @@ -7221,22 +7237,22 @@ public partial class GPPGParser: ShiftReduceParser common_lambda_body + case 957: // lambda_function_body -> common_lambda_body { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 956: // lambda_procedure_body -> proc_call + case 958: // lambda_procedure_body -> proc_call { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 957: // lambda_procedure_body -> assignment + case 959: // lambda_procedure_body -> assignment { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 958: // lambda_procedure_body -> common_lambda_body + case 960: // 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 11fca10d0..947144bd4 100644 --- a/Parsers/PascalABCParserNewSaushkin/PABC.ymc +++ b/Parsers/PascalABCParserNewSaushkin/PABC.ymc @@ -263,6 +263,9 @@ script= + + + diff --git a/TreeConverter/TreeConversion/convertion_data_and_alghoritms.cs b/TreeConverter/TreeConversion/convertion_data_and_alghoritms.cs index 2fa8a7f5a..8d57fec28 100644 --- a/TreeConverter/TreeConversion/convertion_data_and_alghoritms.cs +++ b/TreeConverter/TreeConversion/convertion_data_and_alghoritms.cs @@ -647,7 +647,7 @@ namespace PascalABCCompiler.TreeConverter //TODO: А если наследование? - possible_type_convertions pct =type_table.get_convertions(en.type,to); + possible_type_convertions pct = type_table.get_convertions(en.type,to); if (pct.second!=null) { diff --git a/TreeConverter/TreeRealization/type_table.cs b/TreeConverter/TreeRealization/type_table.cs index 35070a2ea..d2397bd2d 100644 --- a/TreeConverter/TreeRealization/type_table.cs +++ b/TreeConverter/TreeRealization/type_table.cs @@ -904,21 +904,22 @@ namespace PascalABCCompiler.TreeRealization wrapped_type ctn_to = to as wrapped_type; wrapped_type ctn_from = from as wrapped_type; + function_node fnode1 = null; // SSM вынес чтобы посмотреть значения 02.06.20 + function_node fnode1_1 = null; if (ctn_to != null) { - function_node fnode1 = null; fnode1 = ctn_to.get_implicit_conversion_from(from); add_conversion(ret, fnode1, from, to); if (ret.second != null) { return ret; } - fnode1 = null; + fnode1_1 = null; if (!is_implicit) { - fnode1 = ctn_to.get_explicit_conversion_from(from); + fnode1_1 = ctn_to.get_explicit_conversion_from(from); } - add_conversion(ret, fnode1, from, to); + add_conversion(ret, fnode1_1, from, to); if (ret.second != null) { return ret; @@ -931,14 +932,15 @@ namespace PascalABCCompiler.TreeRealization add_conversion(ret, fnode2, from, to); if (ret.second != null) { + var a = ret.first == ret.second; return ret; } - fnode2 = null; + function_node fnode2_1 = null; if (!is_implicit) { - fnode2 = ctn_from.get_explicit_conversion_to(to); + fnode2_1 = ctn_from.get_explicit_conversion_to(to); } - add_conversion(ret, fnode2, from, to); + add_conversion(ret, fnode2_1, from, to); if (ret.second != null) { return ret; diff --git a/bin/Lib/GraphWPF.pas b/bin/Lib/GraphWPF.pas index 31c3126dc..1e298fde5 100644 --- a/bin/Lib/GraphWPF.pas +++ b/bin/Lib/GraphWPF.pas @@ -722,15 +722,18 @@ begin Result := visual.RenderOpen(); end; +procedure HostToRenderBitmap; +begin + rtBmap.Render(host); + rtbmapIsCleared := False; + host.Children.Clear; +end; + procedure ReleaseDC(dc: DrawingContext); begin dc.Close; if host.Children.Count > 1000 then - begin - rtBmap.Render(host); - rtbmapIsCleared := False; - host.Children.Clear; - end; + HostToRenderBitmap end; procedure FastDraw(d: DrawingContext->()); @@ -1612,6 +1615,7 @@ function GraphWindowType.GetHeight := InvokeReal(GraphWindowTypeGetHeightP); procedure SaveWindowP(canvas: FrameworkElement; filename: string); begin + HostToRenderBitmap; var (scalex,scaley) := ScaleToDevice; var (dpiX,dpiY) := (scalex * 96, scaley * 96); @@ -1625,7 +1629,9 @@ begin var mm := (canvas as MyVisualHost).RenderTransform.Value; mm.Invert; r.Transform(mm); - dc.DrawRectangle(Brush.BrushConstruct,nil,r); + dc.DrawRectangle(Brushes.White,nil,r); + var rr := Rect(0,0,rtbmap.Width,rtbmap.Height); + dc.DrawImage(rtbmap,rr); dc.Close; (canvas as MyVisualHost).children.Insert(0,myvis); diff --git a/bin/Lib/GraphWPFBase.pas b/bin/Lib/GraphWPFBase.pas index 7280a143e..5457f07e1 100644 --- a/bin/Lib/GraphWPFBase.pas +++ b/bin/Lib/GraphWPFBase.pas @@ -278,10 +278,10 @@ function operator implicit(Self: (integer, real)): Size; extensionmethod := new function operator implicit(Self: (real, integer)): Size; extensionmethod := new Size(Self[0], Self[1]); function operator implicit(Self: (real, real)): Size; extensionmethod := new Size(Self[0], Self[1]); -//function operator implicit(Self: array of (real, real)): array of Point; extensionmethod := -// Self.Select(t->new Point(t[0],t[1])).ToArray; -//function operator implicit(Self: array of (integer, integer)): array of Point; extensionmethod := -// Self.Select(t->new Point(t[0],t[1])).ToArray; +function operator implicit(Self: array of (real, real)): array of Point; extensionmethod := + Self.Select(t->new Point(t[0],t[1])).ToArray; +function operator implicit(Self: array of (integer, integer)): array of Point; extensionmethod := + Self.Select(t->new Point(t[0],t[1])).ToArray; procedure SetLeft(Self: UIElement; l: real); extensionmethod := Canvas.SetLeft(Self,l);