diff --git a/Compiler/Compiler.cs b/Compiler/Compiler.cs index 97d073bc3..d7704e271 100644 --- a/Compiler/Compiler.cs +++ b/Compiler/Compiler.cs @@ -911,12 +911,12 @@ namespace PascalABCCompiler public CodeGenerators.Controller CodeGeneratorsController = null; //public LLVMConverter.Controller LLVMCodeGeneratorsController = null; //public PascalToCppConverter.Controller PABCToCppCodeGeneratorsController = null; - private SyntaxTree.unit_or_namespace CurrentSyntaxUnit; + public SyntaxTree.unit_or_namespace CurrentSyntaxUnit; private List UnitsToCompile = new List(); public Hashtable RecompileList = new Hashtable(StringComparer.OrdinalIgnoreCase); private PascalABCCompiler.TreeRealization.unit_node_list Units; private Hashtable CycleUnits = new Hashtable(); - private CompilationUnit CurrentCompilationUnit = null; + public CompilationUnit CurrentCompilationUnit = null; private CompilationUnit FirstCompilationUnit = null; private bool PCUReadersAndWritersClosed; public int beginOffset; diff --git a/Compiler/ICompiler.cs b/Compiler/ICompiler.cs index 72a6f90ad..9b82afdf5 100644 --- a/Compiler/ICompiler.cs +++ b/Compiler/ICompiler.cs @@ -32,7 +32,12 @@ namespace PascalABCCompiler { get; } - + + /*SyntaxTree.syntax_tree_node SyntaxTree + { + get; + }*/ + uint LinesCompiled { get; diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 0f6044e50..2a790e134 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 = "7"; public const string Build = "1"; - public const string Revision = "2683"; + public const string Revision = "2692"; 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 d54906200..85b697fd5 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%MINOR%=7 -%REVISION%=2683 %COREVERSION%=1 +%REVISION%=2692 +%MINOR%=7 %MAJOR%=3 diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index 0204c8afd..48e1b28a7 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: 27.08.2020 0:13:56 +// DateTime: 14.09.2020 20:46:21 // UserName: ????????? // GPLEX input file // GPLEX frame file diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y index 046413e29..d579322ee 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y @@ -59,7 +59,7 @@ %type attribute_declarations %type ot_visibility_specifier %type one_attribute attribute_variable -%type const_factor const_variable_2 const_term const_variable literal_or_number unsigned_number variable_or_literal_or_number +%type const_factor const_factor_without_unary_op const_variable_2 const_term const_variable literal_or_number unsigned_number variable_or_literal_or_number %type program_block %type optional_var class_attribute class_attributes class_attributes1 %type member_list_section optional_component_list_seq_end @@ -82,7 +82,7 @@ %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 const_simple_expr term term1 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 factor_without_unary_op 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*/ @@ -807,7 +807,12 @@ as_is_constexpr ; power_constexpr - : const_factor tkStarStar const_factor { $$ = new bin_expr($1, $3, $2.type, @$); } + : const_factor_without_unary_op tkStarStar const_factor + { $$ = new bin_expr($1, $3, $2.type, @$); } + | const_factor_without_unary_op tkStarStar power_constexpr + { $$ = new bin_expr($1,$3,($2).type, @$); } + | sign power_constexpr + { $$ = new un_expr($2, $1.type, @$); } ; const_term @@ -840,6 +845,13 @@ const_mulop { $$ = $1; } ; +const_factor_without_unary_op + : const_variable + { $$ = $1; } + | tkRoundOpen const_expr tkRoundClose + { $$ = $2; } + ; + const_factor : const_variable { $$ = $1; } @@ -3858,14 +3870,13 @@ is_type_expr } ; -simple_term - : factor - { $$ = $1; } - ; - power_expr - : simple_term tkStarStar factor + : factor_without_unary_op tkStarStar factor { $$ = new bin_expr($1,$3,($2).type, @$); } + | factor_without_unary_op tkStarStar power_expr + { $$ = new bin_expr($1,$3,($2).type, @$); } + | sign power_expr + { $$ = new un_expr($2, $1.type, @$); } ; term @@ -3924,6 +3935,13 @@ tuple } ; +factor_without_unary_op + : literal_or_number + { $$ = $1; } + | var_reference + { $$ = $1; } + ; + factor : tkNil { @@ -3965,8 +3983,7 @@ factor } // ìîæíî ñäåëàòü âû÷èñëåíèå êîíñòàíòû ñ âìîíòèðîâàííûì ìèíóñîì } - - $$ = new un_expr($2, $1.type, @$); + $$ = new un_expr($2, $1.type, @$); } | tkDeref factor { diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index 17e17f739..41afb6194 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -2,7 +2,7 @@ // GPPG version 1.3.6 // Machine: DESKTOP-G8V08V4 -// DateTime: 27.08.2020 0:13:56 +// DateTime: 14.09.2020 20:46:22 // UserName: ????????? // Input file @@ -76,74 +76,75 @@ public partial class GPPGParser: ShiftReduceParser aliasses; #pragma warning restore 649 - private static Rule[] rules = new Rule[976]; - private static State[] states = new State[1609]; + private static Rule[] rules = new Rule[983]; + private static State[] states = new State[1622]; 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", - "const_factor", "const_variable_2", "const_term", "const_variable", "literal_or_number", - "unsigned_number", "variable_or_literal_or_number", "program_block", "optional_var", - "class_attribute", "class_attributes", "class_attributes1", "member_list_section", - "optional_component_list_seq_end", "const_decl", "only_const_decl", "const_decl_sect", - "object_type", "record_type", "member_list", "method_decl_list", "field_or_const_definition_list", - "case_stmt", "case_list", "program_decl_sect_list", "int_decl_sect_list1", - "inclass_decl_sect_list1", "interface_decl_sect_list", "decl_sect_list", - "decl_sect_list1", "inclass_decl_sect_list", "field_or_const_definition", - "abc_decl_sect", "decl_sect", "int_decl_sect", "type_decl", "simple_type_decl", - "simple_field_or_const_definition", "res_str_decl_sect", "method_decl_withattr", - "method_or_property_decl", "property_definition", "fp_sect", "default_expr", - "tuple", "expr_as_stmt", "exception_block", "external_block", "exception_handler", - "exception_handler_list", "exception_identifier", "typed_const_list1", - "typed_const_list", "optional_expr_list", "elem_list", "optional_expr_list_with_bracket", - "expr_list", "const_elem_list1", "case_label_list", "const_elem_list", - "optional_const_func_expr_list", "elem_list1", "enumeration_id", "expr_l1_list", - "enumeration_id_list", "const_simple_expr", "term", "term1", "simple_term", + "const_factor", "const_factor_without_unary_op", "const_variable_2", "const_term", + "const_variable", "literal_or_number", "unsigned_number", "variable_or_literal_or_number", + "program_block", "optional_var", "class_attribute", "class_attributes", + "class_attributes1", "member_list_section", "optional_component_list_seq_end", + "const_decl", "only_const_decl", "const_decl_sect", "object_type", "record_type", + "member_list", "method_decl_list", "field_or_const_definition_list", "case_stmt", + "case_list", "program_decl_sect_list", "int_decl_sect_list1", "inclass_decl_sect_list1", + "interface_decl_sect_list", "decl_sect_list", "decl_sect_list1", "inclass_decl_sect_list", + "field_or_const_definition", "abc_decl_sect", "decl_sect", "int_decl_sect", + "type_decl", "simple_type_decl", "simple_field_or_const_definition", "res_str_decl_sect", + "method_decl_withattr", "method_or_property_decl", "property_definition", + "fp_sect", "default_expr", "tuple", "expr_as_stmt", "exception_block", + "external_block", "exception_handler", "exception_handler_list", "exception_identifier", + "typed_const_list1", "typed_const_list", "optional_expr_list", "elem_list", + "optional_expr_list_with_bracket", "expr_list", "const_elem_list1", "case_label_list", + "const_elem_list", "optional_const_func_expr_list", "elem_list1", "enumeration_id", + "expr_l1_list", "enumeration_id_list", "const_simple_expr", "term", "term1", "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", "external_directive_ident", - "init_const_expr", "case_label", "variable", "var_reference", "optional_read_expr", - "simple_expr_or_nothing", "var_question_point", "expr_l1_for_question_expr", - "expr_l1_for_new_question_expr", "for_cycle_type", "format_expr", "format_const_expr", - "const_expr_or_nothing", "foreach_stmt", "for_stmt", "loop_stmt", "yield_stmt", - "yield_sequence_stmt", "fp_list", "fp_sect_list", "file_type", "sequence_type", - "var_address", "goto_stmt", "func_name_ident", "param_name", "const_field_name", - "func_name_with_template_args", "identifier_or_keyword", "unit_name", "exception_variable", - "const_name", "func_meth_name_ident", "label_name", "type_decl_identifier", - "template_identifier_with_equal", "program_param", "identifier", "identifier_keyword_operatorname", - "func_class_name_ident", "visibility_specifier", "property_specifier_directives", - "non_reserved", "if_stmt", "initialization_part", "template_arguments", - "label_list", "ident_or_keyword_pointseparator_list", "ident_list", "param_name_list", - "inherited_message", "implementation_part", "interface_part", "abc_interface_part", - "simple_type_list", "literal", "one_literal", "literal_list", "label_decl_sect", - "lock_stmt", "func_name", "proc_name", "optional_proc_name", "qualified_identifier", - "new_expr", "allowable_expr_as_stmt", "parts", "inclass_block", "block", - "proc_func_external_block", "exception_class_type_identifier", "simple_type_identifier", - "base_class_name", "base_classes_names_list", "optional_base_classes", - "one_compiler_directive", "optional_head_compiler_directives", "head_compiler_directives", - "program_heading_2", "optional_tk_point", "program_param_list", "optional_semicolon", - "operator_name_ident", "const_relop", "const_addop", "assign_operator", - "const_mulop", "relop", "addop", "mulop", "sign", "overload_operator", - "typecast_op", "property_specifiers", "write_property_specifiers", "read_property_specifiers", - "array_defaultproperty", "meth_modificators", "optional_method_modificators", - "optional_method_modificators1", "meth_modificator", "property_modificator", - "optional_property_initialization", "proc_call", "proc_func_constr_destr_decl", - "proc_func_decl", "inclass_proc_func_decl", "inclass_proc_func_decl_noclass", - "constr_destr_decl", "inclass_constr_destr_decl", "method_decl", "proc_func_constr_destr_decl_with_attr", - "proc_func_decl_noclass", "method_header", "proc_type_decl", "procedural_type_kind", - "proc_header", "procedural_type", "constr_destr_header", "proc_func_header", - "func_header", "method_procfunc_header", "int_func_header", "int_proc_header", - "property_interface", "program_file", "program_header", "parameter_decl", - "parameter_decl_list", "property_parameter_list", "const_set", "question_expr", - "question_constexpr", "new_question_expr", "record_const", "const_field_list_1", - "const_field_list", "const_field", "repeat_stmt", "raise_stmt", "pointer_type", - "attribute_declaration", "one_or_some_attribute", "stmt_list", "else_case", - "exception_block_else_branch", "compound_stmt", "string_type", "sizeof_expr", - "simple_property_definition", "stmt_or_expression", "unlabelled_stmt", - "stmt", "case_item", "set_type", "as_is_expr", "as_is_constexpr", "is_type_expr", - "as_expr", "power_expr", "power_constexpr", "unsized_array_type", "simple_type_or_", - "simple_type", "simple_type_question", "foreach_stmt_ident_dype_opt", "fptype", - "type_ref", "fptype_noproctype", "array_type", "template_param", "template_empty_param", + "array_const", "factor", "factor_without_unary_op", "relop_expr", "expr_dq", + "expr_l1", "expr_l1_func_decl_lambda", "expr_l1_for_lambda", "simple_expr", + "range_term", "range_factor", "external_directive_ident", "init_const_expr", + "case_label", "variable", "var_reference", "optional_read_expr", "simple_expr_or_nothing", + "var_question_point", "expr_l1_for_question_expr", "expr_l1_for_new_question_expr", + "for_cycle_type", "format_expr", "format_const_expr", "const_expr_or_nothing", + "foreach_stmt", "for_stmt", "loop_stmt", "yield_stmt", "yield_sequence_stmt", + "fp_list", "fp_sect_list", "file_type", "sequence_type", "var_address", + "goto_stmt", "func_name_ident", "param_name", "const_field_name", "func_name_with_template_args", + "identifier_or_keyword", "unit_name", "exception_variable", "const_name", + "func_meth_name_ident", "label_name", "type_decl_identifier", "template_identifier_with_equal", + "program_param", "identifier", "identifier_keyword_operatorname", "func_class_name_ident", + "visibility_specifier", "property_specifier_directives", "non_reserved", + "if_stmt", "initialization_part", "template_arguments", "label_list", "ident_or_keyword_pointseparator_list", + "ident_list", "param_name_list", "inherited_message", "implementation_part", + "interface_part", "abc_interface_part", "simple_type_list", "literal", + "one_literal", "literal_list", "label_decl_sect", "lock_stmt", "func_name", + "proc_name", "optional_proc_name", "qualified_identifier", "new_expr", + "allowable_expr_as_stmt", "parts", "inclass_block", "block", "proc_func_external_block", + "exception_class_type_identifier", "simple_type_identifier", "base_class_name", + "base_classes_names_list", "optional_base_classes", "one_compiler_directive", + "optional_head_compiler_directives", "head_compiler_directives", "program_heading_2", + "optional_tk_point", "program_param_list", "optional_semicolon", "operator_name_ident", + "const_relop", "const_addop", "assign_operator", "const_mulop", "relop", + "addop", "mulop", "sign", "overload_operator", "typecast_op", "property_specifiers", + "write_property_specifiers", "read_property_specifiers", "array_defaultproperty", + "meth_modificators", "optional_method_modificators", "optional_method_modificators1", + "meth_modificator", "property_modificator", "optional_property_initialization", + "proc_call", "proc_func_constr_destr_decl", "proc_func_decl", "inclass_proc_func_decl", + "inclass_proc_func_decl_noclass", "constr_destr_decl", "inclass_constr_destr_decl", + "method_decl", "proc_func_constr_destr_decl_with_attr", "proc_func_decl_noclass", + "method_header", "proc_type_decl", "procedural_type_kind", "proc_header", + "procedural_type", "constr_destr_header", "proc_func_header", "func_header", + "method_procfunc_header", "int_func_header", "int_proc_header", "property_interface", + "program_file", "program_header", "parameter_decl", "parameter_decl_list", + "property_parameter_list", "const_set", "question_expr", "question_constexpr", + "new_question_expr", "record_const", "const_field_list_1", "const_field_list", + "const_field", "repeat_stmt", "raise_stmt", "pointer_type", "attribute_declaration", + "one_or_some_attribute", "stmt_list", "else_case", "exception_block_else_branch", + "compound_stmt", "string_type", "sizeof_expr", "simple_property_definition", + "stmt_or_expression", "unlabelled_stmt", "stmt", "case_item", "set_type", + "as_is_expr", "as_is_constexpr", "is_type_expr", "as_expr", "power_expr", + "power_constexpr", "unsized_array_type", "simple_type_or_", "simple_type", + "simple_type_question", "foreach_stmt_ident_dype_opt", "fptype", "type_ref", + "fptype_noproctype", "array_type", "template_param", "template_empty_param", "structured_type", "unpacked_structured_type", "empty_template_type_reference", "simple_or_template_type_reference", "type_ref_or_secific", "for_stmt_decl_or_assign", "type_decl_type", "type_ref_and_secific_list", "type_decl_sect", "try_handler", @@ -167,2591 +168,2611 @@ public partial class GPPGParser: ShiftReduceParser const_factor, tkStarStar, const_factor + case 133: // power_constexpr -> const_factor_without_unary_op, tkStarStar, const_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 134: // const_term -> const_factor -{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } - break; - case 135: // const_term -> as_is_constexpr -{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } - break; - case 136: // const_term -> power_constexpr -{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } - break; - case 137: // const_term -> const_term, const_mulop, const_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 138: // const_term -> const_term, const_mulop, power_constexpr + case 134: // power_constexpr -> const_factor_without_unary_op, tkStarStar, power_constexpr { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].ex,(ValueStack[ValueStack.Depth-2].op).type, CurrentLocationSpan); } break; - case 139: // const_mulop -> tkStar -{ CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } + case 135: // power_constexpr -> sign, power_constexpr +{ CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 140: // const_mulop -> tkSlash -{ CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } - break; - case 141: // const_mulop -> tkDiv -{ CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } - break; - case 142: // const_mulop -> tkMod -{ CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } - break; - case 143: // const_mulop -> tkShl -{ CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } - break; - case 144: // const_mulop -> tkShr -{ CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } - break; - case 145: // const_mulop -> tkAnd -{ CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } - break; - case 146: // const_factor -> const_variable + case 136: // const_term -> const_factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 147: // const_factor -> const_set + case 137: // const_term -> as_is_constexpr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 148: // const_factor -> tkNil + case 138: // const_term -> power_constexpr +{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } + break; + case 139: // const_term -> const_term, const_mulop, const_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 140: // const_term -> const_term, const_mulop, power_constexpr +{ CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].ex,(ValueStack[ValueStack.Depth-2].op).type, CurrentLocationSpan); } + break; + case 141: // const_mulop -> tkStar +{ CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } + break; + case 142: // const_mulop -> tkSlash +{ CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } + break; + case 143: // const_mulop -> tkDiv +{ CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } + break; + case 144: // const_mulop -> tkMod +{ CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } + break; + case 145: // const_mulop -> tkShl +{ CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } + break; + case 146: // const_mulop -> tkShr +{ CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } + break; + case 147: // const_mulop -> tkAnd +{ CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } + break; + case 148: // const_factor_without_unary_op -> const_variable +{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } + break; + case 149: // const_factor_without_unary_op -> tkRoundOpen, const_expr, tkRoundClose +{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-2].ex; } + break; + case 150: // const_factor -> const_variable +{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } + break; + case 151: // const_factor -> const_set +{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } + break; + case 152: // const_factor -> tkNil { CurrentSemanticValue.ex = new nil_const(); CurrentSemanticValue.ex.source_context = CurrentLocationSpan; } break; - case 149: // const_factor -> tkAddressOf, const_factor + case 153: // const_factor -> tkAddressOf, const_factor { CurrentSemanticValue.ex = new get_address(ValueStack[ValueStack.Depth-1].ex as addressed_value, CurrentLocationSpan); } break; - case 150: // const_factor -> tkRoundOpen, const_expr, tkRoundClose + case 154: // const_factor -> tkRoundOpen, const_expr, tkRoundClose { CurrentSemanticValue.ex = new bracket_expr(ValueStack[ValueStack.Depth-2].ex, CurrentLocationSpan); } break; - case 151: // const_factor -> tkNot, const_factor + case 155: // const_factor -> tkNot, const_factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 152: // const_factor -> sign, const_factor + case 156: // const_factor -> sign, const_factor { // ������ ��������� ����� �������� if (ValueStack[ValueStack.Depth-2].op.type == Operators.Minus) @@ -3440,56 +3473,56 @@ public partial class GPPGParser: ShiftReduceParser new_expr + case 157: // const_factor -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 154: // const_set -> tkSquareOpen, elem_list, tkSquareClose + case 158: // const_set -> tkSquareOpen, elem_list, tkSquareClose { CurrentSemanticValue.ex = new pascal_set_constant(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 155: // const_set -> tkVertParen, elem_list, tkVertParen + case 159: // const_set -> tkVertParen, elem_list, tkVertParen { CurrentSemanticValue.ex = new array_const_new(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 156: // sign -> tkPlus + case 160: // sign -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 157: // sign -> tkMinus + case 161: // sign -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 158: // const_variable -> identifier + case 162: // const_variable -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 159: // const_variable -> literal + case 163: // const_variable -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 160: // const_variable -> unsigned_number + case 164: // const_variable -> unsigned_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 161: // const_variable -> tkInherited, identifier + case 165: // const_variable -> tkInherited, identifier { CurrentSemanticValue.ex = new inherited_ident(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 162: // const_variable -> sizeof_expr + case 166: // const_variable -> sizeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 163: // const_variable -> typeof_expr + case 167: // const_variable -> typeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 164: // const_variable -> const_variable, const_variable_2 + case 168: // const_variable -> const_variable, const_variable_2 { CurrentSemanticValue.ex = NewConstVariable(ValueStack[ValueStack.Depth-2].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 165: // const_variable -> const_variable, tkAmpersend, template_type_params + case 169: // const_variable -> const_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 166: // const_variable -> const_variable, tkSquareOpen, format_const_expr, + case 170: // const_variable -> const_variable, tkSquareOpen, format_const_expr, // tkSquareClose { var fe = ValueStack[ValueStack.Depth-2].ex as format_expr; @@ -3503,196 +3536,196 @@ public partial class GPPGParser: ShiftReduceParser tkPoint, identifier_or_keyword + case 171: // const_variable_2 -> tkPoint, identifier_or_keyword { CurrentSemanticValue.ex = new dot_node(null, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan); } break; - case 168: // const_variable_2 -> tkDeref + case 172: // const_variable_2 -> tkDeref { CurrentSemanticValue.ex = new roof_dereference(); CurrentSemanticValue.ex.source_context = CurrentLocationSpan; } break; - case 169: // const_variable_2 -> tkRoundOpen, optional_const_func_expr_list, tkRoundClose + case 173: // const_variable_2 -> tkRoundOpen, optional_const_func_expr_list, tkRoundClose { CurrentSemanticValue.ex = new method_call(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 170: // const_variable_2 -> tkSquareOpen, const_elem_list, tkSquareClose + case 174: // const_variable_2 -> tkSquareOpen, const_elem_list, tkSquareClose { CurrentSemanticValue.ex = new indexer(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 171: // optional_const_func_expr_list -> expr_list + case 175: // optional_const_func_expr_list -> expr_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 172: // optional_const_func_expr_list -> /* empty */ + case 176: // optional_const_func_expr_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 173: // const_elem_list -> const_elem_list1 + case 177: // const_elem_list -> const_elem_list1 { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 175: // const_elem_list1 -> const_elem + case 179: // const_elem_list1 -> const_elem { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 176: // const_elem_list1 -> const_elem_list1, tkComma, const_elem + case 180: // const_elem_list1 -> const_elem_list1, tkComma, const_elem { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as expression_list).Add(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 177: // const_elem -> const_expr + case 181: // const_elem -> const_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 178: // const_elem -> const_expr, tkDotDot, const_expr + case 182: // const_elem -> const_expr, tkDotDot, const_expr { CurrentSemanticValue.ex = new diapason_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 179: // unsigned_number -> tkInteger + case 183: // unsigned_number -> tkInteger { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 180: // unsigned_number -> tkHex + case 184: // unsigned_number -> tkHex { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 181: // unsigned_number -> tkFloat + case 185: // unsigned_number -> tkFloat { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 182: // typed_const -> const_expr + case 186: // typed_const -> const_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 183: // typed_const -> array_const + case 187: // typed_const -> array_const { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 184: // typed_const -> record_const + case 188: // typed_const -> record_const { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 185: // array_const -> tkRoundOpen, typed_const_list, tkRoundClose + case 189: // array_const -> tkRoundOpen, typed_const_list, tkRoundClose { CurrentSemanticValue.ex = new array_const(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 187: // typed_const_list -> typed_const_list1 + case 191: // typed_const_list -> typed_const_list1 { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 188: // typed_const_list1 -> typed_const_plus + case 192: // typed_const_list1 -> typed_const_plus { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 189: // typed_const_list1 -> typed_const_list1, tkComma, typed_const_plus + case 193: // typed_const_list1 -> typed_const_list1, tkComma, typed_const_plus { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as expression_list).Add(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 190: // record_const -> tkRoundOpen, const_field_list, tkRoundClose + case 194: // record_const -> tkRoundOpen, const_field_list, tkRoundClose { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-2].ex; CurrentSemanticValue.ex.source_context = CurrentLocationSpan; } break; - case 191: // const_field_list -> const_field_list_1 + case 195: // const_field_list -> const_field_list_1 { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 192: // const_field_list -> const_field_list_1, tkSemiColon + case 196: // const_field_list -> const_field_list_1, tkSemiColon { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-2].ex; } break; - case 193: // const_field_list_1 -> const_field + case 197: // const_field_list_1 -> const_field { CurrentSemanticValue.ex = new record_const(ValueStack[ValueStack.Depth-1].stn as record_const_definition, CurrentLocationSpan); } break; - case 194: // const_field_list_1 -> const_field_list_1, tkSemiColon, const_field + case 198: // const_field_list_1 -> const_field_list_1, tkSemiColon, const_field { CurrentSemanticValue.ex = (ValueStack[ValueStack.Depth-3].ex as record_const).Add(ValueStack[ValueStack.Depth-1].stn as record_const_definition, CurrentLocationSpan); } break; - case 195: // const_field -> const_field_name, tkColon, typed_const + case 199: // const_field -> const_field_name, tkColon, typed_const { CurrentSemanticValue.stn = new record_const_definition(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 196: // const_field_name -> identifier + case 200: // const_field_name -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 197: // type_decl -> attribute_declarations, simple_type_decl + case 201: // type_decl -> attribute_declarations, simple_type_decl { (ValueStack[ValueStack.Depth-1].stn as declaration).attributes = ValueStack[ValueStack.Depth-2].stn as attribute_list; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; CurrentSemanticValue.stn.source_context = LocationStack[LocationStack.Depth-1]; } break; - case 198: // attribute_declarations -> attribute_declaration + case 202: // attribute_declarations -> attribute_declaration { CurrentSemanticValue.stn = new attribute_list(ValueStack[ValueStack.Depth-1].stn as simple_attribute_list, CurrentLocationSpan); } break; - case 199: // attribute_declarations -> attribute_declarations, attribute_declaration + case 203: // attribute_declarations -> attribute_declarations, attribute_declaration { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-2].stn as attribute_list).Add(ValueStack[ValueStack.Depth-1].stn as simple_attribute_list, CurrentLocationSpan); } break; - case 200: // attribute_declarations -> /* empty */ + case 204: // attribute_declarations -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 201: // attribute_declaration -> tkSquareOpen, one_or_some_attribute, tkSquareClose + case 205: // attribute_declaration -> tkSquareOpen, one_or_some_attribute, tkSquareClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 202: // one_or_some_attribute -> one_attribute + case 206: // one_or_some_attribute -> one_attribute { CurrentSemanticValue.stn = new simple_attribute_list(ValueStack[ValueStack.Depth-1].stn as attribute, CurrentLocationSpan); } break; - case 203: // one_or_some_attribute -> one_or_some_attribute, tkComma, one_attribute + case 207: // one_or_some_attribute -> one_or_some_attribute, tkComma, one_attribute { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as simple_attribute_list).Add(ValueStack[ValueStack.Depth-1].stn as attribute, CurrentLocationSpan); } break; - case 204: // one_attribute -> attribute_variable + case 208: // one_attribute -> attribute_variable { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 205: // one_attribute -> identifier, tkColon, attribute_variable + case 209: // one_attribute -> identifier, tkColon, attribute_variable { (ValueStack[ValueStack.Depth-1].stn as attribute).qualifier = ValueStack[ValueStack.Depth-3].id; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 206: // simple_type_decl -> type_decl_identifier, tkEqual, type_decl_type, tkSemiColon + case 210: // simple_type_decl -> type_decl_identifier, tkEqual, type_decl_type, tkSemiColon { CurrentSemanticValue.stn = new type_declaration(ValueStack[ValueStack.Depth-4].id, ValueStack[ValueStack.Depth-2].td, CurrentLocationSpan); } break; - case 207: // simple_type_decl -> template_identifier_with_equal, type_decl_type, tkSemiColon + case 211: // simple_type_decl -> template_identifier_with_equal, type_decl_type, tkSemiColon { CurrentSemanticValue.stn = new type_declaration(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-2].td, CurrentLocationSpan); } break; - case 208: // type_decl_identifier -> identifier + case 212: // type_decl_identifier -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 209: // type_decl_identifier -> identifier, template_arguments + case 213: // type_decl_identifier -> identifier, template_arguments { CurrentSemanticValue.id = new template_type_name(ValueStack[ValueStack.Depth-2].id.name, ValueStack[ValueStack.Depth-1].stn as ident_list, CurrentLocationSpan); } break; - case 210: // template_identifier_with_equal -> identifier, tkLower, ident_list, + case 214: // template_identifier_with_equal -> identifier, tkLower, ident_list, // tkGreaterEqual { CurrentSemanticValue.id = new template_type_name(ValueStack[ValueStack.Depth-4].id.name, ValueStack[ValueStack.Depth-2].stn as ident_list, CurrentLocationSpan); } break; - case 211: // type_decl_type -> type_ref + case 215: // type_decl_type -> type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 212: // type_decl_type -> object_type + case 216: // type_decl_type -> object_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 213: // simple_type_question -> simple_type, tkQuestion + case 217: // simple_type_question -> simple_type, tkQuestion { if (parsertools.build_tree_for_formatter) { @@ -3707,7 +3740,7 @@ public partial class GPPGParser: ShiftReduceParser template_type, tkQuestion + case 218: // simple_type_question -> template_type, tkQuestion { if (parsertools.build_tree_for_formatter) { @@ -3722,39 +3755,39 @@ public partial class GPPGParser: ShiftReduceParser simple_type + case 219: // type_ref -> simple_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 216: // type_ref -> simple_type_question + case 220: // type_ref -> simple_type_question { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 217: // type_ref -> string_type + case 221: // type_ref -> string_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 218: // type_ref -> pointer_type + case 222: // type_ref -> pointer_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 219: // type_ref -> structured_type + case 223: // type_ref -> structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 220: // type_ref -> procedural_type + case 224: // type_ref -> procedural_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 221: // type_ref -> template_type + case 225: // type_ref -> template_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 222: // template_type -> simple_type_identifier, template_type_params + case 226: // template_type -> simple_type_identifier, template_type_params { CurrentSemanticValue.td = new template_type_reference(ValueStack[ValueStack.Depth-2].td as named_type_reference, ValueStack[ValueStack.Depth-1].stn as template_param_list, CurrentLocationSpan); } break; - case 223: // template_type_params -> tkLower, template_param_list, tkGreater + case 227: // template_type_params -> tkLower, template_param_list, tkGreater { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 224: // template_type_empty_params -> tkNotEqual + case 228: // template_type_empty_params -> tkNotEqual { var ntr = new named_type_reference(new ident(""), CurrentLocationSpan); @@ -3762,42 +3795,42 @@ public partial class GPPGParser: ShiftReduceParser tkLower, template_empty_param_list, tkGreater + case 229: // template_type_empty_params -> tkLower, template_empty_param_list, tkGreater { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 226: // template_param_list -> template_param + case 230: // template_param_list -> template_param { CurrentSemanticValue.stn = new template_param_list(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 227: // template_param_list -> template_param_list, tkComma, template_param + case 231: // template_param_list -> template_param_list, tkComma, template_param { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as template_param_list).Add(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 228: // template_empty_param_list -> template_empty_param + case 232: // template_empty_param_list -> template_empty_param { CurrentSemanticValue.stn = new template_param_list(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 229: // template_empty_param_list -> template_empty_param_list, tkComma, + case 233: // template_empty_param_list -> template_empty_param_list, tkComma, // template_empty_param { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as template_param_list).Add(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 230: // template_empty_param -> /* empty */ + case 234: // template_empty_param -> /* empty */ { CurrentSemanticValue.td = new named_type_reference(new ident(""), CurrentLocationSpan); } break; - case 231: // template_param -> simple_type + case 235: // template_param -> simple_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 232: // template_param -> simple_type, tkQuestion + case 236: // template_param -> simple_type, tkQuestion { if (parsertools.build_tree_for_formatter) { @@ -3812,240 +3845,240 @@ public partial class GPPGParser: ShiftReduceParser structured_type + case 237: // template_param -> structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 234: // template_param -> procedural_type + case 238: // template_param -> procedural_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 235: // template_param -> template_type + case 239: // template_param -> template_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 236: // simple_type -> range_expr + case 240: // simple_type -> range_expr { CurrentSemanticValue.td = parsertools.ConvertDotNodeOrIdentToNamedTypeReference(ValueStack[ValueStack.Depth-1].ex); } break; - case 237: // simple_type -> range_expr, tkDotDot, range_expr + case 241: // simple_type -> range_expr, tkDotDot, range_expr { CurrentSemanticValue.td = new diapason(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 238: // simple_type -> tkRoundOpen, enumeration_id_list, tkRoundClose + case 242: // simple_type -> tkRoundOpen, enumeration_id_list, tkRoundClose { CurrentSemanticValue.td = new enum_type_definition(ValueStack[ValueStack.Depth-2].stn as enumerator_list, CurrentLocationSpan); } break; - case 239: // range_expr -> range_term + case 243: // range_expr -> range_term { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 240: // range_expr -> range_expr, const_addop, range_term + case 244: // range_expr -> range_expr, const_addop, range_term { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 241: // range_term -> range_factor + case 245: // range_term -> range_factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 242: // range_term -> range_term, const_mulop, range_factor + case 246: // range_term -> range_term, const_mulop, range_factor { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 243: // range_factor -> simple_type_identifier + case 247: // range_factor -> simple_type_identifier { CurrentSemanticValue.ex = parsertools.ConvertNamedTypeReferenceToDotNodeOrIdent(ValueStack[ValueStack.Depth-1].td as named_type_reference); } break; - case 244: // range_factor -> unsigned_number + case 248: // range_factor -> unsigned_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 245: // range_factor -> sign, range_factor + case 249: // range_factor -> sign, range_factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 246: // range_factor -> literal + case 250: // range_factor -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 247: // range_factor -> range_factor, tkRoundOpen, const_elem_list, tkRoundClose + case 251: // range_factor -> range_factor, tkRoundOpen, const_elem_list, tkRoundClose { CurrentSemanticValue.ex = new method_call(ValueStack[ValueStack.Depth-4].ex as addressed_value, ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 248: // simple_type_identifier -> identifier + case 252: // simple_type_identifier -> identifier { CurrentSemanticValue.td = new named_type_reference(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 249: // simple_type_identifier -> simple_type_identifier, tkPoint, + case 253: // simple_type_identifier -> simple_type_identifier, tkPoint, // identifier_or_keyword { CurrentSemanticValue.td = (ValueStack[ValueStack.Depth-3].td as named_type_reference).Add(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 250: // enumeration_id_list -> enumeration_id, tkComma, enumeration_id + case 254: // enumeration_id_list -> enumeration_id, tkComma, enumeration_id { CurrentSemanticValue.stn = new enumerator_list(ValueStack[ValueStack.Depth-3].stn as enumerator, CurrentLocationSpan); (CurrentSemanticValue.stn as enumerator_list).Add(ValueStack[ValueStack.Depth-1].stn as enumerator, CurrentLocationSpan); } break; - case 251: // enumeration_id_list -> enumeration_id_list, tkComma, enumeration_id + case 255: // enumeration_id_list -> enumeration_id_list, tkComma, enumeration_id { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as enumerator_list).Add(ValueStack[ValueStack.Depth-1].stn as enumerator, CurrentLocationSpan); } break; - case 252: // enumeration_id -> type_ref + case 256: // enumeration_id -> type_ref { CurrentSemanticValue.stn = new enumerator(ValueStack[ValueStack.Depth-1].td, null, CurrentLocationSpan); } break; - case 253: // enumeration_id -> type_ref, tkEqual, expr + case 257: // enumeration_id -> type_ref, tkEqual, expr { CurrentSemanticValue.stn = new enumerator(ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 254: // pointer_type -> tkDeref, fptype + case 258: // pointer_type -> tkDeref, fptype { CurrentSemanticValue.td = new ref_type(ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 255: // structured_type -> unpacked_structured_type + case 259: // structured_type -> unpacked_structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 256: // structured_type -> tkPacked, unpacked_structured_type + case 260: // structured_type -> tkPacked, unpacked_structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 257: // unpacked_structured_type -> array_type + case 261: // unpacked_structured_type -> array_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 258: // unpacked_structured_type -> record_type + case 262: // unpacked_structured_type -> record_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 259: // unpacked_structured_type -> set_type + case 263: // unpacked_structured_type -> set_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 260: // unpacked_structured_type -> file_type + case 264: // unpacked_structured_type -> file_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 261: // unpacked_structured_type -> sequence_type + case 265: // unpacked_structured_type -> sequence_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 262: // sequence_type -> tkSequence, tkOf, type_ref + case 266: // sequence_type -> tkSequence, tkOf, type_ref { CurrentSemanticValue.td = new sequence_type(ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 263: // array_type -> tkArray, tkSquareOpen, simple_type_list, tkSquareClose, tkOf, + case 267: // array_type -> tkArray, tkSquareOpen, simple_type_list, tkSquareClose, tkOf, // type_ref { CurrentSemanticValue.td = new array_type(ValueStack[ValueStack.Depth-4].stn as indexers_types, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 264: // array_type -> unsized_array_type + case 268: // array_type -> unsized_array_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 265: // unsized_array_type -> tkArray, tkOf, type_ref + case 269: // unsized_array_type -> tkArray, tkOf, type_ref { CurrentSemanticValue.td = new array_type(null, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 266: // simple_type_list -> simple_type_or_ + case 270: // simple_type_list -> simple_type_or_ { CurrentSemanticValue.stn = new indexers_types(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 267: // simple_type_list -> simple_type_list, tkComma, simple_type_or_ + case 271: // simple_type_list -> simple_type_list, tkComma, simple_type_or_ { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as indexers_types).Add(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 268: // simple_type_or_ -> simple_type + case 272: // simple_type_or_ -> simple_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 269: // simple_type_or_ -> /* empty */ + case 273: // simple_type_or_ -> /* empty */ { CurrentSemanticValue.td = null; } break; - case 270: // set_type -> tkSet, tkOf, type_ref + case 274: // set_type -> tkSet, tkOf, type_ref { CurrentSemanticValue.td = new set_type_definition(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 271: // file_type -> tkFile, tkOf, type_ref + case 275: // file_type -> tkFile, tkOf, type_ref { CurrentSemanticValue.td = new file_type(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 272: // file_type -> tkFile + case 276: // file_type -> tkFile { CurrentSemanticValue.td = new file_type(); CurrentSemanticValue.td.source_context = CurrentLocationSpan; } break; - case 273: // string_type -> tkIdentifier, tkSquareOpen, const_expr, tkSquareClose + case 277: // string_type -> tkIdentifier, tkSquareOpen, const_expr, tkSquareClose { CurrentSemanticValue.td = new string_num_definition(ValueStack[ValueStack.Depth-2].ex, ValueStack[ValueStack.Depth-4].id, CurrentLocationSpan); } break; - case 274: // procedural_type -> procedural_type_kind + case 278: // procedural_type -> procedural_type_kind { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 275: // procedural_type_kind -> proc_type_decl + case 279: // procedural_type_kind -> proc_type_decl { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 276: // proc_type_decl -> tkProcedure, fp_list + case 280: // proc_type_decl -> tkProcedure, fp_list { CurrentSemanticValue.td = new procedure_header(ValueStack[ValueStack.Depth-1].stn as formal_parameters,null,null,false,false,null,null,CurrentLocationSpan); } break; - case 277: // proc_type_decl -> tkFunction, fp_list, tkColon, fptype + case 281: // proc_type_decl -> tkFunction, fp_list, tkColon, fptype { CurrentSemanticValue.td = new function_header(ValueStack[ValueStack.Depth-3].stn as formal_parameters, null, null, null, ValueStack[ValueStack.Depth-1].td as type_definition, CurrentLocationSpan); } break; - case 278: // proc_type_decl -> simple_type_identifier, tkArrow, template_param + case 282: // proc_type_decl -> simple_type_identifier, tkArrow, template_param { CurrentSemanticValue.td = new modern_proc_type(ValueStack[ValueStack.Depth-3].td,null,ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 279: // proc_type_decl -> template_type, tkArrow, template_param + case 283: // proc_type_decl -> template_type, tkArrow, template_param { CurrentSemanticValue.td = new modern_proc_type(ValueStack[ValueStack.Depth-3].td,null,ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 280: // proc_type_decl -> tkRoundOpen, tkRoundClose, tkArrow, template_param + case 284: // proc_type_decl -> tkRoundOpen, tkRoundClose, tkArrow, template_param { CurrentSemanticValue.td = new modern_proc_type(null,null,ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 281: // proc_type_decl -> tkRoundOpen, enumeration_id_list, tkRoundClose, tkArrow, + case 285: // proc_type_decl -> tkRoundOpen, enumeration_id_list, tkRoundClose, tkArrow, // template_param { CurrentSemanticValue.td = new modern_proc_type(null,ValueStack[ValueStack.Depth-4].stn as enumerator_list,ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 282: // proc_type_decl -> simple_type_identifier, tkArrow, tkRoundOpen, tkRoundClose + case 286: // proc_type_decl -> simple_type_identifier, tkArrow, tkRoundOpen, tkRoundClose { CurrentSemanticValue.td = new modern_proc_type(ValueStack[ValueStack.Depth-4].td,null,null,CurrentLocationSpan); } break; - case 283: // proc_type_decl -> template_type, tkArrow, tkRoundOpen, tkRoundClose + case 287: // proc_type_decl -> template_type, tkArrow, tkRoundOpen, tkRoundClose { CurrentSemanticValue.td = new modern_proc_type(ValueStack[ValueStack.Depth-4].td,null,null,CurrentLocationSpan); } break; - case 284: // proc_type_decl -> tkRoundOpen, tkRoundClose, tkArrow, tkRoundOpen, tkRoundClose + case 288: // proc_type_decl -> tkRoundOpen, tkRoundClose, tkArrow, tkRoundOpen, tkRoundClose { CurrentSemanticValue.td = new modern_proc_type(null,null,null,CurrentLocationSpan); } break; - case 285: // proc_type_decl -> tkRoundOpen, enumeration_id_list, tkRoundClose, tkArrow, + case 289: // proc_type_decl -> tkRoundOpen, enumeration_id_list, tkRoundClose, tkArrow, // tkRoundOpen, tkRoundClose { CurrentSemanticValue.td = new modern_proc_type(null,ValueStack[ValueStack.Depth-5].stn as enumerator_list,null,CurrentLocationSpan); } break; - case 286: // object_type -> class_attributes, class_or_interface_keyword, + case 290: // object_type -> class_attributes, class_or_interface_keyword, // optional_base_classes, optional_where_section, // optional_component_list_seq_end { @@ -4053,7 +4086,7 @@ public partial class GPPGParser: ShiftReduceParser tkRecord, optional_base_classes, optional_where_section, + case 291: // record_type -> tkRecord, optional_base_classes, optional_where_section, // member_list_section, tkEnd { var nnrt = new class_definition(ValueStack[ValueStack.Depth-4].stn as named_type_reference_list, ValueStack[ValueStack.Depth-2].stn as class_body_list, class_keyword.Record, null, ValueStack[ValueStack.Depth-3].stn as where_definition_list, class_attribute.None, false, CurrentLocationSpan); @@ -4066,37 +4099,37 @@ public partial class GPPGParser: ShiftReduceParser tkSealed + case 292: // class_attribute -> tkSealed { CurrentSemanticValue.ob = class_attribute.Sealed; } break; - case 289: // class_attribute -> tkPartial + case 293: // class_attribute -> tkPartial { CurrentSemanticValue.ob = class_attribute.Partial; } break; - case 290: // class_attribute -> tkAbstract + case 294: // class_attribute -> tkAbstract { CurrentSemanticValue.ob = class_attribute.Abstract; } break; - case 291: // class_attribute -> tkAuto + case 295: // class_attribute -> tkAuto { CurrentSemanticValue.ob = class_attribute.Auto; } break; - case 292: // class_attribute -> tkStatic + case 296: // class_attribute -> tkStatic { CurrentSemanticValue.ob = class_attribute.Static; } break; - case 293: // class_attributes -> /* empty */ + case 297: // class_attributes -> /* empty */ { CurrentSemanticValue.ob = class_attribute.None; } break; - case 294: // class_attributes -> class_attributes1 + case 298: // class_attributes -> class_attributes1 { CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-1].ob; } break; - case 295: // class_attributes1 -> class_attribute + case 299: // class_attributes1 -> class_attribute { CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-1].ob; } break; - case 296: // class_attributes1 -> class_attributes1, class_attribute + case 300: // class_attributes1 -> class_attributes1, class_attribute { if (((class_attribute)ValueStack[ValueStack.Depth-2].ob & (class_attribute)ValueStack[ValueStack.Depth-1].ob) == (class_attribute)ValueStack[ValueStack.Depth-1].ob) parsertools.AddErrorFromResource("ATTRIBUTE_REDECLARED",LocationStack[LocationStack.Depth-1]); @@ -4104,123 +4137,123 @@ public partial class GPPGParser: ShiftReduceParser tkClass + case 301: // class_or_interface_keyword -> tkClass { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 298: // class_or_interface_keyword -> tkInterface + case 302: // class_or_interface_keyword -> tkInterface { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 299: // class_or_interface_keyword -> tkTemplate + case 303: // class_or_interface_keyword -> tkTemplate { CurrentSemanticValue.ti = NewClassOrInterfaceKeyword(ValueStack[ValueStack.Depth-1].ti); } break; - case 300: // class_or_interface_keyword -> tkTemplate, tkClass + case 304: // class_or_interface_keyword -> tkTemplate, tkClass { CurrentSemanticValue.ti = NewClassOrInterfaceKeyword(ValueStack[ValueStack.Depth-2].ti, "c", CurrentLocationSpan); } break; - case 301: // class_or_interface_keyword -> tkTemplate, tkRecord + case 305: // class_or_interface_keyword -> tkTemplate, tkRecord { CurrentSemanticValue.ti = NewClassOrInterfaceKeyword(ValueStack[ValueStack.Depth-2].ti, "r", CurrentLocationSpan); } break; - case 302: // class_or_interface_keyword -> tkTemplate, tkInterface + case 306: // class_or_interface_keyword -> tkTemplate, tkInterface { CurrentSemanticValue.ti = NewClassOrInterfaceKeyword(ValueStack[ValueStack.Depth-2].ti, "i", CurrentLocationSpan); } break; - case 303: // optional_component_list_seq_end -> /* empty */ + case 307: // optional_component_list_seq_end -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 304: // optional_component_list_seq_end -> member_list_section, tkEnd + case 308: // optional_component_list_seq_end -> member_list_section, tkEnd { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 306: // optional_base_classes -> tkRoundOpen, base_classes_names_list, tkRoundClose + case 310: // optional_base_classes -> tkRoundOpen, base_classes_names_list, tkRoundClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 307: // base_classes_names_list -> base_class_name + case 311: // base_classes_names_list -> base_class_name { CurrentSemanticValue.stn = new named_type_reference_list(ValueStack[ValueStack.Depth-1].stn as named_type_reference, CurrentLocationSpan); } break; - case 308: // base_classes_names_list -> base_classes_names_list, tkComma, base_class_name + case 312: // base_classes_names_list -> base_classes_names_list, tkComma, base_class_name { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as named_type_reference_list).Add(ValueStack[ValueStack.Depth-1].stn as named_type_reference, CurrentLocationSpan); } break; - case 309: // base_class_name -> simple_type_identifier + case 313: // base_class_name -> simple_type_identifier { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].td; } break; - case 310: // base_class_name -> template_type + case 314: // base_class_name -> template_type { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].td; } break; - case 311: // template_arguments -> tkLower, ident_list, tkGreater + case 315: // template_arguments -> tkLower, ident_list, tkGreater { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 312: // optional_where_section -> /* empty */ + case 316: // optional_where_section -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 313: // optional_where_section -> where_part_list + case 317: // optional_where_section -> where_part_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 314: // where_part_list -> where_part + case 318: // where_part_list -> where_part { CurrentSemanticValue.stn = new where_definition_list(ValueStack[ValueStack.Depth-1].stn as where_definition, CurrentLocationSpan); } break; - case 315: // where_part_list -> where_part_list, where_part + case 319: // where_part_list -> where_part_list, where_part { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-2].stn as where_definition_list).Add(ValueStack[ValueStack.Depth-1].stn as where_definition, CurrentLocationSpan); } break; - case 316: // where_part -> tkWhere, ident_list, tkColon, type_ref_and_secific_list, + case 320: // where_part -> tkWhere, ident_list, tkColon, type_ref_and_secific_list, // tkSemiColon { CurrentSemanticValue.stn = new where_definition(ValueStack[ValueStack.Depth-4].stn as ident_list, ValueStack[ValueStack.Depth-2].stn as where_type_specificator_list, CurrentLocationSpan); } break; - case 317: // type_ref_and_secific_list -> type_ref_or_secific + case 321: // type_ref_and_secific_list -> type_ref_or_secific { CurrentSemanticValue.stn = new where_type_specificator_list(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 318: // type_ref_and_secific_list -> type_ref_and_secific_list, tkComma, + case 322: // type_ref_and_secific_list -> type_ref_and_secific_list, tkComma, // type_ref_or_secific { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as where_type_specificator_list).Add(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 319: // type_ref_or_secific -> type_ref + case 323: // type_ref_or_secific -> type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 320: // type_ref_or_secific -> tkClass + case 324: // type_ref_or_secific -> tkClass { CurrentSemanticValue.td = new declaration_specificator(DeclarationSpecificator.WhereDefClass, ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 321: // type_ref_or_secific -> tkRecord + case 325: // type_ref_or_secific -> tkRecord { CurrentSemanticValue.td = new declaration_specificator(DeclarationSpecificator.WhereDefValueType, ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 322: // type_ref_or_secific -> tkConstructor + case 326: // type_ref_or_secific -> tkConstructor { CurrentSemanticValue.td = new declaration_specificator(DeclarationSpecificator.WhereDefConstructor, ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 323: // member_list_section -> member_list + case 327: // member_list_section -> member_list { CurrentSemanticValue.stn = new class_body_list(ValueStack[ValueStack.Depth-1].stn as class_members, CurrentLocationSpan); } break; - case 324: // member_list_section -> member_list_section, ot_visibility_specifier, + case 328: // member_list_section -> member_list_section, ot_visibility_specifier, // member_list { (ValueStack[ValueStack.Depth-1].stn as class_members).access_mod = ValueStack[ValueStack.Depth-2].stn as access_modifer_node; @@ -4232,121 +4265,121 @@ public partial class GPPGParser: ShiftReduceParser tkInternal + case 329: // ot_visibility_specifier -> tkInternal { CurrentSemanticValue.stn = new access_modifer_node(access_modifer.internal_modifer, CurrentLocationSpan); } break; - case 326: // ot_visibility_specifier -> tkPublic + case 330: // ot_visibility_specifier -> tkPublic { CurrentSemanticValue.stn = new access_modifer_node(access_modifer.public_modifer, CurrentLocationSpan); } break; - case 327: // ot_visibility_specifier -> tkProtected + case 331: // ot_visibility_specifier -> tkProtected { CurrentSemanticValue.stn = new access_modifer_node(access_modifer.protected_modifer, CurrentLocationSpan); } break; - case 328: // ot_visibility_specifier -> tkPrivate + case 332: // ot_visibility_specifier -> tkPrivate { CurrentSemanticValue.stn = new access_modifer_node(access_modifer.private_modifer, CurrentLocationSpan); } break; - case 329: // member_list -> /* empty */ + case 333: // member_list -> /* empty */ { CurrentSemanticValue.stn = new class_members(); } break; - case 330: // member_list -> field_or_const_definition_list, optional_semicolon + case 334: // member_list -> field_or_const_definition_list, optional_semicolon { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 331: // member_list -> method_decl_list + case 335: // member_list -> method_decl_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 332: // member_list -> field_or_const_definition_list, tkSemiColon, method_decl_list + case 336: // member_list -> field_or_const_definition_list, tkSemiColon, method_decl_list { (ValueStack[ValueStack.Depth-3].stn as class_members).members.AddRange((ValueStack[ValueStack.Depth-1].stn as class_members).members); (ValueStack[ValueStack.Depth-3].stn as class_members).source_context = CurrentLocationSpan; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-3].stn; } break; - case 333: // ident_list -> identifier + case 337: // ident_list -> identifier { CurrentSemanticValue.stn = new ident_list(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 334: // ident_list -> ident_list, tkComma, identifier + case 338: // ident_list -> ident_list, tkComma, identifier { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as ident_list).Add(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 335: // optional_semicolon -> /* empty */ + case 339: // optional_semicolon -> /* empty */ { CurrentSemanticValue.ob = null; } break; - case 336: // optional_semicolon -> tkSemiColon + case 340: // optional_semicolon -> tkSemiColon { CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-1].ti; } break; - case 337: // field_or_const_definition_list -> field_or_const_definition + case 341: // field_or_const_definition_list -> field_or_const_definition { CurrentSemanticValue.stn = new class_members(ValueStack[ValueStack.Depth-1].stn as declaration, CurrentLocationSpan); } break; - case 338: // field_or_const_definition_list -> field_or_const_definition_list, tkSemiColon, + case 342: // field_or_const_definition_list -> field_or_const_definition_list, tkSemiColon, // field_or_const_definition { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as class_members).Add(ValueStack[ValueStack.Depth-1].stn as declaration, CurrentLocationSpan); } break; - case 339: // field_or_const_definition -> attribute_declarations, + case 343: // field_or_const_definition -> attribute_declarations, // simple_field_or_const_definition { (ValueStack[ValueStack.Depth-1].stn as declaration).attributes = ValueStack[ValueStack.Depth-2].stn as attribute_list; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 340: // method_decl_list -> method_or_property_decl + case 344: // method_decl_list -> method_or_property_decl { CurrentSemanticValue.stn = new class_members(ValueStack[ValueStack.Depth-1].stn as declaration, CurrentLocationSpan); } break; - case 341: // method_decl_list -> method_decl_list, method_or_property_decl + case 345: // method_decl_list -> method_decl_list, method_or_property_decl { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-2].stn as class_members).Add(ValueStack[ValueStack.Depth-1].stn as declaration, CurrentLocationSpan); } break; - case 342: // method_or_property_decl -> method_decl_withattr + case 346: // method_or_property_decl -> method_decl_withattr { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 343: // method_or_property_decl -> property_definition + case 347: // method_or_property_decl -> property_definition { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 344: // simple_field_or_const_definition -> tkConst, only_const_decl + case 348: // simple_field_or_const_definition -> tkConst, only_const_decl { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 345: // simple_field_or_const_definition -> field_definition + case 349: // simple_field_or_const_definition -> field_definition { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 346: // simple_field_or_const_definition -> class_or_static, field_definition + case 350: // simple_field_or_const_definition -> class_or_static, field_definition { (ValueStack[ValueStack.Depth-1].stn as var_def_statement).var_attr = definition_attribute.Static; (ValueStack[ValueStack.Depth-1].stn as var_def_statement).source_context = CurrentLocationSpan; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 347: // class_or_static -> tkStatic + case 351: // class_or_static -> tkStatic { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 348: // class_or_static -> tkClass + case 352: // class_or_static -> tkClass { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 349: // field_definition -> var_decl_part + case 353: // field_definition -> var_decl_part { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 350: // field_definition -> tkEvent, ident_list, tkColon, type_ref + case 354: // field_definition -> tkEvent, ident_list, tkColon, type_ref { CurrentSemanticValue.stn = new var_def_statement(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, null, definition_attribute.None, true, CurrentLocationSpan); } break; - case 351: // method_decl_withattr -> attribute_declarations, method_header + case 355: // method_decl_withattr -> attribute_declarations, method_header { (ValueStack[ValueStack.Depth-1].td as declaration).attributes = ValueStack[ValueStack.Depth-2].stn as attribute_list; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].td; } break; - case 352: // method_decl_withattr -> attribute_declarations, method_decl + case 356: // method_decl_withattr -> attribute_declarations, method_decl { (ValueStack[ValueStack.Depth-1].stn as declaration).attributes = ValueStack[ValueStack.Depth-2].stn as attribute_list; if (ValueStack[ValueStack.Depth-1].stn is procedure_definition && (ValueStack[ValueStack.Depth-1].stn as procedure_definition).proc_header != null) @@ -4354,88 +4387,88 @@ public partial class GPPGParser: ShiftReduceParser inclass_proc_func_decl + case 357: // method_decl -> inclass_proc_func_decl { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 354: // method_decl -> inclass_constr_destr_decl + case 358: // method_decl -> inclass_constr_destr_decl { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 355: // method_header -> class_or_static, method_procfunc_header + case 359: // method_header -> class_or_static, method_procfunc_header { (ValueStack[ValueStack.Depth-1].td as procedure_header).class_keyword = true; CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 356: // method_header -> method_procfunc_header + case 360: // method_header -> method_procfunc_header { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 357: // method_header -> constr_destr_header + case 361: // method_header -> constr_destr_header { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 358: // method_procfunc_header -> proc_func_header + case 362: // method_procfunc_header -> proc_func_header { CurrentSemanticValue.td = NewProcfuncHeading(ValueStack[ValueStack.Depth-1].td as procedure_header); } break; - case 359: // proc_func_header -> proc_header + case 363: // proc_func_header -> proc_header { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 360: // proc_func_header -> func_header + case 364: // proc_func_header -> func_header { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 361: // constr_destr_header -> tkConstructor, optional_proc_name, fp_list, + case 365: // constr_destr_header -> tkConstructor, optional_proc_name, fp_list, // optional_method_modificators { CurrentSemanticValue.td = new constructor(null,ValueStack[ValueStack.Depth-2].stn as formal_parameters,ValueStack[ValueStack.Depth-1].stn as procedure_attributes_list,ValueStack[ValueStack.Depth-3].stn as method_name,false,false,null,null,CurrentLocationSpan); } break; - case 362: // constr_destr_header -> class_or_static, tkConstructor, optional_proc_name, + case 366: // constr_destr_header -> class_or_static, tkConstructor, optional_proc_name, // fp_list, optional_method_modificators { CurrentSemanticValue.td = new constructor(null,ValueStack[ValueStack.Depth-2].stn as formal_parameters,ValueStack[ValueStack.Depth-1].stn as procedure_attributes_list,ValueStack[ValueStack.Depth-3].stn as method_name,false,true,null,null,CurrentLocationSpan); } break; - case 363: // constr_destr_header -> tkDestructor, optional_proc_name, fp_list, + case 367: // constr_destr_header -> tkDestructor, optional_proc_name, fp_list, // optional_method_modificators { CurrentSemanticValue.td = new destructor(null,ValueStack[ValueStack.Depth-2].stn as formal_parameters,ValueStack[ValueStack.Depth-1].stn as procedure_attributes_list,ValueStack[ValueStack.Depth-3].stn as method_name, false,false,null,null,CurrentLocationSpan); } break; - case 364: // optional_proc_name -> proc_name + case 368: // optional_proc_name -> proc_name { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 365: // optional_proc_name -> /* empty */ + case 369: // optional_proc_name -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 366: // qualified_identifier -> identifier + case 370: // qualified_identifier -> identifier { CurrentSemanticValue.stn = new method_name(null,null,ValueStack[ValueStack.Depth-1].id,null,CurrentLocationSpan); } break; - case 367: // qualified_identifier -> visibility_specifier + case 371: // qualified_identifier -> visibility_specifier { CurrentSemanticValue.stn = new method_name(null,null,ValueStack[ValueStack.Depth-1].id,null,CurrentLocationSpan); } break; - case 368: // qualified_identifier -> qualified_identifier, tkPoint, identifier + case 372: // qualified_identifier -> qualified_identifier, tkPoint, identifier { CurrentSemanticValue.stn = NewQualifiedIdentifier(ValueStack[ValueStack.Depth-3].stn as method_name, ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 369: // qualified_identifier -> qualified_identifier, tkPoint, visibility_specifier + case 373: // qualified_identifier -> qualified_identifier, tkPoint, visibility_specifier { CurrentSemanticValue.stn = NewQualifiedIdentifier(ValueStack[ValueStack.Depth-3].stn as method_name, ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 370: // property_definition -> attribute_declarations, simple_property_definition + case 374: // property_definition -> attribute_declarations, simple_property_definition { CurrentSemanticValue.stn = NewPropertyDefinition(ValueStack[ValueStack.Depth-2].stn as attribute_list, ValueStack[ValueStack.Depth-1].stn as declaration, LocationStack[LocationStack.Depth-1]); } break; - case 371: // simple_property_definition -> tkProperty, qualified_identifier, + case 375: // simple_property_definition -> tkProperty, qualified_identifier, // property_interface, property_specifiers, // tkSemiColon, array_defaultproperty { CurrentSemanticValue.stn = NewSimplePropertyDefinition(ValueStack[ValueStack.Depth-5].stn as method_name, ValueStack[ValueStack.Depth-4].stn as property_interface, ValueStack[ValueStack.Depth-3].stn as property_accessors, proc_attribute.attr_none, ValueStack[ValueStack.Depth-1].stn as property_array_default, CurrentLocationSpan); } break; - case 372: // simple_property_definition -> tkProperty, qualified_identifier, + case 376: // simple_property_definition -> tkProperty, qualified_identifier, // property_interface, property_specifiers, // tkSemiColon, property_modificator, tkSemiColon, // array_defaultproperty @@ -4450,7 +4483,7 @@ public partial class GPPGParser: ShiftReduceParser class_or_static, tkProperty, qualified_identifier, + case 377: // simple_property_definition -> class_or_static, tkProperty, qualified_identifier, // property_interface, property_specifiers, // tkSemiColon, array_defaultproperty { @@ -4458,7 +4491,7 @@ public partial class GPPGParser: ShiftReduceParser class_or_static, tkProperty, qualified_identifier, + case 378: // simple_property_definition -> class_or_static, tkProperty, qualified_identifier, // property_interface, property_specifiers, // tkSemiColon, property_modificator, tkSemiColon, // array_defaultproperty @@ -4466,7 +4499,7 @@ public partial class GPPGParser: ShiftReduceParser tkAuto, tkProperty, qualified_identifier, + case 379: // simple_property_definition -> tkAuto, tkProperty, qualified_identifier, // property_interface, // optional_property_initialization, tkSemiColon { @@ -4475,7 +4508,7 @@ public partial class GPPGParser: ShiftReduceParser class_or_static, tkAuto, tkProperty, + case 380: // simple_property_definition -> class_or_static, tkAuto, tkProperty, // qualified_identifier, property_interface, // optional_property_initialization, tkSemiColon { @@ -4485,54 +4518,54 @@ public partial class GPPGParser: ShiftReduceParser tkAssign, expr + case 381: // optional_property_initialization -> tkAssign, expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 378: // optional_property_initialization -> /* empty */ + case 382: // optional_property_initialization -> /* empty */ { CurrentSemanticValue.ex = null; } break; - case 379: // array_defaultproperty -> /* empty */ + case 383: // array_defaultproperty -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 380: // array_defaultproperty -> tkDefault, tkSemiColon + case 384: // array_defaultproperty -> tkDefault, tkSemiColon { CurrentSemanticValue.stn = new property_array_default(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 381: // property_interface -> property_parameter_list, tkColon, fptype + case 385: // property_interface -> property_parameter_list, tkColon, fptype { CurrentSemanticValue.stn = new property_interface(ValueStack[ValueStack.Depth-3].stn as property_parameter_list, ValueStack[ValueStack.Depth-1].td, null, CurrentLocationSpan); } break; - case 382: // property_parameter_list -> /* empty */ + case 386: // property_parameter_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 383: // property_parameter_list -> tkSquareOpen, parameter_decl_list, tkSquareClose + case 387: // property_parameter_list -> tkSquareOpen, parameter_decl_list, tkSquareClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 384: // parameter_decl_list -> parameter_decl + case 388: // parameter_decl_list -> parameter_decl { CurrentSemanticValue.stn = new property_parameter_list(ValueStack[ValueStack.Depth-1].stn as property_parameter, CurrentLocationSpan); } break; - case 385: // parameter_decl_list -> parameter_decl_list, tkSemiColon, parameter_decl + case 389: // parameter_decl_list -> parameter_decl_list, tkSemiColon, parameter_decl { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as property_parameter_list).Add(ValueStack[ValueStack.Depth-1].stn as property_parameter, CurrentLocationSpan); } break; - case 386: // parameter_decl -> ident_list, tkColon, fptype + case 390: // parameter_decl -> ident_list, tkColon, fptype { CurrentSemanticValue.stn = new property_parameter(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 387: // optional_read_expr -> expr_with_func_decl_lambda + case 391: // optional_read_expr -> expr_with_func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 388: // optional_read_expr -> /* empty */ + case 392: // optional_read_expr -> /* empty */ { CurrentSemanticValue.ex = null; } break; - case 390: // property_specifiers -> tkRead, optional_read_expr, write_property_specifiers + case 394: // property_specifiers -> tkRead, optional_read_expr, write_property_specifiers { if (ValueStack[ValueStack.Depth-2].ex == null || ValueStack[ValueStack.Depth-2].ex is ident) // ����������� �������� { @@ -4548,7 +4581,7 @@ public partial class GPPGParser: ShiftReduceParser tkWrite, unlabelled_stmt, read_property_specifiers + case 395: // property_specifiers -> tkWrite, unlabelled_stmt, read_property_specifiers { if (ValueStack[ValueStack.Depth-2].stn is empty_statement) { @@ -4572,7 +4605,7 @@ public partial class GPPGParser: ShiftReduceParser tkWrite, unlabelled_stmt + case 397: // write_property_specifiers -> tkWrite, unlabelled_stmt { if (ValueStack[ValueStack.Depth-1].stn is empty_statement) { @@ -4595,7 +4628,7 @@ public partial class GPPGParser: ShiftReduceParser tkRead, optional_read_expr + case 399: // read_property_specifiers -> tkRead, optional_read_expr { if (ValueStack[ValueStack.Depth-1].ex == null || ValueStack[ValueStack.Depth-1].ex is ident) { @@ -4611,45 +4644,45 @@ public partial class GPPGParser: ShiftReduceParser var_decl_part, tkSemiColon + case 400: // var_decl -> var_decl_part, tkSemiColon { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 399: // var_decl_part -> ident_list, tkColon, type_ref + case 403: // var_decl_part -> ident_list, tkColon, type_ref { CurrentSemanticValue.stn = new var_def_statement(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, null, definition_attribute.None, false, CurrentLocationSpan); } break; - case 400: // var_decl_part -> ident_list, tkAssign, expr_with_func_decl_lambda + case 404: // var_decl_part -> ident_list, tkAssign, expr_with_func_decl_lambda { CurrentSemanticValue.stn = new var_def_statement(ValueStack[ValueStack.Depth-3].stn as ident_list, null, ValueStack[ValueStack.Depth-1].ex, definition_attribute.None, false, CurrentLocationSpan); } break; - case 401: // var_decl_part -> ident_list, tkColon, type_ref, tkAssignOrEqual, + case 405: // var_decl_part -> ident_list, tkColon, type_ref, tkAssignOrEqual, // typed_var_init_expression { CurrentSemanticValue.stn = new var_def_statement(ValueStack[ValueStack.Depth-5].stn as ident_list, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].ex, definition_attribute.None, false, CurrentLocationSpan); } break; - case 402: // typed_var_init_expression -> typed_const_plus + case 406: // typed_var_init_expression -> typed_const_plus { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 403: // typed_var_init_expression -> expl_func_decl_lambda + case 407: // typed_var_init_expression -> expl_func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 404: // typed_var_init_expression -> identifier, tkArrow, lambda_function_body + case 408: // typed_var_init_expression -> identifier, tkArrow, lambda_function_body { var idList = new ident_list(ValueStack[ValueStack.Depth-3].id, LocationStack[LocationStack.Depth-3]); var formalPars = new formal_parameters(new typed_parameters(idList, new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), 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 405: // typed_var_init_expression -> tkRoundOpen, tkRoundClose, lambda_type_ref, + case 409: // typed_var_init_expression -> tkRoundOpen, tkRoundClose, lambda_type_ref, // tkArrow, lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 406: // typed_var_init_expression -> tkRoundOpen, typed_const_list, tkRoundClose, + case 410: // typed_var_init_expression -> tkRoundOpen, typed_const_list, tkRoundClose, // tkArrow, lambda_function_body { var el = ValueStack[ValueStack.Depth-4].stn as expression_list; @@ -4671,18 +4704,18 @@ public partial class GPPGParser: ShiftReduceParser typed_const + case 411: // typed_const_plus -> typed_const { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 408: // typed_const_plus -> default_expr + case 412: // typed_const_plus -> default_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 409: // constr_destr_decl -> constr_destr_header, block + case 413: // constr_destr_decl -> constr_destr_header, block { CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-2].td as procedure_header, ValueStack[ValueStack.Depth-1].stn as block, CurrentLocationSpan); } break; - case 410: // constr_destr_decl -> tkConstructor, optional_proc_name, fp_list, tkAssign, + case 414: // constr_destr_decl -> tkConstructor, optional_proc_name, fp_list, tkAssign, // unlabelled_stmt, tkSemiColon { if (ValueStack[ValueStack.Depth-2].stn is empty_statement) @@ -4693,7 +4726,7 @@ public partial class GPPGParser: ShiftReduceParser class_or_static, tkConstructor, optional_proc_name, + case 415: // constr_destr_decl -> class_or_static, tkConstructor, optional_proc_name, // fp_list, tkAssign, unlabelled_stmt, tkSemiColon { if (ValueStack[ValueStack.Depth-2].stn is empty_statement) @@ -4704,12 +4737,12 @@ public partial class GPPGParser: ShiftReduceParser constr_destr_header, inclass_block + case 416: // inclass_constr_destr_decl -> constr_destr_header, inclass_block { CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-2].td as procedure_header, ValueStack[ValueStack.Depth-1].stn as block, CurrentLocationSpan); } break; - case 413: // inclass_constr_destr_decl -> tkConstructor, optional_proc_name, fp_list, + case 417: // inclass_constr_destr_decl -> tkConstructor, optional_proc_name, fp_list, // tkAssign, unlabelled_stmt, tkSemiColon { if (ValueStack[ValueStack.Depth-2].stn is empty_statement) @@ -4720,7 +4753,7 @@ public partial class GPPGParser: ShiftReduceParser class_or_static, tkConstructor, optional_proc_name, + case 418: // inclass_constr_destr_decl -> class_or_static, tkConstructor, optional_proc_name, // fp_list, tkAssign, unlabelled_stmt, tkSemiColon { if (ValueStack[ValueStack.Depth-2].stn is empty_statement) @@ -4731,28 +4764,28 @@ public partial class GPPGParser: ShiftReduceParser proc_func_decl_noclass + case 419: // proc_func_decl -> proc_func_decl_noclass { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 416: // proc_func_decl -> class_or_static, proc_func_decl_noclass + case 420: // proc_func_decl -> class_or_static, proc_func_decl_noclass { (ValueStack[ValueStack.Depth-1].stn as procedure_definition).proc_header.class_keyword = true; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 417: // proc_func_decl_noclass -> proc_func_header, proc_func_external_block + case 421: // proc_func_decl_noclass -> proc_func_header, proc_func_external_block { CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-2].td as procedure_header, ValueStack[ValueStack.Depth-1].stn as proc_block, CurrentLocationSpan); } break; - case 418: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, fptype, + case 422: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, fptype, // optional_method_modificators1, tkAssign, expr_l1, // tkSemiColon { CurrentSemanticValue.stn = SyntaxTreeBuilder.BuildShortFuncDefinition(ValueStack[ValueStack.Depth-7].stn as formal_parameters, ValueStack[ValueStack.Depth-4].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-8].stn as method_name, ValueStack[ValueStack.Depth-5].td as type_definition, ValueStack[ValueStack.Depth-2].ex, LocationStack[LocationStack.Depth-9].Merge(LocationStack[LocationStack.Depth-4])); } break; - case 419: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, + case 423: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, // optional_method_modificators1, tkAssign, expr_l1, // tkSemiColon { @@ -4762,21 +4795,21 @@ public partial class GPPGParser: ShiftReduceParser tkFunction, func_name, fp_list, tkColon, fptype, + case 424: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, fptype, // optional_method_modificators1, tkAssign, // func_decl_lambda, tkSemiColon { CurrentSemanticValue.stn = SyntaxTreeBuilder.BuildShortFuncDefinition(ValueStack[ValueStack.Depth-7].stn as formal_parameters, ValueStack[ValueStack.Depth-4].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-8].stn as method_name, ValueStack[ValueStack.Depth-5].td as type_definition, ValueStack[ValueStack.Depth-2].ex, LocationStack[LocationStack.Depth-9].Merge(LocationStack[LocationStack.Depth-4])); } break; - case 421: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, + case 425: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, // optional_method_modificators1, tkAssign, // func_decl_lambda, tkSemiColon { CurrentSemanticValue.stn = SyntaxTreeBuilder.BuildShortFuncDefinition(ValueStack[ValueStack.Depth-5].stn as formal_parameters, ValueStack[ValueStack.Depth-4].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-6].stn as method_name, null, ValueStack[ValueStack.Depth-2].ex, LocationStack[LocationStack.Depth-7].Merge(LocationStack[LocationStack.Depth-4])); } break; - case 422: // proc_func_decl_noclass -> tkProcedure, proc_name, fp_list, + case 426: // proc_func_decl_noclass -> tkProcedure, proc_name, fp_list, // optional_method_modificators1, tkAssign, // unlabelled_stmt, tkSemiColon { @@ -4785,30 +4818,30 @@ public partial class GPPGParser: ShiftReduceParser proc_func_header, tkForward, tkSemiColon + case 427: // proc_func_decl_noclass -> proc_func_header, tkForward, tkSemiColon { CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-3].td as procedure_header, null, CurrentLocationSpan); (CurrentSemanticValue.stn as procedure_definition).proc_header.proc_attributes.Add((procedure_attribute)ValueStack[ValueStack.Depth-2].id, ValueStack[ValueStack.Depth-2].id.source_context); } break; - case 424: // inclass_proc_func_decl -> inclass_proc_func_decl_noclass + case 428: // inclass_proc_func_decl -> inclass_proc_func_decl_noclass { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 425: // inclass_proc_func_decl -> class_or_static, inclass_proc_func_decl_noclass + case 429: // inclass_proc_func_decl -> class_or_static, inclass_proc_func_decl_noclass { if ((ValueStack[ValueStack.Depth-1].stn as procedure_definition).proc_header != null) (ValueStack[ValueStack.Depth-1].stn as procedure_definition).proc_header.class_keyword = true; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 426: // inclass_proc_func_decl_noclass -> proc_func_header, inclass_block + case 430: // inclass_proc_func_decl_noclass -> proc_func_header, inclass_block { CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-2].td as procedure_header, ValueStack[ValueStack.Depth-1].stn as proc_block, CurrentLocationSpan); } break; - case 427: // inclass_proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, + case 431: // inclass_proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, // fptype, optional_method_modificators1, // tkAssign, expr_l1_func_decl_lambda, // tkSemiColon @@ -4818,7 +4851,7 @@ public partial class GPPGParser: ShiftReduceParser tkFunction, func_name, fp_list, + case 432: // inclass_proc_func_decl_noclass -> tkFunction, func_name, fp_list, // optional_method_modificators1, tkAssign, // expr_l1_func_decl_lambda, tkSemiColon { @@ -4827,7 +4860,7 @@ public partial class GPPGParser: ShiftReduceParser tkProcedure, proc_name, fp_list, + case 433: // inclass_proc_func_decl_noclass -> tkProcedure, proc_name, fp_list, // optional_method_modificators1, tkAssign, // unlabelled_stmt, tkSemiColon { @@ -4836,21 +4869,21 @@ public partial class GPPGParser: ShiftReduceParser block + case 434: // proc_func_external_block -> block { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 431: // proc_func_external_block -> external_block + case 435: // proc_func_external_block -> external_block { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 432: // proc_name -> func_name + case 436: // proc_name -> func_name { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 433: // func_name -> func_meth_name_ident + case 437: // func_name -> func_meth_name_ident { CurrentSemanticValue.stn = new method_name(null,null, ValueStack[ValueStack.Depth-1].id, null, CurrentLocationSpan); } break; - case 434: // func_name -> func_class_name_ident_list, tkPoint, func_meth_name_ident + case 438: // func_name -> func_class_name_ident_list, tkPoint, func_meth_name_ident { var ln = ValueStack[ValueStack.Depth-3].ob as List; var cnt = ln.Count; @@ -4860,290 +4893,290 @@ public partial class GPPGParser: ShiftReduceParser func_name_with_template_args + case 439: // func_class_name_ident -> func_name_with_template_args { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 436: // func_class_name_ident_list -> func_class_name_ident + case 440: // func_class_name_ident_list -> func_class_name_ident { CurrentSemanticValue.ob = new List(); (CurrentSemanticValue.ob as List).Add(ValueStack[ValueStack.Depth-1].id); } break; - case 437: // func_class_name_ident_list -> func_class_name_ident_list, tkPoint, + case 441: // func_class_name_ident_list -> func_class_name_ident_list, tkPoint, // func_class_name_ident { (ValueStack[ValueStack.Depth-3].ob as List).Add(ValueStack[ValueStack.Depth-1].id); CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-3].ob; } break; - case 438: // func_meth_name_ident -> func_name_with_template_args + case 442: // func_meth_name_ident -> func_name_with_template_args { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 439: // func_meth_name_ident -> operator_name_ident + case 443: // func_meth_name_ident -> operator_name_ident { CurrentSemanticValue.id = (ident)ValueStack[ValueStack.Depth-1].ex; } break; - case 440: // func_meth_name_ident -> operator_name_ident, template_arguments + case 444: // func_meth_name_ident -> operator_name_ident, template_arguments { CurrentSemanticValue.id = new template_operator_name(null, ValueStack[ValueStack.Depth-1].stn as ident_list, ValueStack[ValueStack.Depth-2].ex as operator_name_ident, CurrentLocationSpan); } break; - case 441: // func_name_with_template_args -> func_name_ident + case 445: // func_name_with_template_args -> func_name_ident { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 442: // func_name_with_template_args -> func_name_ident, template_arguments + case 446: // func_name_with_template_args -> func_name_ident, template_arguments { CurrentSemanticValue.id = new template_type_name(ValueStack[ValueStack.Depth-2].id.name, ValueStack[ValueStack.Depth-1].stn as ident_list, CurrentLocationSpan); } break; - case 443: // func_name_ident -> identifier + case 447: // func_name_ident -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 444: // proc_header -> tkProcedure, proc_name, fp_list, optional_method_modificators, + case 448: // proc_header -> tkProcedure, proc_name, fp_list, optional_method_modificators, // optional_where_section { CurrentSemanticValue.td = new procedure_header(ValueStack[ValueStack.Depth-3].stn as formal_parameters, ValueStack[ValueStack.Depth-2].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-4].stn as method_name, ValueStack[ValueStack.Depth-1].stn as where_definition_list, CurrentLocationSpan); } break; - case 445: // func_header -> tkFunction, func_name, fp_list, optional_method_modificators, + case 449: // func_header -> tkFunction, func_name, fp_list, optional_method_modificators, // optional_where_section { CurrentSemanticValue.td = new function_header(ValueStack[ValueStack.Depth-3].stn as formal_parameters, ValueStack[ValueStack.Depth-2].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-4].stn as method_name, ValueStack[ValueStack.Depth-1].stn as where_definition_list, null, CurrentLocationSpan); } break; - case 446: // func_header -> tkFunction, func_name, fp_list, tkColon, fptype, + case 450: // func_header -> tkFunction, func_name, fp_list, tkColon, fptype, // optional_method_modificators, optional_where_section { CurrentSemanticValue.td = new function_header(ValueStack[ValueStack.Depth-5].stn as formal_parameters, ValueStack[ValueStack.Depth-2].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-6].stn as method_name, ValueStack[ValueStack.Depth-1].stn as where_definition_list, ValueStack[ValueStack.Depth-3].td as type_definition, CurrentLocationSpan); } break; - case 447: // external_block -> tkExternal, external_directive_ident, tkName, + case 451: // external_block -> tkExternal, external_directive_ident, tkName, // external_directive_ident, tkSemiColon { CurrentSemanticValue.stn = new external_directive(ValueStack[ValueStack.Depth-4].ex, ValueStack[ValueStack.Depth-2].ex, CurrentLocationSpan); } break; - case 448: // external_block -> tkExternal, external_directive_ident, tkSemiColon + case 452: // external_block -> tkExternal, external_directive_ident, tkSemiColon { CurrentSemanticValue.stn = new external_directive(ValueStack[ValueStack.Depth-2].ex, null, CurrentLocationSpan); } break; - case 449: // external_block -> tkExternal, tkSemiColon + case 453: // external_block -> tkExternal, tkSemiColon { CurrentSemanticValue.stn = new external_directive(null, null, CurrentLocationSpan); } break; - case 450: // external_directive_ident -> identifier + case 454: // external_directive_ident -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 451: // external_directive_ident -> literal + case 455: // external_directive_ident -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 452: // block -> decl_sect_list, compound_stmt, tkSemiColon + case 456: // block -> decl_sect_list, compound_stmt, tkSemiColon { CurrentSemanticValue.stn = new block(ValueStack[ValueStack.Depth-3].stn as declarations, ValueStack[ValueStack.Depth-2].stn as statement_list, CurrentLocationSpan); } break; - case 453: // inclass_block -> inclass_decl_sect_list, compound_stmt, tkSemiColon + case 457: // inclass_block -> inclass_decl_sect_list, compound_stmt, tkSemiColon { CurrentSemanticValue.stn = new block(ValueStack[ValueStack.Depth-3].stn as declarations, ValueStack[ValueStack.Depth-2].stn as statement_list, CurrentLocationSpan); } break; - case 454: // inclass_block -> external_block + case 458: // inclass_block -> external_block { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 455: // fp_list -> /* empty */ + case 459: // fp_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 456: // fp_list -> tkRoundOpen, tkRoundClose + case 460: // fp_list -> tkRoundOpen, tkRoundClose { CurrentSemanticValue.stn = null; } break; - case 457: // fp_list -> tkRoundOpen, fp_sect_list, tkRoundClose + case 461: // fp_list -> tkRoundOpen, fp_sect_list, tkRoundClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; if (CurrentSemanticValue.stn != null) CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 458: // fp_sect_list -> fp_sect + case 462: // fp_sect_list -> fp_sect { CurrentSemanticValue.stn = new formal_parameters(ValueStack[ValueStack.Depth-1].stn as typed_parameters, CurrentLocationSpan); } break; - case 459: // fp_sect_list -> fp_sect_list, tkSemiColon, fp_sect + case 463: // fp_sect_list -> fp_sect_list, tkSemiColon, fp_sect { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as formal_parameters).Add(ValueStack[ValueStack.Depth-1].stn as typed_parameters, CurrentLocationSpan); } break; - case 460: // fp_sect -> attribute_declarations, simple_fp_sect + case 464: // fp_sect -> attribute_declarations, simple_fp_sect { (ValueStack[ValueStack.Depth-1].stn as declaration).attributes = ValueStack[ValueStack.Depth-2].stn as attribute_list; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 461: // simple_fp_sect -> param_name_list, tkColon, fptype + case 465: // simple_fp_sect -> param_name_list, tkColon, fptype { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, parametr_kind.none, null, CurrentLocationSpan); } break; - case 462: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype + case 466: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, parametr_kind.var_parametr, null, CurrentLocationSpan); } break; - case 463: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype + case 467: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, parametr_kind.const_parametr, null, CurrentLocationSpan); } break; - case 464: // simple_fp_sect -> tkParams, param_name_list, tkColon, fptype + case 468: // simple_fp_sect -> tkParams, param_name_list, tkColon, fptype { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td,parametr_kind.params_parametr,null, CurrentLocationSpan); } break; - case 465: // simple_fp_sect -> param_name_list, tkColon, fptype, tkAssign, expr + case 469: // simple_fp_sect -> param_name_list, tkColon, fptype, tkAssign, expr { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-5].stn as ident_list, ValueStack[ValueStack.Depth-3].td, parametr_kind.none, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 466: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype, tkAssign, expr + case 470: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype, tkAssign, expr { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-5].stn as ident_list, ValueStack[ValueStack.Depth-3].td, parametr_kind.var_parametr, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 467: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype, tkAssign, expr + case 471: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype, tkAssign, expr { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-5].stn as ident_list, ValueStack[ValueStack.Depth-3].td, parametr_kind.const_parametr, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 468: // param_name_list -> param_name + case 472: // param_name_list -> param_name { CurrentSemanticValue.stn = new ident_list(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 469: // param_name_list -> param_name_list, tkComma, param_name + case 473: // param_name_list -> param_name_list, tkComma, param_name { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as ident_list).Add(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 470: // param_name -> identifier + case 474: // param_name -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 471: // fptype -> type_ref + case 475: // fptype -> type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 472: // fptype_noproctype -> simple_type + case 476: // fptype_noproctype -> simple_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 473: // fptype_noproctype -> string_type + case 477: // fptype_noproctype -> string_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 474: // fptype_noproctype -> pointer_type + case 478: // fptype_noproctype -> pointer_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 475: // fptype_noproctype -> structured_type + case 479: // fptype_noproctype -> structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 476: // fptype_noproctype -> template_type + case 480: // fptype_noproctype -> template_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 477: // stmt -> unlabelled_stmt + case 481: // stmt -> unlabelled_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 478: // stmt -> label_name, tkColon, stmt + case 482: // stmt -> label_name, tkColon, stmt { CurrentSemanticValue.stn = new labeled_statement(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 479: // unlabelled_stmt -> /* empty */ + case 483: // unlabelled_stmt -> /* empty */ { CurrentSemanticValue.stn = new empty_statement(); CurrentSemanticValue.stn.source_context = null; } break; - case 480: // unlabelled_stmt -> assignment + case 484: // unlabelled_stmt -> assignment { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 481: // unlabelled_stmt -> proc_call + case 485: // unlabelled_stmt -> proc_call { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 482: // unlabelled_stmt -> goto_stmt + case 486: // unlabelled_stmt -> goto_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 483: // unlabelled_stmt -> compound_stmt + case 487: // unlabelled_stmt -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 484: // unlabelled_stmt -> if_stmt + case 488: // unlabelled_stmt -> if_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 485: // unlabelled_stmt -> case_stmt + case 489: // unlabelled_stmt -> case_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 486: // unlabelled_stmt -> repeat_stmt + case 490: // unlabelled_stmt -> repeat_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 487: // unlabelled_stmt -> while_stmt + case 491: // unlabelled_stmt -> while_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 488: // unlabelled_stmt -> for_stmt + case 492: // unlabelled_stmt -> for_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 489: // unlabelled_stmt -> with_stmt + case 493: // unlabelled_stmt -> with_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 490: // unlabelled_stmt -> inherited_message + case 494: // unlabelled_stmt -> inherited_message { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 491: // unlabelled_stmt -> try_stmt + case 495: // unlabelled_stmt -> try_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 492: // unlabelled_stmt -> raise_stmt + case 496: // unlabelled_stmt -> raise_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 493: // unlabelled_stmt -> foreach_stmt + case 497: // unlabelled_stmt -> foreach_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 494: // unlabelled_stmt -> var_stmt + case 498: // unlabelled_stmt -> var_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 495: // unlabelled_stmt -> expr_as_stmt + case 499: // unlabelled_stmt -> expr_as_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 496: // unlabelled_stmt -> lock_stmt + case 500: // unlabelled_stmt -> lock_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 497: // unlabelled_stmt -> yield_stmt + case 501: // unlabelled_stmt -> yield_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 498: // unlabelled_stmt -> yield_sequence_stmt + case 502: // unlabelled_stmt -> yield_sequence_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 499: // unlabelled_stmt -> loop_stmt + case 503: // unlabelled_stmt -> loop_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 500: // unlabelled_stmt -> match_with + case 504: // unlabelled_stmt -> match_with { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 501: // loop_stmt -> tkLoop, expr_l1, tkDo, unlabelled_stmt + case 505: // loop_stmt -> tkLoop, expr_l1, tkDo, unlabelled_stmt { CurrentSemanticValue.stn = new loop_stmt(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].stn as statement,CurrentLocationSpan); } break; - case 502: // yield_stmt -> tkYield, expr_l1_func_decl_lambda + case 506: // yield_stmt -> tkYield, expr_l1_func_decl_lambda { CurrentSemanticValue.stn = new yield_node(ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); } break; - case 503: // yield_sequence_stmt -> tkYield, tkSequence, expr_l1_func_decl_lambda + case 507: // yield_sequence_stmt -> tkYield, tkSequence, expr_l1_func_decl_lambda { CurrentSemanticValue.stn = new yield_sequence_node(ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); } break; - case 504: // var_stmt -> tkVar, var_decl_part + case 508: // var_stmt -> tkVar, var_decl_part { CurrentSemanticValue.stn = new var_statement(ValueStack[ValueStack.Depth-1].stn as var_def_statement, CurrentLocationSpan); } break; - case 505: // var_stmt -> tkRoundOpen, tkVar, identifier, tkComma, var_ident_list, + case 509: // var_stmt -> tkRoundOpen, tkVar, identifier, tkComma, var_ident_list, // tkRoundClose, tkAssign, expr { (ValueStack[ValueStack.Depth-4].ob as ident_list).Insert(0,ValueStack[ValueStack.Depth-6].id); @@ -5151,7 +5184,7 @@ public partial class GPPGParser: ShiftReduceParser tkVar, tkRoundOpen, identifier, tkComma, ident_list, tkRoundClose, + case 510: // var_stmt -> tkVar, tkRoundOpen, identifier, tkComma, ident_list, tkRoundClose, // tkAssign, expr { (ValueStack[ValueStack.Depth-4].stn as ident_list).Insert(0,ValueStack[ValueStack.Depth-6].id); @@ -5159,12 +5192,12 @@ public partial class GPPGParser: ShiftReduceParser var_reference, assign_operator, expr_with_func_decl_lambda + case 511: // assignment -> var_reference, assign_operator, expr_with_func_decl_lambda { CurrentSemanticValue.stn = new assign(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 508: // assignment -> tkRoundOpen, variable, tkComma, variable_list, tkRoundClose, + case 512: // assignment -> tkRoundOpen, variable, tkComma, variable_list, tkRoundClose, // assign_operator, expr { if (ValueStack[ValueStack.Depth-2].op.type != Operators.Assignment) @@ -5174,7 +5207,7 @@ public partial class GPPGParser: ShiftReduceParser variable, tkQuestionSquareOpen, format_expr, tkSquareClose, + case 513: // assignment -> variable, tkQuestionSquareOpen, format_expr, tkSquareClose, // assign_operator, expr { var fe = ValueStack[ValueStack.Depth-4].ex as format_expr; @@ -5189,41 +5222,41 @@ public partial class GPPGParser: ShiftReduceParser variable + case 514: // variable_list -> variable { CurrentSemanticValue.ob = new addressed_value_list(ValueStack[ValueStack.Depth-1].ex as addressed_value,LocationStack[LocationStack.Depth-1]); } break; - case 511: // variable_list -> variable_list, tkComma, variable + case 515: // variable_list -> variable_list, tkComma, variable { (ValueStack[ValueStack.Depth-3].ob as addressed_value_list).Add(ValueStack[ValueStack.Depth-1].ex as addressed_value); (ValueStack[ValueStack.Depth-3].ob as syntax_tree_node).source_context = LexLocation.MergeAll(LocationStack[LocationStack.Depth-3],LocationStack[LocationStack.Depth-2],LocationStack[LocationStack.Depth-1]); CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-3].ob; } break; - case 512: // var_ident_list -> tkVar, identifier + case 516: // var_ident_list -> tkVar, identifier { CurrentSemanticValue.ob = new ident_list(ValueStack[ValueStack.Depth-1].id,CurrentLocationSpan); } break; - case 513: // var_ident_list -> var_ident_list, tkComma, tkVar, identifier + case 517: // var_ident_list -> var_ident_list, tkComma, tkVar, identifier { (ValueStack[ValueStack.Depth-4].ob as ident_list).Add(ValueStack[ValueStack.Depth-1].id); (ValueStack[ValueStack.Depth-4].ob as ident_list).source_context = LexLocation.MergeAll(LocationStack[LocationStack.Depth-4],LocationStack[LocationStack.Depth-3],LocationStack[LocationStack.Depth-2],LocationStack[LocationStack.Depth-1]); CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-4].ob; } break; - case 514: // proc_call -> var_reference + case 518: // proc_call -> var_reference { CurrentSemanticValue.stn = new procedure_call(ValueStack[ValueStack.Depth-1].ex as addressed_value, ValueStack[ValueStack.Depth-1].ex is ident, CurrentLocationSpan); } break; - case 515: // goto_stmt -> tkGoto, label_name + case 519: // goto_stmt -> tkGoto, label_name { CurrentSemanticValue.stn = new goto_statement(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 516: // compound_stmt -> tkBegin, stmt_list, tkEnd + case 520: // compound_stmt -> tkBegin, stmt_list, tkEnd { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; (CurrentSemanticValue.stn as statement_list).left_logical_bracket = ValueStack[ValueStack.Depth-3].ti; @@ -5231,124 +5264,124 @@ public partial class GPPGParser: ShiftReduceParser stmt + case 521: // stmt_list -> stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, LocationStack[LocationStack.Depth-1]); } break; - case 518: // stmt_list -> stmt_list, tkSemiColon, stmt + case 522: // stmt_list -> stmt_list, tkSemiColon, stmt { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as statement_list).Add(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 519: // if_stmt -> tkIf, expr_l1, tkThen, unlabelled_stmt + case 523: // if_stmt -> tkIf, expr_l1, tkThen, unlabelled_stmt { CurrentSemanticValue.stn = new if_node(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].stn as statement, null, CurrentLocationSpan); } break; - case 520: // if_stmt -> tkIf, expr_l1, tkThen, unlabelled_stmt, tkElse, unlabelled_stmt + case 524: // if_stmt -> tkIf, expr_l1, tkThen, unlabelled_stmt, tkElse, unlabelled_stmt { CurrentSemanticValue.stn = new if_node(ValueStack[ValueStack.Depth-5].ex, ValueStack[ValueStack.Depth-3].stn as statement, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 521: // match_with -> tkMatch, expr_l1, tkWith, pattern_cases, else_case, tkEnd + case 525: // match_with -> tkMatch, expr_l1, tkWith, pattern_cases, else_case, tkEnd { CurrentSemanticValue.stn = new match_with(ValueStack[ValueStack.Depth-5].ex, ValueStack[ValueStack.Depth-3].stn as pattern_cases, ValueStack[ValueStack.Depth-2].stn as statement, CurrentLocationSpan); } break; - case 522: // match_with -> tkMatch, expr_l1, tkWith, pattern_cases, tkSemiColon, else_case, + case 526: // match_with -> tkMatch, expr_l1, tkWith, pattern_cases, tkSemiColon, else_case, // tkEnd { CurrentSemanticValue.stn = new match_with(ValueStack[ValueStack.Depth-6].ex, ValueStack[ValueStack.Depth-4].stn as pattern_cases, ValueStack[ValueStack.Depth-2].stn as statement, CurrentLocationSpan); } break; - case 523: // pattern_cases -> pattern_case + case 527: // pattern_cases -> pattern_case { CurrentSemanticValue.stn = new pattern_cases(ValueStack[ValueStack.Depth-1].stn as pattern_case); } break; - case 524: // pattern_cases -> pattern_cases, tkSemiColon, pattern_case + case 528: // pattern_cases -> pattern_cases, tkSemiColon, pattern_case { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as pattern_cases).Add(ValueStack[ValueStack.Depth-1].stn as pattern_case); } break; - case 525: // pattern_case -> pattern_optional_var, tkWhen, expr_l1, tkColon, unlabelled_stmt + case 529: // pattern_case -> pattern_optional_var, tkWhen, expr_l1, tkColon, unlabelled_stmt { CurrentSemanticValue.stn = new pattern_case(ValueStack[ValueStack.Depth-5].stn as pattern_node, ValueStack[ValueStack.Depth-1].stn as statement, ValueStack[ValueStack.Depth-3].ex, CurrentLocationSpan); } break; - case 526: // pattern_case -> deconstruction_or_const_pattern, tkColon, unlabelled_stmt + case 530: // pattern_case -> deconstruction_or_const_pattern, tkColon, unlabelled_stmt { CurrentSemanticValue.stn = new pattern_case(ValueStack[ValueStack.Depth-3].stn as pattern_node, ValueStack[ValueStack.Depth-1].stn as statement, null, CurrentLocationSpan); } break; - case 527: // pattern_case -> collection_pattern, tkColon, unlabelled_stmt + case 531: // pattern_case -> collection_pattern, tkColon, unlabelled_stmt { CurrentSemanticValue.stn = new pattern_case(ValueStack[ValueStack.Depth-3].stn as pattern_node, ValueStack[ValueStack.Depth-1].stn as statement, null, CurrentLocationSpan); } break; - case 528: // pattern_case -> tuple_pattern, tkWhen, expr_l1, tkColon, unlabelled_stmt + case 532: // pattern_case -> tuple_pattern, tkWhen, expr_l1, tkColon, unlabelled_stmt { CurrentSemanticValue.stn = new pattern_case(ValueStack[ValueStack.Depth-5].stn as pattern_node, ValueStack[ValueStack.Depth-1].stn as statement, ValueStack[ValueStack.Depth-3].ex, CurrentLocationSpan); } break; - case 529: // pattern_case -> tuple_pattern, tkColon, unlabelled_stmt + case 533: // pattern_case -> tuple_pattern, tkColon, unlabelled_stmt { CurrentSemanticValue.stn = new pattern_case(ValueStack[ValueStack.Depth-3].stn as pattern_node, ValueStack[ValueStack.Depth-1].stn as statement, null, CurrentLocationSpan); } break; - case 530: // case_stmt -> tkCase, expr_l1, tkOf, case_list, else_case, tkEnd + case 534: // case_stmt -> tkCase, expr_l1, tkOf, case_list, else_case, tkEnd { CurrentSemanticValue.stn = new case_node(ValueStack[ValueStack.Depth-5].ex, ValueStack[ValueStack.Depth-3].stn as case_variants, ValueStack[ValueStack.Depth-2].stn as statement, CurrentLocationSpan); } break; - case 531: // case_stmt -> tkCase, expr_l1, tkOf, case_list, tkSemiColon, else_case, tkEnd + case 535: // case_stmt -> tkCase, expr_l1, tkOf, case_list, tkSemiColon, else_case, tkEnd { CurrentSemanticValue.stn = new case_node(ValueStack[ValueStack.Depth-6].ex, ValueStack[ValueStack.Depth-4].stn as case_variants, ValueStack[ValueStack.Depth-2].stn as statement, CurrentLocationSpan); } break; - case 532: // case_stmt -> tkCase, expr_l1, tkOf, else_case, tkEnd + case 536: // case_stmt -> tkCase, expr_l1, tkOf, else_case, tkEnd { CurrentSemanticValue.stn = new case_node(ValueStack[ValueStack.Depth-4].ex, NewCaseItem(new empty_statement(), null), ValueStack[ValueStack.Depth-2].stn as statement, CurrentLocationSpan); } break; - case 533: // case_list -> case_item + case 537: // case_list -> case_item { if (ValueStack[ValueStack.Depth-1].stn is empty_statement) CurrentSemanticValue.stn = NewCaseItem(ValueStack[ValueStack.Depth-1].stn, null); else CurrentSemanticValue.stn = NewCaseItem(ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 534: // case_list -> case_list, tkSemiColon, case_item + case 538: // case_list -> case_list, tkSemiColon, case_item { CurrentSemanticValue.stn = AddCaseItem(ValueStack[ValueStack.Depth-3].stn as case_variants, ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 535: // case_item -> case_label_list, tkColon, unlabelled_stmt + case 539: // case_item -> case_label_list, tkColon, unlabelled_stmt { CurrentSemanticValue.stn = new case_variant(ValueStack[ValueStack.Depth-3].stn as expression_list, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 536: // case_label_list -> case_label + case 540: // case_label_list -> case_label { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 537: // case_label_list -> case_label_list, tkComma, case_label + case 541: // case_label_list -> case_label_list, tkComma, case_label { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as expression_list).Add(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 538: // case_label -> const_elem + case 542: // case_label -> const_elem { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 539: // else_case -> /* empty */ + case 543: // else_case -> /* empty */ { CurrentSemanticValue.stn = null;} break; - case 540: // else_case -> tkElse, stmt_list + case 544: // else_case -> tkElse, stmt_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 541: // repeat_stmt -> tkRepeat, stmt_list, tkUntil, expr + case 545: // repeat_stmt -> tkRepeat, stmt_list, tkUntil, expr { CurrentSemanticValue.stn = new repeat_node(ValueStack[ValueStack.Depth-3].stn as statement_list, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); (ValueStack[ValueStack.Depth-3].stn as statement_list).left_logical_bracket = ValueStack[ValueStack.Depth-4].ti; @@ -5356,23 +5389,23 @@ public partial class GPPGParser: ShiftReduceParser tkWhile, expr_l1, optional_tk_do, unlabelled_stmt + case 546: // while_stmt -> tkWhile, expr_l1, optional_tk_do, unlabelled_stmt { CurrentSemanticValue.stn = NewWhileStmt(ValueStack[ValueStack.Depth-4].ti, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-2].ti, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 543: // optional_tk_do -> tkDo + case 547: // optional_tk_do -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 544: // optional_tk_do -> /* empty */ + case 548: // optional_tk_do -> /* empty */ { CurrentSemanticValue.ti = null; } break; - case 545: // lock_stmt -> tkLock, expr_l1, tkDo, unlabelled_stmt + case 549: // lock_stmt -> tkLock, expr_l1, tkDo, unlabelled_stmt { CurrentSemanticValue.stn = new lock_stmt(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 546: // foreach_stmt -> tkForeach, identifier, foreach_stmt_ident_dype_opt, tkIn, + case 550: // foreach_stmt -> tkForeach, identifier, foreach_stmt_ident_dype_opt, tkIn, // expr_l1, tkDo, unlabelled_stmt { CurrentSemanticValue.stn = new foreach_stmt(ValueStack[ValueStack.Depth-6].id, ValueStack[ValueStack.Depth-5].td, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); @@ -5380,68 +5413,68 @@ public partial class GPPGParser: ShiftReduceParser tkForeach, tkVar, identifier, tkColon, type_ref, tkIn, expr_l1, + case 551: // foreach_stmt -> tkForeach, tkVar, identifier, tkColon, type_ref, tkIn, expr_l1, // tkDo, unlabelled_stmt { CurrentSemanticValue.stn = new foreach_stmt(ValueStack[ValueStack.Depth-7].id, ValueStack[ValueStack.Depth-5].td, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 548: // foreach_stmt -> tkForeach, tkVar, identifier, tkIn, expr_l1, tkDo, + case 552: // foreach_stmt -> tkForeach, tkVar, identifier, tkIn, expr_l1, tkDo, // unlabelled_stmt { CurrentSemanticValue.stn = new foreach_stmt(ValueStack[ValueStack.Depth-5].id, new no_type_foreach(), ValueStack[ValueStack.Depth-3].ex, (statement)ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 549: // foreach_stmt_ident_dype_opt -> tkColon, type_ref + case 553: // foreach_stmt_ident_dype_opt -> tkColon, type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 551: // for_stmt -> tkFor, optional_var, identifier, for_stmt_decl_or_assign, expr_l1, + case 555: // for_stmt -> tkFor, optional_var, identifier, for_stmt_decl_or_assign, expr_l1, // for_cycle_type, expr_l1, optional_tk_do, unlabelled_stmt { CurrentSemanticValue.stn = NewForStmt((bool)ValueStack[ValueStack.Depth-8].ob, ValueStack[ValueStack.Depth-7].id, ValueStack[ValueStack.Depth-6].td, ValueStack[ValueStack.Depth-5].ex, (for_cycle_type)ValueStack[ValueStack.Depth-4].ob, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-2].ti, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 552: // optional_var -> tkVar + case 556: // optional_var -> tkVar { CurrentSemanticValue.ob = true; } break; - case 553: // optional_var -> /* empty */ + case 557: // optional_var -> /* empty */ { CurrentSemanticValue.ob = false; } break; - case 555: // for_stmt_decl_or_assign -> tkColon, simple_type_identifier, tkAssign + case 559: // for_stmt_decl_or_assign -> tkColon, simple_type_identifier, tkAssign { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-2].td; } break; - case 556: // for_cycle_type -> tkTo + case 560: // for_cycle_type -> tkTo { CurrentSemanticValue.ob = for_cycle_type.to; } break; - case 557: // for_cycle_type -> tkDownto + case 561: // for_cycle_type -> tkDownto { CurrentSemanticValue.ob = for_cycle_type.downto; } break; - case 558: // with_stmt -> tkWith, expr_list, tkDo, unlabelled_stmt + case 562: // with_stmt -> tkWith, expr_list, tkDo, unlabelled_stmt { CurrentSemanticValue.stn = new with_statement(ValueStack[ValueStack.Depth-1].stn as statement, ValueStack[ValueStack.Depth-3].stn as expression_list, CurrentLocationSpan); } break; - case 559: // inherited_message -> tkInherited + case 563: // inherited_message -> tkInherited { CurrentSemanticValue.stn = new inherited_message(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 560: // try_stmt -> tkTry, stmt_list, try_handler + case 564: // try_stmt -> tkTry, stmt_list, try_handler { CurrentSemanticValue.stn = new try_stmt(ValueStack[ValueStack.Depth-2].stn as statement_list, ValueStack[ValueStack.Depth-1].stn as try_handler, CurrentLocationSpan); (ValueStack[ValueStack.Depth-2].stn as statement_list).left_logical_bracket = ValueStack[ValueStack.Depth-3].ti; ValueStack[ValueStack.Depth-2].stn.source_context = LocationStack[LocationStack.Depth-3].Merge(LocationStack[LocationStack.Depth-2]); } break; - case 561: // try_handler -> tkFinally, stmt_list, tkEnd + case 565: // try_handler -> tkFinally, stmt_list, tkEnd { CurrentSemanticValue.stn = new try_handler_finally(ValueStack[ValueStack.Depth-2].stn as statement_list, CurrentLocationSpan); (ValueStack[ValueStack.Depth-2].stn as statement_list).left_logical_bracket = ValueStack[ValueStack.Depth-3].ti; (ValueStack[ValueStack.Depth-2].stn as statement_list).right_logical_bracket = ValueStack[ValueStack.Depth-1].ti; } break; - case 562: // try_handler -> tkExcept, exception_block, tkEnd + case 566: // try_handler -> tkExcept, exception_block, tkEnd { CurrentSemanticValue.stn = new try_handler_except((exception_block)ValueStack[ValueStack.Depth-2].stn, CurrentLocationSpan); if ((ValueStack[ValueStack.Depth-2].stn as exception_block).stmt_list != null) @@ -5451,163 +5484,163 @@ public partial class GPPGParser: ShiftReduceParser exception_handler_list, exception_block_else_branch + case 567: // exception_block -> exception_handler_list, exception_block_else_branch { CurrentSemanticValue.stn = new exception_block(null, (exception_handler_list)ValueStack[ValueStack.Depth-2].stn, (statement_list)ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 564: // exception_block -> exception_handler_list, tkSemiColon, + case 568: // exception_block -> exception_handler_list, tkSemiColon, // exception_block_else_branch { CurrentSemanticValue.stn = new exception_block(null, (exception_handler_list)ValueStack[ValueStack.Depth-3].stn, (statement_list)ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 565: // exception_block -> stmt_list + case 569: // exception_block -> stmt_list { CurrentSemanticValue.stn = new exception_block(ValueStack[ValueStack.Depth-1].stn as statement_list, null, null, LocationStack[LocationStack.Depth-1]); } break; - case 566: // exception_handler_list -> exception_handler + case 570: // exception_handler_list -> exception_handler { CurrentSemanticValue.stn = new exception_handler_list(ValueStack[ValueStack.Depth-1].stn as exception_handler, CurrentLocationSpan); } break; - case 567: // exception_handler_list -> exception_handler_list, tkSemiColon, + case 571: // exception_handler_list -> exception_handler_list, tkSemiColon, // exception_handler { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as exception_handler_list).Add(ValueStack[ValueStack.Depth-1].stn as exception_handler, CurrentLocationSpan); } break; - case 568: // exception_block_else_branch -> /* empty */ + case 572: // exception_block_else_branch -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 569: // exception_block_else_branch -> tkElse, stmt_list + case 573: // exception_block_else_branch -> tkElse, stmt_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 570: // exception_handler -> tkOn, exception_identifier, tkDo, unlabelled_stmt + case 574: // exception_handler -> tkOn, exception_identifier, tkDo, unlabelled_stmt { CurrentSemanticValue.stn = new exception_handler((ValueStack[ValueStack.Depth-3].stn as exception_ident).variable, (ValueStack[ValueStack.Depth-3].stn as exception_ident).type_name, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 571: // exception_identifier -> exception_class_type_identifier + case 575: // exception_identifier -> exception_class_type_identifier { CurrentSemanticValue.stn = new exception_ident(null, (named_type_reference)ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 572: // exception_identifier -> exception_variable, tkColon, + case 576: // exception_identifier -> exception_variable, tkColon, // exception_class_type_identifier { CurrentSemanticValue.stn = new exception_ident(ValueStack[ValueStack.Depth-3].id, (named_type_reference)ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 573: // exception_class_type_identifier -> simple_type_identifier + case 577: // exception_class_type_identifier -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 574: // exception_variable -> identifier + case 578: // exception_variable -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 575: // raise_stmt -> tkRaise + case 579: // raise_stmt -> tkRaise { CurrentSemanticValue.stn = new raise_stmt(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 576: // raise_stmt -> tkRaise, expr + case 580: // raise_stmt -> tkRaise, expr { CurrentSemanticValue.stn = new raise_stmt(ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 577: // expr_list -> expr_with_func_decl_lambda + case 581: // expr_list -> expr_with_func_decl_lambda { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 578: // expr_list -> expr_list, tkComma, expr_with_func_decl_lambda + case 582: // expr_list -> expr_list, tkComma, expr_with_func_decl_lambda { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as expression_list).Add(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 579: // expr_as_stmt -> allowable_expr_as_stmt + case 583: // expr_as_stmt -> allowable_expr_as_stmt { CurrentSemanticValue.stn = new expression_as_statement(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 580: // allowable_expr_as_stmt -> new_expr + case 584: // allowable_expr_as_stmt -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 581: // expr_with_func_decl_lambda -> expr + case 585: // expr_with_func_decl_lambda -> expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 582: // expr_with_func_decl_lambda -> func_decl_lambda + case 586: // expr_with_func_decl_lambda -> func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 583: // expr -> expr_l1 + case 587: // expr -> expr_l1 { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 584: // expr -> format_expr + case 588: // expr -> format_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 585: // expr_l1 -> expr_dq + case 589: // expr_l1 -> expr_dq { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 586: // expr_l1 -> question_expr + case 590: // expr_l1 -> question_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 587: // expr_l1 -> new_question_expr + case 591: // expr_l1 -> new_question_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 588: // expr_l1_for_question_expr -> expr_dq + case 592: // expr_l1_for_question_expr -> expr_dq { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 589: // expr_l1_for_question_expr -> question_expr + case 593: // expr_l1_for_question_expr -> question_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 590: // expr_l1_for_new_question_expr -> expr_dq + case 594: // expr_l1_for_new_question_expr -> expr_dq { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 591: // expr_l1_for_new_question_expr -> new_question_expr + case 595: // expr_l1_for_new_question_expr -> new_question_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 592: // expr_l1_func_decl_lambda -> expr_l1 + case 596: // expr_l1_func_decl_lambda -> expr_l1 { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 593: // expr_l1_func_decl_lambda -> func_decl_lambda + case 597: // expr_l1_func_decl_lambda -> func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 594: // expr_l1_for_lambda -> expr_dq + case 598: // expr_l1_for_lambda -> expr_dq { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 595: // expr_l1_for_lambda -> question_expr + case 599: // expr_l1_for_lambda -> question_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 596: // expr_l1_for_lambda -> func_decl_lambda + case 600: // expr_l1_for_lambda -> func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 597: // expr_dq -> relop_expr + case 601: // expr_dq -> relop_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 598: // expr_dq -> expr_dq, tkDoubleQuestion, relop_expr + case 602: // 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 599: // sizeof_expr -> tkSizeOf, tkRoundOpen, simple_or_template_type_reference, + case 603: // 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 600: // typeof_expr -> tkTypeOf, tkRoundOpen, simple_or_template_type_reference, + case 604: // 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 601: // typeof_expr -> tkTypeOf, tkRoundOpen, empty_template_type_reference, + case 605: // 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 602: // question_expr -> expr_l1_for_question_expr, tkQuestion, + case 606: // question_expr -> expr_l1_for_question_expr, tkQuestion, // expr_l1_for_question_expr, tkColon, // expr_l1_for_question_expr { @@ -5616,7 +5649,7 @@ public partial class GPPGParser: ShiftReduceParser tkIf, expr_l1_for_new_question_expr, tkThen, + case 607: // new_question_expr -> tkIf, expr_l1_for_new_question_expr, tkThen, // expr_l1_for_new_question_expr, tkElse, // expr_l1_for_new_question_expr { @@ -5632,47 +5665,47 @@ public partial class GPPGParser: ShiftReduceParser simple_type_identifier, + case 608: // 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 605: // empty_template_type_reference -> simple_type_identifier, tkAmpersend, + case 609: // 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 606: // simple_or_template_type_reference -> simple_type_identifier + case 610: // simple_or_template_type_reference -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 607: // simple_or_template_type_reference -> simple_type_identifier, + case 611: // 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 608: // simple_or_template_type_reference -> simple_type_identifier, tkAmpersend, + case 612: // 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 609: // optional_array_initializer -> tkRoundOpen, typed_const_list, tkRoundClose + case 613: // optional_array_initializer -> tkRoundOpen, typed_const_list, tkRoundClose { CurrentSemanticValue.stn = new array_const((expression_list)ValueStack[ValueStack.Depth-2].stn, CurrentLocationSpan); } break; - case 611: // new_expr -> tkNew, simple_or_template_type_reference, + case 615: // 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 612: // new_expr -> tkNew, simple_or_template_type_reference, tkSquareOpen, + case 616: // 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; @@ -5688,7 +5721,7 @@ public partial class GPPGParser: ShiftReduceParser tkNew, tkClass, tkRoundOpen, list_fields_in_unnamed_object, + case 617: // new_expr -> tkNew, tkClass, tkRoundOpen, list_fields_in_unnamed_object, // tkRoundClose { // sugared node @@ -5703,14 +5736,14 @@ public partial class GPPGParser: ShiftReduceParser identifier, tkAssign, relop_expr + case 618: // 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 615: // field_in_unnamed_object -> relop_expr + case 619: // field_in_unnamed_object -> relop_expr { ident name = null; var id = ValueStack[ValueStack.Depth-1].ex as ident; @@ -5730,13 +5763,13 @@ public partial class GPPGParser: ShiftReduceParser field_in_unnamed_object + case 620: // 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 617: // list_fields_in_unnamed_object -> list_fields_in_unnamed_object, tkComma, + case 621: // 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; @@ -5747,46 +5780,46 @@ public partial class GPPGParser: ShiftReduceParser /* empty */ + case 622: // optional_expr_list_with_bracket -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 619: // optional_expr_list_with_bracket -> tkRoundOpen, optional_expr_list, + case 623: // optional_expr_list_with_bracket -> tkRoundOpen, optional_expr_list, // tkRoundClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 620: // relop_expr -> simple_expr + case 624: // relop_expr -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 621: // relop_expr -> relop_expr, relop, simple_expr + case 625: // 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 622: // relop_expr -> relop_expr, relop, new_question_expr + case 626: // relop_expr -> relop_expr, relop, 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 623: // relop_expr -> is_type_expr, tkRoundOpen, pattern_out_param_list, tkRoundClose + case 627: // 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 624: // pattern -> simple_or_template_type_reference, tkRoundOpen, + case 628: // 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 625: // pattern_optional_var -> simple_or_template_type_reference, tkRoundOpen, + case 629: // 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 626: // deconstruction_or_const_pattern -> simple_or_template_type_reference, + case 630: // deconstruction_or_const_pattern -> simple_or_template_type_reference, // tkRoundOpen, // pattern_out_param_list_optional_var, // tkRoundClose @@ -5794,18 +5827,18 @@ public partial class GPPGParser: ShiftReduceParser, ValueStack[ValueStack.Depth-4].td, null, CurrentLocationSpan); } break; - case 627: // deconstruction_or_const_pattern -> const_pattern_expr_list + case 631: // deconstruction_or_const_pattern -> const_pattern_expr_list { CurrentSemanticValue.stn = new const_pattern(ValueStack[ValueStack.Depth-1].ob as List, CurrentLocationSpan); } break; - case 628: // const_pattern_expr_list -> const_pattern_expression + case 632: // const_pattern_expr_list -> const_pattern_expression { CurrentSemanticValue.ob = new List(); (CurrentSemanticValue.ob as List).Add(ValueStack[ValueStack.Depth-1].stn); } break; - case 629: // const_pattern_expr_list -> const_pattern_expr_list, tkComma, + case 633: // const_pattern_expr_list -> const_pattern_expr_list, tkComma, // const_pattern_expression { var list = ValueStack[ValueStack.Depth-3].ob as List; @@ -5813,36 +5846,36 @@ public partial class GPPGParser: ShiftReduceParser literal_or_number + case 634: // const_pattern_expression -> literal_or_number { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].ex; } break; - case 631: // const_pattern_expression -> simple_or_template_type_reference + case 635: // const_pattern_expression -> simple_or_template_type_reference { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].td; } break; - case 632: // const_pattern_expression -> tkNil + case 636: // const_pattern_expression -> tkNil { CurrentSemanticValue.stn = new nil_const(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 633: // const_pattern_expression -> sizeof_expr + case 637: // const_pattern_expression -> sizeof_expr { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].ex; } break; - case 634: // const_pattern_expression -> typeof_expr + case 638: // const_pattern_expression -> typeof_expr { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].ex; } break; - case 635: // collection_pattern -> tkSquareOpen, collection_pattern_expr_list, tkSquareClose + case 639: // collection_pattern -> tkSquareOpen, collection_pattern_expr_list, tkSquareClose { CurrentSemanticValue.stn = new collection_pattern(ValueStack[ValueStack.Depth-2].ob as List, CurrentLocationSpan); } break; - case 636: // collection_pattern_expr_list -> collection_pattern_list_item + case 640: // 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 637: // collection_pattern_expr_list -> collection_pattern_expr_list, tkComma, + case 641: // collection_pattern_expr_list -> collection_pattern_expr_list, tkComma, // collection_pattern_list_item { var list = ValueStack[ValueStack.Depth-3].ob as List; @@ -5850,108 +5883,108 @@ public partial class GPPGParser: ShiftReduceParser literal_or_number + case 642: // collection_pattern_list_item -> literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 639: // collection_pattern_list_item -> collection_pattern_var_item + case 643: // collection_pattern_list_item -> collection_pattern_var_item { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 640: // collection_pattern_list_item -> tkUnderscore + case 644: // collection_pattern_list_item -> tkUnderscore { CurrentSemanticValue.stn = new collection_pattern_wild_card(CurrentLocationSpan); } break; - case 641: // collection_pattern_list_item -> pattern_optional_var + case 645: // collection_pattern_list_item -> pattern_optional_var { CurrentSemanticValue.stn = new recursive_deconstructor_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 642: // collection_pattern_list_item -> collection_pattern + case 646: // collection_pattern_list_item -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 643: // collection_pattern_list_item -> tuple_pattern + case 647: // collection_pattern_list_item -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 644: // collection_pattern_list_item -> tkDotDot + case 648: // collection_pattern_list_item -> tkDotDot { CurrentSemanticValue.stn = new collection_pattern_gap_parameter(CurrentLocationSpan); } break; - case 645: // collection_pattern_var_item -> tkVar, identifier + case 649: // collection_pattern_var_item -> tkVar, identifier { CurrentSemanticValue.stn = new collection_pattern_var_parameter(ValueStack[ValueStack.Depth-1].id, null, CurrentLocationSpan); } break; - case 646: // tuple_pattern -> tkRoundOpen, tuple_pattern_item_list, tkRoundClose + case 650: // 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 647: // tuple_pattern_item -> tkUnderscore + case 651: // tuple_pattern_item -> tkUnderscore { CurrentSemanticValue.stn = new tuple_pattern_wild_card(CurrentLocationSpan); } break; - case 648: // tuple_pattern_item -> literal_or_number + case 652: // tuple_pattern_item -> literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 649: // tuple_pattern_item -> sign, literal_or_number + case 653: // 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 650: // tuple_pattern_item -> tkVar, identifier + case 654: // tuple_pattern_item -> tkVar, identifier { CurrentSemanticValue.stn = new tuple_pattern_var_parameter(ValueStack[ValueStack.Depth-1].id, null, CurrentLocationSpan); } break; - case 651: // tuple_pattern_item -> pattern_optional_var + case 655: // tuple_pattern_item -> pattern_optional_var { CurrentSemanticValue.stn = new recursive_deconstructor_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 652: // tuple_pattern_item -> collection_pattern + case 656: // tuple_pattern_item -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 653: // tuple_pattern_item -> tuple_pattern + case 657: // tuple_pattern_item -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 654: // tuple_pattern_item_list -> tuple_pattern_item + case 658: // 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 655: // tuple_pattern_item_list -> tuple_pattern_item_list, tkComma, tuple_pattern_item + case 659: // 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 656: // pattern_out_param_list_optional_var -> pattern_out_param_optional_var + case 660: // 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 657: // pattern_out_param_list_optional_var -> pattern_out_param_list_optional_var, + case 661: // pattern_out_param_list_optional_var -> pattern_out_param_list_optional_var, // tkSemiColon, // pattern_out_param_optional_var { @@ -5960,7 +5993,7 @@ public partial class GPPGParser: ShiftReduceParser pattern_out_param_list_optional_var, + case 662: // pattern_out_param_list_optional_var -> pattern_out_param_list_optional_var, // tkComma, // pattern_out_param_optional_var { @@ -5969,13 +6002,13 @@ public partial class GPPGParser: ShiftReduceParser pattern_out_param + case 663: // 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 660: // pattern_out_param_list -> pattern_out_param_list, tkSemiColon, + case 664: // pattern_out_param_list -> pattern_out_param_list, tkSemiColon, // pattern_out_param { var list = ValueStack[ValueStack.Depth-3].ob as List; @@ -5983,185 +6016,185 @@ public partial class GPPGParser: ShiftReduceParser pattern_out_param_list, tkComma, pattern_out_param + case 665: // 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 662: // pattern_out_param -> tkUnderscore + case 666: // pattern_out_param -> tkUnderscore { CurrentSemanticValue.stn = new wild_card_deconstructor_parameter(CurrentLocationSpan); } break; - case 663: // pattern_out_param -> literal_or_number + case 667: // pattern_out_param -> literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 664: // pattern_out_param -> tkVar, identifier, tkColon, type_ref + case 668: // 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 665: // pattern_out_param -> tkVar, identifier + case 669: // pattern_out_param -> tkVar, identifier { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-1].id, null, true, CurrentLocationSpan); } break; - case 666: // pattern_out_param -> pattern + case 670: // pattern_out_param -> pattern { CurrentSemanticValue.stn = new recursive_deconstructor_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 667: // pattern_out_param -> collection_pattern + case 671: // pattern_out_param -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 668: // pattern_out_param -> tuple_pattern + case 672: // pattern_out_param -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 669: // pattern_out_param_optional_var -> tkUnderscore + case 673: // pattern_out_param_optional_var -> tkUnderscore { CurrentSemanticValue.stn = new wild_card_deconstructor_parameter(CurrentLocationSpan); } break; - case 670: // pattern_out_param_optional_var -> literal_or_number + case 674: // pattern_out_param_optional_var -> literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 671: // pattern_out_param_optional_var -> sign, literal_or_number + case 675: // 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 672: // pattern_out_param_optional_var -> identifier, tkColon, type_ref + case 676: // 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 673: // pattern_out_param_optional_var -> identifier + case 677: // pattern_out_param_optional_var -> identifier { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-1].id, null, false, CurrentLocationSpan); } break; - case 674: // pattern_out_param_optional_var -> tkVar, identifier, tkColon, type_ref + case 678: // 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 675: // pattern_out_param_optional_var -> tkVar, identifier + case 679: // pattern_out_param_optional_var -> tkVar, identifier { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-1].id, null, true, CurrentLocationSpan); } break; - case 676: // pattern_out_param_optional_var -> pattern_optional_var + case 680: // 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 677: // pattern_out_param_optional_var -> collection_pattern + case 681: // pattern_out_param_optional_var -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 678: // pattern_out_param_optional_var -> tuple_pattern + case 682: // pattern_out_param_optional_var -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 679: // simple_expr_or_nothing -> simple_expr + case 683: // simple_expr_or_nothing -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 680: // simple_expr_or_nothing -> /* empty */ + case 684: // simple_expr_or_nothing -> /* empty */ { CurrentSemanticValue.ex = null; } break; - case 681: // const_expr_or_nothing -> const_expr + case 685: // const_expr_or_nothing -> const_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 682: // const_expr_or_nothing -> /* empty */ + case 686: // const_expr_or_nothing -> /* empty */ { CurrentSemanticValue.ex = null; } break; - case 683: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing + case 687: // 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 684: // format_expr -> tkColon, simple_expr_or_nothing + case 688: // format_expr -> tkColon, simple_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 685: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing, tkColon, + case 689: // 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 686: // format_expr -> tkColon, simple_expr_or_nothing, tkColon, simple_expr + case 690: // 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 687: // format_const_expr -> const_expr, tkColon, const_expr_or_nothing + case 691: // 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 688: // format_const_expr -> tkColon, const_expr_or_nothing + case 692: // format_const_expr -> tkColon, const_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 689: // format_const_expr -> const_expr, tkColon, const_expr_or_nothing, tkColon, + case 693: // 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 690: // format_const_expr -> tkColon, const_expr_or_nothing, tkColon, const_expr + case 694: // 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 691: // relop -> tkEqual + case 695: // relop -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 692: // relop -> tkNotEqual + case 696: // relop -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 693: // relop -> tkLower + case 697: // relop -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 694: // relop -> tkGreater + case 698: // relop -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 695: // relop -> tkLowerEqual + case 699: // relop -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 696: // relop -> tkGreaterEqual + case 700: // relop -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 697: // relop -> tkIn + case 701: // relop -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 698: // simple_expr -> term1 + case 702: // simple_expr -> term1 { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 699: // simple_expr -> simple_expr, tkDotDot, term1 + case 703: // 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); @@ -6169,115 +6202,118 @@ public partial class GPPGParser: ShiftReduceParser term + case 704: // term1 -> term { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 701: // term1 -> term1, addop, term + case 705: // 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 702: // term1 -> term1, addop, new_question_expr + case 706: // 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 703: // addop -> tkPlus + case 707: // addop -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 704: // addop -> tkMinus + case 708: // addop -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 705: // addop -> tkOr + case 709: // addop -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 706: // addop -> tkXor + case 710: // addop -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 707: // addop -> tkCSharpStyleOr + case 711: // addop -> tkCSharpStyleOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 708: // typecast_op -> tkAs + case 712: // typecast_op -> tkAs { CurrentSemanticValue.ob = op_typecast.as_op; } break; - case 709: // typecast_op -> tkIs + case 713: // typecast_op -> tkIs { CurrentSemanticValue.ob = op_typecast.is_op; } break; - case 710: // as_is_expr -> is_type_expr + case 714: // as_is_expr -> is_type_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 711: // as_is_expr -> as_expr + case 715: // as_is_expr -> as_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 712: // as_expr -> term, tkAs, simple_or_template_type_reference + case 716: // 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 713: // is_type_expr -> term, tkIs, simple_or_template_type_reference + case 717: // 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 714: // simple_term -> factor -{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } - break; - case 715: // power_expr -> simple_term, tkStarStar, factor + case 718: // power_expr -> factor_without_unary_op, tkStarStar, factor { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].ex,(ValueStack[ValueStack.Depth-2].op).type, CurrentLocationSpan); } break; - case 716: // term -> factor -{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } - break; - case 717: // term -> new_expr -{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } - break; - case 718: // term -> power_expr -{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } - break; - case 719: // term -> term, mulop, factor + case 719: // power_expr -> factor_without_unary_op, tkStarStar, power_expr { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].ex,(ValueStack[ValueStack.Depth-2].op).type, CurrentLocationSpan); } break; - case 720: // 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); } + case 720: // power_expr -> sign, power_expr +{ CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 721: // 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 722: // term -> as_is_expr + case 721: // term -> factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 723: // mulop -> tkStar + case 722: // term -> new_expr +{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } + break; + case 723: // term -> power_expr +{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } + break; + case 724: // 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 725: // 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 726: // 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 727: // term -> as_is_expr +{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } + break; + case 728: // mulop -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 724: // mulop -> tkSlash + case 729: // mulop -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 725: // mulop -> tkDiv + case 730: // mulop -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 726: // mulop -> tkMod + case 731: // mulop -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 727: // mulop -> tkShl + case 732: // mulop -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 728: // mulop -> tkShr + case 733: // mulop -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 729: // mulop -> tkAnd + case 734: // mulop -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 730: // default_expr -> tkDefault, tkRoundOpen, simple_or_template_type_reference, + case 735: // 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 731: // tuple -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, lambda_type_ref, + case 736: // tuple -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, lambda_type_ref, // optional_full_lambda_fp_list, tkRoundClose { /*if ($5 != null) @@ -6291,29 +6327,35 @@ public partial class GPPGParser: ShiftReduceParser tkNil + case 737: // factor_without_unary_op -> literal_or_number +{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } + break; + case 738: // factor_without_unary_op -> var_reference +{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } + break; + case 739: // factor -> tkNil { CurrentSemanticValue.ex = new nil_const(); CurrentSemanticValue.ex.source_context = CurrentLocationSpan; } break; - case 733: // factor -> literal_or_number + case 740: // factor -> literal_or_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 734: // factor -> default_expr + case 741: // factor -> default_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 735: // factor -> tkSquareOpen, elem_list, tkSquareClose + case 742: // factor -> tkSquareOpen, elem_list, tkSquareClose { CurrentSemanticValue.ex = new pascal_set_constant(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 736: // factor -> tkNot, factor + case 743: // factor -> tkNot, factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 737: // factor -> sign, factor + case 744: // factor -> sign, factor { if (ValueStack[ValueStack.Depth-2].op.type == Operators.Minus) { @@ -6336,100 +6378,99 @@ public partial class GPPGParser: ShiftReduceParser tkDeref, factor + case 745: // factor -> tkDeref, factor { CurrentSemanticValue.ex = new index(ValueStack[ValueStack.Depth-1].ex, true, CurrentLocationSpan); } break; - case 739: // factor -> var_reference + case 746: // factor -> var_reference { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 740: // factor -> tuple + case 747: // factor -> tuple { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 741: // literal_or_number -> literal + case 748: // literal_or_number -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 742: // literal_or_number -> unsigned_number + case 749: // literal_or_number -> unsigned_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 743: // var_question_point -> variable, tkQuestionPoint, variable + case 750: // 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 744: // var_question_point -> variable, tkQuestionPoint, var_question_point + case 751: // 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 745: // var_reference -> var_address, variable + case 752: // 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 746: // var_reference -> variable + case 753: // var_reference -> variable { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 747: // var_reference -> var_question_point + case 754: // var_reference -> var_question_point { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 748: // var_address -> tkAddressOf + case 755: // var_address -> tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(CurrentLocationSpan); } break; - case 749: // var_address -> var_address, tkAddressOf + case 756: // var_address -> var_address, tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(ValueStack[ValueStack.Depth-2].stn as get_address, CurrentLocationSpan); } break; - case 750: // attribute_variable -> simple_type_identifier, optional_expr_list_with_bracket + case 757: // 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 751: // attribute_variable -> template_type, optional_expr_list_with_bracket + case 758: // 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 752: // dotted_identifier -> identifier + case 759: // dotted_identifier -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 753: // dotted_identifier -> dotted_identifier, tkPoint, identifier_or_keyword + case 760: // 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 754: // variable_as_type -> dotted_identifier + case 761: // variable_as_type -> dotted_identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;} break; - case 755: // variable_as_type -> dotted_identifier, template_type_params + case 762: // 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 756: // variable_or_literal_or_number -> variable + case 763: // variable_or_literal_or_number -> variable { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 757: // variable_or_literal_or_number -> literal_or_number + case 764: // variable_or_literal_or_number -> literal_or_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 758: // variable -> identifier + case 765: // variable -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 759: // variable -> operator_name_ident + case 766: // variable -> operator_name_ident { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 760: // variable -> tkInherited, identifier + case 767: // variable -> tkInherited, identifier { CurrentSemanticValue.ex = new inherited_ident(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 761: // variable -> tkRoundOpen, expr, tkRoundClose + case 768: // variable -> tkRoundOpen, expr, tkRoundClose { if (!parsertools.build_tree_for_formatter) { @@ -6439,18 +6480,18 @@ public partial class GPPGParser: ShiftReduceParser sizeof_expr + case 769: // variable -> sizeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 763: // variable -> typeof_expr + case 770: // variable -> typeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 764: // variable -> literal_or_number, tkPoint, identifier_or_keyword + case 771: // 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 765: // variable -> variable_or_literal_or_number, tkSquareOpen, expr_list, + case 772: // variable -> variable_or_literal_or_number, tkSquareOpen, expr_list, // tkSquareClose { var el = ValueStack[ValueStack.Depth-2].stn as expression_list; // SSM 10/03/16 @@ -6469,7 +6510,7 @@ public partial class GPPGParser: ShiftReduceParser variable, tkQuestionSquareOpen, format_expr, tkSquareClose + case 773: // 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) @@ -6482,76 +6523,76 @@ public partial class GPPGParser: ShiftReduceParser tkVertParen, elem_list, tkVertParen + case 774: // variable -> tkVertParen, elem_list, tkVertParen { CurrentSemanticValue.ex = new array_const_new(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 768: // variable -> variable, tkRoundOpen, optional_expr_list, tkRoundClose + case 775: // 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 769: // variable -> variable, tkPoint, identifier_keyword_operatorname + case 776: // 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 770: // variable -> tuple, tkPoint, identifier_keyword_operatorname + case 777: // 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 771: // variable -> variable, tkDeref + case 778: // variable -> variable, tkDeref { CurrentSemanticValue.ex = new roof_dereference(ValueStack[ValueStack.Depth-2].ex as addressed_value,CurrentLocationSpan); } break; - case 772: // variable -> variable, tkAmpersend, template_type_params + case 779: // 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 773: // optional_expr_list -> expr_list + case 780: // optional_expr_list -> expr_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 774: // optional_expr_list -> /* empty */ + case 781: // optional_expr_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 775: // elem_list -> elem_list1 + case 782: // elem_list -> elem_list1 { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 776: // elem_list -> /* empty */ + case 783: // elem_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 777: // elem_list1 -> elem + case 784: // elem_list1 -> elem { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 778: // elem_list1 -> elem_list1, tkComma, elem + case 785: // 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 779: // elem -> expr + case 786: // elem -> expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 780: // elem -> expr, tkDotDot, expr + case 787: // elem -> expr, tkDotDot, expr { CurrentSemanticValue.ex = new diapason_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 781: // one_literal -> tkStringLiteral + case 788: // one_literal -> tkStringLiteral { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 782: // one_literal -> tkAsciiChar + case 789: // one_literal -> tkAsciiChar { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 783: // literal -> literal_list + case 790: // literal -> literal_list { CurrentSemanticValue.ex = NewLiteral(ValueStack[ValueStack.Depth-1].stn as literal_const_line); } break; - case 784: // literal -> tkFormatStringLiteral + case 791: // literal -> tkFormatStringLiteral { if (parsertools.build_tree_for_formatter) { @@ -6563,12 +6604,12 @@ public partial class GPPGParser: ShiftReduceParser one_literal + case 792: // literal_list -> one_literal { CurrentSemanticValue.stn = new literal_const_line(ValueStack[ValueStack.Depth-1].ex as literal, CurrentLocationSpan); } break; - case 786: // literal_list -> literal_list, one_literal + case 793: // 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) @@ -6576,475 +6617,475 @@ public partial class GPPGParser: ShiftReduceParser tkOperator, overload_operator + case 794: // 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 788: // optional_method_modificators -> tkSemiColon + case 795: // optional_method_modificators -> tkSemiColon { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 789: // optional_method_modificators -> tkSemiColon, meth_modificators, tkSemiColon + case 796: // 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 790: // optional_method_modificators1 -> /* empty */ + case 797: // optional_method_modificators1 -> /* empty */ { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 791: // optional_method_modificators1 -> tkSemiColon, meth_modificators + case 798: // 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 792: // meth_modificators -> meth_modificator + case 799: // meth_modificators -> meth_modificator { CurrentSemanticValue.stn = new procedure_attributes_list(ValueStack[ValueStack.Depth-1].id as procedure_attribute, CurrentLocationSpan); } break; - case 793: // meth_modificators -> meth_modificators, tkSemiColon, meth_modificator + case 800: // 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 794: // identifier -> tkIdentifier + case 801: // identifier -> tkIdentifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 795: // identifier -> property_specifier_directives + case 802: // identifier -> property_specifier_directives { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 796: // identifier -> non_reserved + case 803: // identifier -> non_reserved { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 797: // identifier_or_keyword -> identifier + case 804: // identifier_or_keyword -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 798: // identifier_or_keyword -> keyword + case 805: // identifier_or_keyword -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 799: // identifier_or_keyword -> reserved_keyword + case 806: // identifier_or_keyword -> reserved_keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 800: // identifier_keyword_operatorname -> identifier + case 807: // identifier_keyword_operatorname -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 801: // identifier_keyword_operatorname -> keyword + case 808: // identifier_keyword_operatorname -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 802: // identifier_keyword_operatorname -> operator_name_ident + case 809: // identifier_keyword_operatorname -> operator_name_ident { CurrentSemanticValue.id = (ident)ValueStack[ValueStack.Depth-1].ex; } break; - case 803: // meth_modificator -> tkAbstract + case 810: // meth_modificator -> tkAbstract { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 804: // meth_modificator -> tkOverload + case 811: // 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 805: // meth_modificator -> tkReintroduce + case 812: // meth_modificator -> tkReintroduce { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 806: // meth_modificator -> tkOverride + case 813: // meth_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 807: // meth_modificator -> tkExtensionMethod + case 814: // meth_modificator -> tkExtensionMethod { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 808: // meth_modificator -> tkVirtual + case 815: // meth_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 809: // property_modificator -> tkVirtual + case 816: // property_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 810: // property_modificator -> tkOverride + case 817: // property_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 811: // property_modificator -> tkAbstract + case 818: // property_modificator -> tkAbstract { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 812: // property_modificator -> tkReintroduce + case 819: // property_modificator -> tkReintroduce { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 813: // property_specifier_directives -> tkRead + case 820: // property_specifier_directives -> tkRead { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 814: // property_specifier_directives -> tkWrite + case 821: // property_specifier_directives -> tkWrite { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 815: // non_reserved -> tkName + case 822: // non_reserved -> tkName { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 816: // non_reserved -> tkNew + case 823: // non_reserved -> tkNew { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 817: // visibility_specifier -> tkInternal + case 824: // visibility_specifier -> tkInternal { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 818: // visibility_specifier -> tkPublic + case 825: // visibility_specifier -> tkPublic { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 819: // visibility_specifier -> tkProtected + case 826: // visibility_specifier -> tkProtected { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 820: // visibility_specifier -> tkPrivate + case 827: // visibility_specifier -> tkPrivate { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 821: // keyword -> visibility_specifier + case 828: // keyword -> visibility_specifier { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 822: // keyword -> tkSealed + case 829: // keyword -> tkSealed { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 823: // keyword -> tkTemplate + case 830: // keyword -> tkTemplate { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 824: // keyword -> tkOr + case 831: // keyword -> tkOr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 825: // keyword -> tkTypeOf + case 832: // keyword -> tkTypeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 826: // keyword -> tkSizeOf + case 833: // keyword -> tkSizeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 827: // keyword -> tkDefault + case 834: // keyword -> tkDefault { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 828: // keyword -> tkWhere + case 835: // keyword -> tkWhere { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 829: // keyword -> tkXor + case 836: // keyword -> tkXor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 830: // keyword -> tkAnd + case 837: // keyword -> tkAnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 831: // keyword -> tkDiv + case 838: // keyword -> tkDiv { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 832: // keyword -> tkMod + case 839: // keyword -> tkMod { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 833: // keyword -> tkShl + case 840: // keyword -> tkShl { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 834: // keyword -> tkShr + case 841: // keyword -> tkShr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 835: // keyword -> tkNot + case 842: // keyword -> tkNot { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 836: // keyword -> tkAs + case 843: // keyword -> tkAs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 837: // keyword -> tkIn + case 844: // keyword -> tkIn { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 838: // keyword -> tkIs + case 845: // keyword -> tkIs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 839: // keyword -> tkArray + case 846: // keyword -> tkArray { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 840: // keyword -> tkSequence + case 847: // keyword -> tkSequence { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 841: // keyword -> tkBegin + case 848: // keyword -> tkBegin { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 842: // keyword -> tkCase + case 849: // keyword -> tkCase { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 843: // keyword -> tkClass + case 850: // keyword -> tkClass { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 844: // keyword -> tkConst + case 851: // keyword -> tkConst { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 845: // keyword -> tkConstructor + case 852: // keyword -> tkConstructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 846: // keyword -> tkDestructor + case 853: // keyword -> tkDestructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 847: // keyword -> tkDownto + case 854: // keyword -> tkDownto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 848: // keyword -> tkDo + case 855: // keyword -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 849: // keyword -> tkElse + case 856: // keyword -> tkElse { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 850: // keyword -> tkEnd + case 857: // keyword -> tkEnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 851: // keyword -> tkExcept + case 858: // keyword -> tkExcept { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 852: // keyword -> tkFile + case 859: // keyword -> tkFile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 853: // keyword -> tkAuto + case 860: // keyword -> tkAuto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 854: // keyword -> tkFinalization + case 861: // keyword -> tkFinalization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 855: // keyword -> tkFinally + case 862: // keyword -> tkFinally { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 856: // keyword -> tkFor + case 863: // keyword -> tkFor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 857: // keyword -> tkForeach + case 864: // keyword -> tkForeach { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 858: // keyword -> tkFunction + case 865: // keyword -> tkFunction { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 859: // keyword -> tkIf + case 866: // keyword -> tkIf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 860: // keyword -> tkImplementation + case 867: // keyword -> tkImplementation { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 861: // keyword -> tkInherited + case 868: // keyword -> tkInherited { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 862: // keyword -> tkInitialization + case 869: // keyword -> tkInitialization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 863: // keyword -> tkInterface + case 870: // keyword -> tkInterface { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 864: // keyword -> tkProcedure + case 871: // keyword -> tkProcedure { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 865: // keyword -> tkProperty + case 872: // keyword -> tkProperty { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 866: // keyword -> tkRaise + case 873: // keyword -> tkRaise { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 867: // keyword -> tkRecord + case 874: // keyword -> tkRecord { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 868: // keyword -> tkRepeat + case 875: // keyword -> tkRepeat { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 869: // keyword -> tkSet + case 876: // keyword -> tkSet { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 870: // keyword -> tkTry + case 877: // keyword -> tkTry { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 871: // keyword -> tkType + case 878: // keyword -> tkType { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 872: // keyword -> tkStatic + case 879: // keyword -> tkStatic { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 873: // keyword -> tkThen + case 880: // keyword -> tkThen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 874: // keyword -> tkTo + case 881: // keyword -> tkTo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 875: // keyword -> tkUntil + case 882: // keyword -> tkUntil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 876: // keyword -> tkUses + case 883: // keyword -> tkUses { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 877: // keyword -> tkVar + case 884: // keyword -> tkVar { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 878: // keyword -> tkWhile + case 885: // keyword -> tkWhile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 879: // keyword -> tkWith + case 886: // keyword -> tkWith { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 880: // keyword -> tkNil + case 887: // keyword -> tkNil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 881: // keyword -> tkGoto + case 888: // keyword -> tkGoto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 882: // keyword -> tkOf + case 889: // keyword -> tkOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 883: // keyword -> tkLabel + case 890: // keyword -> tkLabel { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 884: // keyword -> tkProgram + case 891: // keyword -> tkProgram { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 885: // keyword -> tkUnit + case 892: // keyword -> tkUnit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 886: // keyword -> tkLibrary + case 893: // keyword -> tkLibrary { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 887: // keyword -> tkNamespace + case 894: // keyword -> tkNamespace { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 888: // keyword -> tkExternal + case 895: // keyword -> tkExternal { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 889: // keyword -> tkParams + case 896: // keyword -> tkParams { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 890: // keyword -> tkEvent + case 897: // keyword -> tkEvent { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 891: // keyword -> tkYield + case 898: // keyword -> tkYield { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 892: // keyword -> tkMatch + case 899: // keyword -> tkMatch { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 893: // keyword -> tkWhen + case 900: // keyword -> tkWhen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 894: // keyword -> tkPartial + case 901: // keyword -> tkPartial { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 895: // keyword -> tkAbstract + case 902: // keyword -> tkAbstract { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 896: // keyword -> tkLock + case 903: // keyword -> tkLock { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 897: // keyword -> tkImplicit + case 904: // keyword -> tkImplicit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 898: // keyword -> tkExplicit + case 905: // keyword -> tkExplicit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 899: // keyword -> tkOn + case 906: // keyword -> tkOn { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 900: // keyword -> tkVirtual + case 907: // keyword -> tkVirtual { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 901: // keyword -> tkOverride + case 908: // keyword -> tkOverride { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 902: // keyword -> tkLoop + case 909: // keyword -> tkLoop { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 903: // keyword -> tkExtensionMethod + case 910: // keyword -> tkExtensionMethod { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 904: // keyword -> tkOverload + case 911: // keyword -> tkOverload { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 905: // keyword -> tkReintroduce + case 912: // keyword -> tkReintroduce { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 906: // keyword -> tkForward + case 913: // keyword -> tkForward { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 907: // reserved_keyword -> tkOperator + case 914: // reserved_keyword -> tkOperator { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 908: // overload_operator -> tkMinus + case 915: // overload_operator -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 909: // overload_operator -> tkPlus + case 916: // overload_operator -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 910: // overload_operator -> tkSlash + case 917: // overload_operator -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 911: // overload_operator -> tkStar + case 918: // overload_operator -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 912: // overload_operator -> tkEqual + case 919: // overload_operator -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 913: // overload_operator -> tkGreater + case 920: // overload_operator -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 914: // overload_operator -> tkGreaterEqual + case 921: // overload_operator -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 915: // overload_operator -> tkLower + case 922: // overload_operator -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 916: // overload_operator -> tkLowerEqual + case 923: // overload_operator -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 917: // overload_operator -> tkNotEqual + case 924: // overload_operator -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 918: // overload_operator -> tkOr + case 925: // overload_operator -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 919: // overload_operator -> tkXor + case 926: // overload_operator -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 920: // overload_operator -> tkAnd + case 927: // overload_operator -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 921: // overload_operator -> tkDiv + case 928: // overload_operator -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 922: // overload_operator -> tkMod + case 929: // overload_operator -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 923: // overload_operator -> tkShl + case 930: // overload_operator -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 924: // overload_operator -> tkShr + case 931: // overload_operator -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 925: // overload_operator -> tkNot + case 932: // overload_operator -> tkNot { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 926: // overload_operator -> tkIn + case 933: // overload_operator -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 927: // overload_operator -> tkImplicit + case 934: // overload_operator -> tkImplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 928: // overload_operator -> tkExplicit + case 935: // overload_operator -> tkExplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 929: // overload_operator -> assign_operator + case 936: // overload_operator -> assign_operator { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 930: // overload_operator -> tkStarStar + case 937: // overload_operator -> tkStarStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 931: // assign_operator -> tkAssign + case 938: // assign_operator -> tkAssign { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 932: // assign_operator -> tkPlusEqual + case 939: // assign_operator -> tkPlusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 933: // assign_operator -> tkMinusEqual + case 940: // assign_operator -> tkMinusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 934: // assign_operator -> tkMultEqual + case 941: // assign_operator -> tkMultEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 935: // assign_operator -> tkDivEqual + case 942: // assign_operator -> tkDivEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 936: // func_decl_lambda -> identifier, tkArrow, lambda_function_body + case 943: // 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]); @@ -7055,7 +7096,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, + case 944: // func_decl_lambda -> tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, // tkArrow, lambda_function_body { // ����� ���� ������������� �� ���� � ���� ��������� lambda_inferred_type, ���� ������ ��� null! @@ -7065,7 +7106,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkColon, fptype, tkRoundClose, + case 945: // 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]); @@ -7077,7 +7118,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, + case 946: // func_decl_lambda -> tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, // tkRoundClose, lambda_type_ref_noproctype, tkArrow, // lambda_function_body { @@ -7091,7 +7132,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, + case 947: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, // full_lambda_fp_list, tkRoundClose, // lambda_type_ref_noproctype, tkArrow, lambda_function_body { @@ -7106,7 +7147,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, expr_l1, tkComma, expr_l1_list, + case 948: // func_decl_lambda -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, // lambda_type_ref, optional_full_lambda_fp_list, // tkRoundClose, rem_lambda { @@ -7175,62 +7216,62 @@ public partial class GPPGParser: ShiftReduceParser expl_func_decl_lambda + case 949: // func_decl_lambda -> expl_func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 943: // optional_full_lambda_fp_list -> /* empty */ + case 950: // optional_full_lambda_fp_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 944: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list + case 951: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 945: // rem_lambda -> lambda_type_ref_noproctype, tkArrow, lambda_function_body + case 952: // 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 946: // expl_func_decl_lambda -> tkFunction, lambda_type_ref_noproctype, tkArrow, + case 953: // expl_func_decl_lambda -> tkFunction, lambda_type_ref_noproctype, tkArrow, // lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, 1, CurrentLocationSpan); } break; - case 947: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, tkRoundClose, + case 954: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, tkRoundClose, // lambda_type_ref_noproctype, tkArrow, // lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, 1, CurrentLocationSpan); } break; - case 948: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, + case 955: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, // tkRoundClose, lambda_type_ref_noproctype, tkArrow, // lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), ValueStack[ValueStack.Depth-5].stn as formal_parameters, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, 1, CurrentLocationSpan); } break; - case 949: // expl_func_decl_lambda -> tkProcedure, tkArrow, lambda_procedure_body + case 956: // 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 950: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, tkRoundClose, tkArrow, + case 957: // 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 951: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, full_lambda_fp_list, + case 958: // 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 952: // full_lambda_fp_list -> lambda_simple_fp_sect + case 959: // 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) @@ -7250,97 +7291,97 @@ public partial class GPPGParser: ShiftReduceParser full_lambda_fp_list, tkSemiColon, lambda_simple_fp_sect + case 960: // 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 954: // lambda_simple_fp_sect -> ident_list, lambda_type_ref + case 961: // 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 955: // lambda_type_ref -> /* empty */ + case 962: // lambda_type_ref -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 956: // lambda_type_ref -> tkColon, fptype + case 963: // lambda_type_ref -> tkColon, fptype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 957: // lambda_type_ref_noproctype -> /* empty */ + case 964: // lambda_type_ref_noproctype -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 958: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype + case 965: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 959: // common_lambda_body -> compound_stmt + case 966: // common_lambda_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 960: // common_lambda_body -> if_stmt + case 967: // common_lambda_body -> if_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 961: // common_lambda_body -> while_stmt + case 968: // common_lambda_body -> while_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 962: // common_lambda_body -> repeat_stmt + case 969: // common_lambda_body -> repeat_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 963: // common_lambda_body -> for_stmt + case 970: // common_lambda_body -> for_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 964: // common_lambda_body -> foreach_stmt + case 971: // common_lambda_body -> foreach_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 965: // common_lambda_body -> loop_stmt + case 972: // common_lambda_body -> loop_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 966: // common_lambda_body -> case_stmt + case 973: // common_lambda_body -> case_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 967: // common_lambda_body -> try_stmt + case 974: // common_lambda_body -> try_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 968: // common_lambda_body -> lock_stmt + case 975: // common_lambda_body -> lock_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 969: // common_lambda_body -> raise_stmt + case 976: // common_lambda_body -> raise_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 970: // common_lambda_body -> yield_stmt + case 977: // common_lambda_body -> yield_stmt { parsertools.AddErrorFromResource("YIELD_STATEMENT_CANNOT_BE_USED_IN_LAMBDA_BODY", CurrentLocationSpan); } break; - case 971: // lambda_function_body -> expr_l1_for_lambda + case 978: // lambda_function_body -> expr_l1_for_lambda { var id = SyntaxVisitors.HasNameVisitor.HasName(ValueStack[ValueStack.Depth-1].ex, "Result"); if (id != null) @@ -7352,22 +7393,22 @@ public partial class GPPGParser: ShiftReduceParser common_lambda_body + case 979: // lambda_function_body -> common_lambda_body { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 973: // lambda_procedure_body -> proc_call + case 980: // lambda_procedure_body -> proc_call { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 974: // lambda_procedure_body -> assignment + case 981: // lambda_procedure_body -> assignment { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 975: // lambda_procedure_body -> common_lambda_body + case 982: // 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 8c6ce1091..90215196c 100644 --- a/Parsers/PascalABCParserNewSaushkin/PABC.ymc +++ b/Parsers/PascalABCParserNewSaushkin/PABC.ymc @@ -283,6 +283,8 @@ script= + + diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index 12624598a..e252aa337 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.7.1.2683 +3.7.1.2692 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 4dff24be5..fb66c3214 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.7.1.2683' +!define VERSION '3.7.1.2692' diff --git a/SyntaxTreeConverters/StandardSyntaxConverter.cs b/SyntaxTreeConverters/StandardSyntaxConverter.cs index 8b1ebbb29..428938860 100644 --- a/SyntaxTreeConverters/StandardSyntaxConverter.cs +++ b/SyntaxTreeConverters/StandardSyntaxConverter.cs @@ -23,8 +23,8 @@ namespace PascalABCCompiler.SyntaxTreeConverters root.FillParentsInAllChilds(); #if DEBUG - var stat = new ABCStatisticsVisitor(); - stat.ProcessNode(root); +// var stat = new ABCStatisticsVisitor(); +// stat.ProcessNode(root); #endif // new range - до всего! До выноса выражения с лямбдой из foreach. 11.07 добавил поиск yields и присваивание pd.HasYield diff --git a/SyntaxVisitors/UniversalVisitors/ABCStatisticsVisitors.cs b/SyntaxVisitors/UniversalVisitors/ABCStatisticsVisitors.cs index bd21c0bbd..2c0be9fdf 100644 --- a/SyntaxVisitors/UniversalVisitors/ABCStatisticsVisitors.cs +++ b/SyntaxVisitors/UniversalVisitors/ABCStatisticsVisitors.cs @@ -197,6 +197,113 @@ namespace SyntaxVisitors base.visit(pc); } + public int CalcHealth(out int NegativePercent, out int PositivePercent) + { + var stat = this; + var Percent = 100; + NegativePercent = 0; + PositivePercent = 0; + + var diffBlockVarDefs = stat.OutBlockVarDefs; // - stat.InBlockVarDefs; + if (diffBlockVarDefs > 0) + { + NegativePercent += 10; // за первую + NegativePercent += (diffBlockVarDefs - 1) * 2; // за оставшиеся + if (NegativePercent > 25) + NegativePercent = 25; + } + // For i + if (stat.ForsWithoutVar > 0) + { + NegativePercent += Math.Min(15 + (stat.ForsWithoutVar - 1) * 3, 25); + } + if (stat.ReadProc > 0) + { + NegativePercent += Math.Min(15 + (stat.ReadProc - 1) * 2, 20); + } + if (stat.ProgramKeyword) + { + NegativePercent += 10; + } + if (stat.StaticArrays > 0) + { + NegativePercent += Math.Min(10 + (stat.StaticArrays - 1) * 2, 15); + } + if (stat.WriteProcWithSpace > 0) + { + NegativePercent += Math.Min(2 + (stat.WriteProcWithSpace - 1) * 1, 5); + } + if (stat.OldStrings > 0) + { + NegativePercent += stat.OldStrings; + } + if (NegativePercent < 0) + NegativePercent = 0; + + Percent -= NegativePercent; + + // Проценты за положительное + if (stat.InBlockVarDefs > 0) + { + PositivePercent += 10; // за первую + PositivePercent += (stat.InBlockVarDefs - 1) * 2; // за оставшиеся + // этот алгоритм уравновешивает описания внутри и вне. За одинаковое количество дается 0 баллов + } + if (stat.ForsWithVar != 0) + { + PositivePercent += Math.Min(stat.ForsWithVar, 4) * 3; + } + if (stat.InitVarInDef > 0) + { + PositivePercent += Math.Min(stat.InitVarInDef, 4) * 4; + } + if (stat.ReadFuncCount > 0) + { + PositivePercent += Math.Min(stat.ReadFuncCount, 4) * 3; + } + if (stat.ExtAssignCount > 0) + { + PositivePercent += Math.Min(stat.ExtAssignCount, 4) * 3; + } + if (stat.PrintCount > 0) + { + PositivePercent += Math.Min(stat.PrintCount, 4) * 4; + } + if (stat.TuplesCount > 0) + { + PositivePercent += Math.Min(stat.PrintCount, 4) * 5; + } + if (stat.DynamicArrays > 0) + { + PositivePercent += Math.Min(stat.PrintCount, 4) * 5; + } + if (stat.UnpackingAssign > 0) + { + PositivePercent += Math.Min(stat.UnpackingAssign, 4) * 5; + } + if (stat.LoopsCount > 0) + { + PositivePercent += Math.Min(stat.LoopsCount, 4) * 4; + } + if (stat.ForeachCount > 0) + { + PositivePercent += Math.Min(stat.ForeachCount, 4) * 4; + } + if (stat.LambdasCount > 0) + { + PositivePercent += Math.Min(stat.LambdasCount, 4) * 8; + } + + Percent += PositivePercent; + if (Percent > 200) + Percent = 200; + + if (Percent < 0) + Percent = 0; + + return Percent; + } + /*public override void visit(dot_node dn) { ProcessNode(dn.left); diff --git a/TestSuite/pow.pas b/TestSuite/pow.pas new file mode 100644 index 000000000..39ece6f47 --- /dev/null +++ b/TestSuite/pow.pas @@ -0,0 +1,9 @@ +const a = -2**4; +const b = 2**3**2; + +begin + Assert(-2**4 = -16); + Assert(a = -16); + Assert(2**3**2=512); + Assert(b=512); +end. \ No newline at end of file diff --git a/TestSuite/power1.pas b/TestSuite/power1.pas index d541748a6..39ff7275d 100644 --- a/TestSuite/power1.pas +++ b/TestSuite/power1.pas @@ -7,7 +7,7 @@ begin assert(round(2 ** 3 * 3) = 24); assert(round(2.0 ** 3) = 8); assert(round(2 ** 3.0) = 8); - assert(round(-2 ** 2) = 4); + assert(round(-2 ** 2) = -4); assert(round(-(2 ** 2)) = -4); var b: byte := 2; assert(round(b ** 2) = 4); diff --git a/VisualPascalABCNET/Form1.Designer.cs b/VisualPascalABCNET/Form1.Designer.cs index 2f020c9ef..dc8953632 100644 --- a/VisualPascalABCNET/Form1.Designer.cs +++ b/VisualPascalABCNET/Form1.Designer.cs @@ -1760,7 +1760,7 @@ namespace VisualPascalABC // toolStripStatusLabel5 // this.toolStripStatusLabel5.Name = "toolStripStatusLabel5"; - this.toolStripStatusLabel5.Size = new System.Drawing.Size(912, 19); + this.toolStripStatusLabel5.Size = new System.Drawing.Size(908, 19); this.toolStripStatusLabel5.Spring = true; this.toolStripStatusLabel5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -1794,6 +1794,7 @@ namespace VisualPascalABC // // HealthLabel // + this.HealthLabel.AutoToolTip = true; this.HealthLabel.BackColor = System.Drawing.SystemColors.Control; this.HealthLabel.IsLink = true; this.HealthLabel.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline; @@ -1801,6 +1802,7 @@ namespace VisualPascalABC this.HealthLabel.Name = "HealthLabel"; this.HealthLabel.Size = new System.Drawing.Size(19, 19); this.HealthLabel.Text = " "; + this.HealthLabel.ToolTipText = "Здоровье PascalABC.NET программы"; this.HealthLabel.Click += new System.EventHandler(this.HealthLabel_Click); // // openFileDialog1 diff --git a/VisualPascalABCNET/Form1.cs b/VisualPascalABCNET/Form1.cs index 41443d3ac..4e45ec80a 100644 --- a/VisualPascalABCNET/Form1.cs +++ b/VisualPascalABCNET/Form1.cs @@ -234,7 +234,7 @@ namespace VisualPascalABC // PascalABCCompiler.StringResourcesLanguage.CurrentLanguageName = PascalABCCompiler.StringResourcesLanguage.AccessibleLanguages[0]; InitializeComponent(); - + VisualPABCSingleton.MainForm = this; WorkbenchStorage.MainProgramThread = System.Threading.Thread.CurrentThread; //images init @@ -840,8 +840,32 @@ namespace VisualPascalABC private void StartMenuItem_Click(object sender, EventArgs e) { WorkbenchServiceFactory.RunService.Run(true); + /*if (VisualEnvironmentCompiler.StandartCompiler != null && + VisualEnvironmentCompiler.StandartCompiler.LinesCompiled > 1000) + return; + var root = VisualEnvironmentCompiler?.StandartCompiler?.CurrentCompilationUnit?.SyntaxTree; + + if (root == null) + return; + if (VisualEnvironmentCompiler.StandartCompiler.CurrentCompilationUnit.SemanticTree == null) + return; + var stat = new SyntaxVisitors.ABCStatisticsVisitor(); + stat.ProcessNode(root); + var Percent = stat.CalcHealth(out int n, out int p); + + if (Percent >= 100) + { + HealthLabel.Text = ""; + return; + } + HealthLabel.Text = $"{Percent}%"; + + var c = SystemColors.Control; + var PM100 = 100 - Percent; + HealthLabel.BackColor = Color.FromArgb(c.R - PM100 - 20, c.G - PM100 - 20, c.B - PM100 - 20); + */ } - + private void Form1_KeyUp(object sender, KeyEventArgs e) { if (e.KeyData == Keys.F1) @@ -978,6 +1002,7 @@ namespace VisualPascalABC private void miRunNoDebug_Click(object sender, EventArgs e) { WorkbenchServiceFactory.RunService.Run(false); + var root = VisualEnvironmentCompiler.StandartCompiler.CurrentCompilationUnit.SyntaxTree; } Dictionary lastInputTexts = new Dictionary(); @@ -1596,6 +1621,7 @@ namespace VisualPascalABC return n + " раза"; else return n + " раз"; } + private void toolStripButton1_Click(object sender, EventArgs e) { if (ABCHealthForm == null) @@ -1669,8 +1695,6 @@ namespace VisualPascalABC // 6. Write(a,' ',b) - за каждую - -1% пока не достгнет -5% // 7. string[10] - за каждую - -1% . Если минусуется > 100%, то здоровье делать 0% - var Percent = 100; - var NegativePercent = 0; var ShowNegativeInfo = false; if (stat.OutBlockVarDefs > 0 && stat.OutBlockVarDefs > stat.InBlockVarDefs) @@ -1788,103 +1812,9 @@ namespace VisualPascalABC y += h; } + var Percent = stat.CalcHealth(out int NegativePercent, out int PositivePercent); // Процент здоровья // VarDefs - var diffBlockVarDefs = stat.OutBlockVarDefs; // - stat.InBlockVarDefs; - if (diffBlockVarDefs > 0) - { - NegativePercent += 10; // за первую - NegativePercent += (diffBlockVarDefs - 1) * 2; // за оставшиеся - if (NegativePercent > 25) - NegativePercent = 25; - } - // For i - if (stat.ForsWithoutVar > 0) - { - NegativePercent += Math.Min(15 + (stat.ForsWithoutVar - 1) * 3, 25); - } - if (stat.ReadProc > 0) - { - NegativePercent += Math.Min(15 + (stat.ReadProc - 1) * 2, 20); - } - if (stat.ProgramKeyword) - { - NegativePercent += 10; - } - if (stat.StaticArrays > 0) - { - NegativePercent += Math.Min(10 + (stat.StaticArrays - 1) * 2, 15); - } - if (stat.WriteProcWithSpace > 0) - { - NegativePercent += Math.Min(2 + (stat.WriteProcWithSpace - 1) * 1, 5); - } - if (stat.OldStrings > 0) - { - NegativePercent += stat.OldStrings; - } - if (NegativePercent < 0) - NegativePercent = 0; - - Percent -= NegativePercent; - - var PositivePercent = 0; - - // Проценты за положительное - if (stat.InBlockVarDefs > 0) - { - PositivePercent += 10; // за первую - PositivePercent += (stat.InBlockVarDefs - 1) * 2; // за оставшиеся - // этот алгоритм уравновешивает описания внутри и вне. За одинаковое количество дается 0 баллов - } - if (stat.ForsWithVar != 0) - { - PositivePercent += Math.Min(stat.ForsWithVar, 4) * 3; - } - if (stat.InitVarInDef > 0) - { - PositivePercent += Math.Min(stat.InitVarInDef, 4) * 4; - } - if (stat.ReadFuncCount > 0) - { - PositivePercent += Math.Min(stat.ReadFuncCount, 4) * 3; - } - if (stat.ExtAssignCount > 0) - { - PositivePercent += Math.Min(stat.ExtAssignCount, 4) * 3; - } - if (stat.PrintCount > 0) - { - PositivePercent += Math.Min(stat.PrintCount, 4) * 4; - } - if (stat.TuplesCount > 0) - { - PositivePercent += Math.Min(stat.PrintCount, 4) * 5; - } - if (stat.DynamicArrays > 0) - { - PositivePercent += Math.Min(stat.PrintCount, 4) * 5; - } - if (stat.UnpackingAssign > 0) - { - PositivePercent += Math.Min(stat.UnpackingAssign, 4) * 5; - } - if (stat.LoopsCount > 0) - { - PositivePercent += Math.Min(stat.LoopsCount, 4) * 4; - } - if (stat.ForeachCount > 0) - { - PositivePercent += Math.Min(stat.ForeachCount, 4) * 4; - } - if (stat.LambdasCount > 0) - { - PositivePercent += Math.Min(stat.LambdasCount, 4) * 8; - } - - Percent += PositivePercent; - if (Percent > 200) - Percent = 200; if (!ShowNegativeInfo) { @@ -1905,7 +1835,7 @@ namespace VisualPascalABC else if (Percent < 75) pp.BackColor = Color.FromArgb(128, 128, 128); else if (Percent < 100) - pp.BackColor = Color.FromArgb(64+16, 128, 64 + 16); + pp.BackColor = Color.FromArgb(64 + 16 + 16, 128, 64 + 16 + 16); else pp.BackColor = Color.FromArgb(0, 128, 0); pp.Paint += (o, ea) => @@ -1947,9 +1877,16 @@ namespace VisualPascalABC } } + private void HealthLabelClear() + { + HealthLabel.Text = ""; + HealthLabel.BackColor = System.Drawing.SystemColors.Control; + } + private void HealthLabel_Click(object sender, EventArgs e) { - System.Diagnostics.Process.Start("https://pascalabcnet.github.io/program_health.html"); + toolStripButton1_Click(this, null); + //System.Diagnostics.Process.Start("https://pascalabcnet.github.io/program_health.html"); } private void tsHelp_Click(object sender, EventArgs e) diff --git a/VisualPascalABCNET/Form1.resx b/VisualPascalABCNET/Form1.resx index f42f1046b..dd9b0a2fc 100644 --- a/VisualPascalABCNET/Form1.resx +++ b/VisualPascalABCNET/Form1.resx @@ -307,21 +307,6 @@ d07lxcgmYqk6sX1iENPfdv0Cx/Wod5mP/rvMkCs5SPPOp5qJQ6WOnVOD2IzXiA6B6TRp9PMK470dqLqN JO8cT/Oxkwa2jmvEz4Mq4ROIn/YrqSJ2nMZWTEFkR8FqVMZSJImFUAKzq534BOJyW/ju7nIk6Q+B49+g +BQZbgAAAABJRU5ErkJggg== - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG - YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 - 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw - bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc - VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 - c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 - Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo - mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ - kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D - TgDQASA1MVpwzwAAAABJRU5ErkJggg== @@ -354,6 +339,21 @@ saeS2rb7UOgXaTuVTHazh+J2K72OKDpTHEBh1SiuGV8sLLYtFmb8JHwex090zigDU8LZCb1Pl+WA/KsG Jj3zsvDoBzC8JxbusgseC5B9pmAzIK+sn7b772judaPudtCktaO5bRO+rJXG1hc0aJ5T12iipnaIGtUw 5y4qNgNEqeo7yM0rl+jiFeNZnIk7fyOCEhJ+AymIZtFIMC8OAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== @@ -681,7 +681,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABK - FQAAAk1TRnQBSQFMAgEBEAEAAbQBAQG0AQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + FQAAAk1TRnQBSQFMAgEBEAEAAcQBAQHEAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAAVADAAEBAQABCAYAARQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA diff --git a/VisualPascalABCNET/Workbench/WindowOperations.cs b/VisualPascalABCNET/Workbench/WindowOperations.cs index e7ad1c282..456879962 100644 --- a/VisualPascalABCNET/Workbench/WindowOperations.cs +++ b/VisualPascalABCNET/Workbench/WindowOperations.cs @@ -388,6 +388,8 @@ namespace VisualPascalABC public void ChangedSelectedTab() { + if (HealthLabel.Text != "") + HealthLabel.Text = ""; if (BrowserTabSelected) { BottomTabsVisible = true; diff --git a/bin/Lib/NUnitABC.pas b/bin/Lib/NUnitABC.pas index 930fcf3d8..2dbaff08d 100644 --- a/bin/Lib/NUnitABC.pas +++ b/bin/Lib/NUnitABC.pas @@ -63,6 +63,7 @@ type SubStringConstraint = NUnit.Framework.Constraints.SubStringConstraint; TrueConstraint = NUnit.Framework.Constraints.TrueConstraint; + AssertionException = NUnit.Framework.AssertionException; begin