diff --git a/NETGenerator/NETGenerator.cs b/NETGenerator/NETGenerator.cs index 1bf5d61ef..ef64926fc 100644 --- a/NETGenerator/NETGenerator.cs +++ b/NETGenerator/NETGenerator.cs @@ -2021,8 +2021,8 @@ namespace PascalABCCompiler.NETGenerator if (func.return_value_type == null) ret_type = null;//typeof(void); else - ret_type = helper.GetTypeReference(funcs[i].return_value_type).tp; - Type[] param_types = GetParamTypes(funcs[i]);//получаем параметры процедуры + ret_type = helper.GetTypeReference(func.return_value_type).tp; + Type[] param_types = GetParamTypes(func);//получаем параметры процедуры IExternalStatementNode esn = (IExternalStatementNode)statements[0]; string module_name = Tools.ReplaceAllKeys(esn.module_name, StandartDirectories); @@ -2031,8 +2031,8 @@ namespace PascalABCCompiler.NETGenerator CallingConventions.Standard, ret_type, param_types, CallingConvention.Winapi, CharSet.Ansi);//определяем PInvoke-метод methb.SetImplementationFlags(MethodImplAttributes.PreserveSig); - helper.AddMethod(funcs[i], methb); - IParameterNode[] parameters = funcs[i].parameters; + helper.AddMethod(func, methb); + IParameterNode[] parameters = func.parameters; //определяем параметры с указанием имени for (int j = 0; j < parameters.Length; j++) { @@ -5857,6 +5857,13 @@ namespace PascalABCCompiler.NETGenerator ConvertConstructorBody(value); return; } + if (value.function_code is IStatementsListNode) + { + IStatementNode[] statements = (value.function_code as IStatementsListNode).statements; + if (statements.Length > 0 && statements[0] is IExternalStatementNode) + return; + } + num_scope++; MakeAttribute(value); MethodBuilder methb = helper.GetMethodBuilder(value); @@ -6357,6 +6364,38 @@ namespace PascalABCCompiler.NETGenerator return comp_opt.target == TargetType.Dll && prop_accessors.ContainsKey(value); } + private void ConvertExternalMethod(SemanticTree.ICommonMethodNode meth) + { + IStatementsListNode sl = (IStatementsListNode)meth.function_code; + IStatementNode[] statements = sl.statements; + //функция импортируется из dll + Type ret_type = null; + //получаем тип возвр. значения + if (meth.return_value_type == null) + ret_type = null;//typeof(void); + else + ret_type = helper.GetTypeReference(meth.return_value_type).tp; + Type[] param_types = GetParamTypes(meth);//получаем параметры процедуры + + IExternalStatementNode esn = (IExternalStatementNode)statements[0]; + string module_name = Tools.ReplaceAllKeys(esn.module_name, StandartDirectories); + MethodBuilder methb = cur_type.DefinePInvokeMethod(meth.name, module_name, esn.name, + MethodAttributes.Public | MethodAttributes.Static | MethodAttributes.PinvokeImpl | MethodAttributes.HideBySig, + CallingConventions.Standard, ret_type, param_types, CallingConvention.Winapi, + CharSet.Ansi);//определяем PInvoke-метод + methb.SetImplementationFlags(MethodImplAttributes.PreserveSig); + helper.AddMethod(meth, methb); + IParameterNode[] parameters = meth.parameters; + //определяем параметры с указанием имени + for (int j = 0; j < parameters.Length; j++) + { + ParameterAttributes pars = ParameterAttributes.None; + //if (func.parameters[j].parameter_type == parameter_type.var) + // pars = ParameterAttributes.Out; + methb.DefineParameter(j + 1, pars, parameters[j].name); + } + } + //перевод заголовка метода private void ConvertMethodHeader(SemanticTree.ICommonMethodNode value) { @@ -6366,8 +6405,18 @@ namespace PascalABCCompiler.NETGenerator return; } - if (helper.GetMethod(value) != null) return; - + if (helper.GetMethod(value) != null) + return; + if (value.function_code is IStatementsListNode) + { + IStatementsListNode sl = (IStatementsListNode)value.function_code; + IStatementNode[] statements = sl.statements; + if (statements.Length > 0 && statements[0] is IExternalStatementNode) + { + ConvertExternalMethod(value); + return; + } + } MethodBuilder methb = null; bool is_prop_acc = IsPropertyAccessor(value); MethodAttributes attrs = GetMethodAttributes(value, is_prop_acc); diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index a4c957af9..16f27536e 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs @@ -1,9 +1,9 @@ // // This CSharp output file generated by Gardens Point LEX // Version: 1.1.3.301 -// Machine: DESKTOP-A6LT9RI -// DateTime: 17.01.2018 0:27:09 -// UserName: ????????? +// Machine: IVAN-PC +// DateTime: 19.02.2018 20:41:20 +// UserName: Ivan // GPLEX input file // GPLEX frame file // diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y index 456700728..d52b95087 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y @@ -2058,7 +2058,9 @@ proc_func_decl_noclass inclass_proc_func_decl : inclass_proc_func_decl_noclass - { $$ = $1; } + { + $$ = $1; + } | tkClass inclass_proc_func_decl_noclass { if (($2 as procedure_definition).proc_header != null) @@ -2215,6 +2217,8 @@ inclass_block { $$ = new block($1 as declarations, $2 as statement_list, @$); } + | external_block + { $$ = $1; } ; fp_list diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index 0e8b18c14..9409eebf6 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -1,9 +1,9 @@ // (see accompanying GPPGcopyright.rtf) // GPPG version 1.3.6 -// Machine: DESKTOP-A6LT9RI -// DateTime: 17.01.2018 0:27:10 -// UserName: ????????? +// Machine: IVAN-PC +// DateTime: 19.02.2018 20:41:22 +// UserName: Ivan // Input file // options: no-lines gplex @@ -74,8 +74,8 @@ public partial class GPPGParser: ShiftReduceParser aliasses; #pragma warning restore 649 - private static Rule[] rules = new Rule[848]; - private static State[] states = new State[1374]; + private static Rule[] rules = new Rule[849]; + private static State[] states = new State[1375]; private static string[] nonTerms = new string[] { "parse_goal", "unit_key_word", "assignment", "optional_array_initializer", "attribute_declarations", "ot_visibility_specifier", "one_attribute", "attribute_variable", @@ -155,13 +155,13 @@ public partial class GPPGParser: ShiftReduceParser /* empty */ + case 438: // inclass_block -> external_block +{ CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } + break; + case 439: // fp_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 439: // fp_list -> tkRoundOpen, tkRoundClose + case 440: // fp_list -> tkRoundOpen, tkRoundClose { CurrentSemanticValue.stn = null; } break; - case 440: // fp_list -> tkRoundOpen, fp_sect_list, tkRoundClose + case 441: // 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 441: // fp_sect_list -> fp_sect + case 442: // fp_sect_list -> fp_sect { CurrentSemanticValue.stn = new formal_parameters(ValueStack[ValueStack.Depth-1].stn as typed_parameters, CurrentLocationSpan); } break; - case 442: // fp_sect_list -> fp_sect_list, tkSemiColon, fp_sect + case 443: // 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 443: // fp_sect -> attribute_declarations, simple_fp_sect + case 444: // 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 444: // simple_fp_sect -> param_name_list, tkColon, fptype + case 445: // 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 445: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype + case 446: // 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 446: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype + case 447: // 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 447: // simple_fp_sect -> tkParams, param_name_list, tkColon, fptype + case 448: // 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 448: // simple_fp_sect -> param_name_list, tkColon, fptype, tkAssign, const_expr + case 449: // simple_fp_sect -> param_name_list, tkColon, fptype, tkAssign, const_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 449: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype, tkAssign, const_expr + case 450: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype, tkAssign, const_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 450: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype, tkAssign, + case 451: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype, tkAssign, // const_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 451: // param_name_list -> param_name + case 452: // param_name_list -> param_name { CurrentSemanticValue.stn = new ident_list(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 452: // param_name_list -> param_name_list, tkComma, param_name + case 453: // 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 453: // param_name -> identifier + case 454: // param_name -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 454: // fptype -> type_ref + case 455: // fptype -> type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 455: // fptype_noproctype -> simple_type + case 456: // fptype_noproctype -> simple_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 456: // fptype_noproctype -> string_type + case 457: // fptype_noproctype -> string_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 457: // fptype_noproctype -> pointer_type + case 458: // fptype_noproctype -> pointer_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 458: // fptype_noproctype -> structured_type + case 459: // fptype_noproctype -> structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 459: // fptype_noproctype -> template_type + case 460: // fptype_noproctype -> template_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 460: // stmt -> unlabelled_stmt + case 461: // stmt -> unlabelled_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 461: // stmt -> label_name, tkColon, stmt + case 462: // 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 462: // unlabelled_stmt -> /* empty */ + case 463: // unlabelled_stmt -> /* empty */ { CurrentSemanticValue.stn = new empty_statement(); CurrentSemanticValue.stn.source_context = null; } break; - case 463: // unlabelled_stmt -> assignment + case 464: // unlabelled_stmt -> assignment { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 464: // unlabelled_stmt -> proc_call + case 465: // unlabelled_stmt -> proc_call { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 465: // unlabelled_stmt -> goto_stmt + case 466: // unlabelled_stmt -> goto_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 466: // unlabelled_stmt -> compound_stmt + case 467: // unlabelled_stmt -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 467: // unlabelled_stmt -> if_stmt + case 468: // unlabelled_stmt -> if_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 468: // unlabelled_stmt -> case_stmt + case 469: // unlabelled_stmt -> case_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 469: // unlabelled_stmt -> repeat_stmt + case 470: // unlabelled_stmt -> repeat_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 470: // unlabelled_stmt -> while_stmt + case 471: // unlabelled_stmt -> while_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 471: // unlabelled_stmt -> for_stmt + case 472: // unlabelled_stmt -> for_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 472: // unlabelled_stmt -> with_stmt + case 473: // unlabelled_stmt -> with_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 473: // unlabelled_stmt -> inherited_message + case 474: // unlabelled_stmt -> inherited_message { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 474: // unlabelled_stmt -> try_stmt + case 475: // unlabelled_stmt -> try_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 475: // unlabelled_stmt -> raise_stmt + case 476: // unlabelled_stmt -> raise_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 476: // unlabelled_stmt -> foreach_stmt + case 477: // unlabelled_stmt -> foreach_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 477: // unlabelled_stmt -> var_stmt + case 478: // unlabelled_stmt -> var_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 478: // unlabelled_stmt -> expr_as_stmt + case 479: // unlabelled_stmt -> expr_as_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 479: // unlabelled_stmt -> lock_stmt + case 480: // unlabelled_stmt -> lock_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 480: // unlabelled_stmt -> yield_stmt + case 481: // unlabelled_stmt -> yield_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 481: // unlabelled_stmt -> yield_sequence_stmt + case 482: // unlabelled_stmt -> yield_sequence_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 482: // unlabelled_stmt -> loop_stmt + case 483: // unlabelled_stmt -> loop_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 483: // loop_stmt -> tkLoop, expr_l1, tkDo, unlabelled_stmt + case 484: // 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 484: // yield_stmt -> tkYield, expr_l1 + case 485: // yield_stmt -> tkYield, expr_l1 { CurrentSemanticValue.stn = new yield_node(ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); } break; - case 485: // yield_sequence_stmt -> tkYield, tkSequence, expr_l1 + case 486: // yield_sequence_stmt -> tkYield, tkSequence, expr_l1 { CurrentSemanticValue.stn = new yield_sequence_node(ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); } break; - case 486: // var_stmt -> tkVar, var_decl_part + case 487: // var_stmt -> tkVar, var_decl_part { CurrentSemanticValue.stn = new var_statement(ValueStack[ValueStack.Depth-1].stn as var_def_statement, CurrentLocationSpan); } break; - case 487: // var_stmt -> tkRoundOpen, tkVar, identifier, tkComma, var_ident_list, + case 488: // 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); @@ -4521,7 +4526,7 @@ public partial class GPPGParser: ShiftReduceParser tkVar, tkRoundOpen, identifier, tkComma, ident_list, tkRoundClose, + case 489: // 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); @@ -4529,12 +4534,12 @@ public partial class GPPGParser: ShiftReduceParser var_reference, assign_operator, expr_with_func_decl_lambda + case 490: // 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 490: // assignment -> tkRoundOpen, variable, tkComma, variable_list, tkRoundClose, + case 491: // assignment -> tkRoundOpen, variable, tkComma, variable_list, tkRoundClose, // assign_operator, expr { if (ValueStack[ValueStack.Depth-2].op.type != Operators.Assignment) @@ -4544,41 +4549,41 @@ public partial class GPPGParser: ShiftReduceParser variable + case 492: // variable_list -> variable { CurrentSemanticValue.ob = new addressed_value_list(ValueStack[ValueStack.Depth-1].ex as addressed_value,LocationStack[LocationStack.Depth-1]); } break; - case 492: // variable_list -> variable_list, tkComma, variable + case 493: // 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 493: // var_ident_list -> tkVar, identifier + case 494: // var_ident_list -> tkVar, identifier { CurrentSemanticValue.ob = new ident_list(ValueStack[ValueStack.Depth-1].id,CurrentLocationSpan); } break; - case 494: // var_ident_list -> var_ident_list, tkComma, tkVar, identifier + case 495: // 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 495: // proc_call -> var_reference + case 496: // proc_call -> var_reference { CurrentSemanticValue.stn = new procedure_call(ValueStack[ValueStack.Depth-1].ex as addressed_value, CurrentLocationSpan); } break; - case 496: // goto_stmt -> tkGoto, label_name + case 497: // goto_stmt -> tkGoto, label_name { CurrentSemanticValue.stn = new goto_statement(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 497: // compound_stmt -> tkBegin, stmt_list, tkEnd + case 498: // 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; @@ -4586,73 +4591,73 @@ public partial class GPPGParser: ShiftReduceParser stmt + case 499: // stmt_list -> stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, LocationStack[LocationStack.Depth-1]); } break; - case 499: // stmt_list -> stmt_list, tkSemiColon, stmt + case 500: // 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 500: // if_stmt -> tkIf, expr_l1, tkThen, unlabelled_stmt + case 501: // 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 501: // if_stmt -> tkIf, expr_l1, tkThen, unlabelled_stmt, tkElse, unlabelled_stmt + case 502: // 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 502: // case_stmt -> tkCase, expr_l1, tkOf, case_list, else_case, tkEnd + case 503: // 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 503: // case_list -> case_item + case 504: // 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 504: // case_list -> case_list, tkSemiColon, case_item + case 505: // 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 505: // case_item -> /* empty */ + case 506: // case_item -> /* empty */ { CurrentSemanticValue.stn = new empty_statement(); } break; - case 506: // case_item -> case_label_list, tkColon, unlabelled_stmt + case 507: // 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 507: // case_label_list -> case_label + case 508: // case_label_list -> case_label { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 508: // case_label_list -> case_label_list, tkComma, case_label + case 509: // 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 509: // case_label -> const_elem + case 510: // case_label -> const_elem { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 510: // else_case -> /* empty */ + case 511: // else_case -> /* empty */ { CurrentSemanticValue.stn = null;} break; - case 511: // else_case -> tkElse, stmt_list + case 512: // else_case -> tkElse, stmt_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 512: // repeat_stmt -> tkRepeat, stmt_list, tkUntil, expr + case 513: // 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; @@ -4660,23 +4665,23 @@ public partial class GPPGParser: ShiftReduceParser tkWhile, expr_l1, optional_tk_do, unlabelled_stmt + case 514: // 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 514: // optional_tk_do -> tkDo + case 515: // optional_tk_do -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 515: // optional_tk_do -> /* empty */ + case 516: // optional_tk_do -> /* empty */ { CurrentSemanticValue.ti = null; } break; - case 516: // lock_stmt -> tkLock, expr_l1, tkDo, unlabelled_stmt + case 517: // 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 517: // foreach_stmt -> tkForeach, identifier, foreach_stmt_ident_dype_opt, tkIn, + case 518: // 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); @@ -4684,68 +4689,68 @@ public partial class GPPGParser: ShiftReduceParser tkForeach, tkVar, identifier, tkColon, type_ref, tkIn, expr_l1, + case 519: // 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 519: // foreach_stmt -> tkForeach, tkVar, identifier, tkIn, expr_l1, tkDo, + case 520: // 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 520: // foreach_stmt_ident_dype_opt -> tkColon, type_ref + case 521: // foreach_stmt_ident_dype_opt -> tkColon, type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 522: // for_stmt -> tkFor, optional_var, identifier, for_stmt_decl_or_assign, expr_l1, + case 523: // 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 523: // optional_var -> tkVar + case 524: // optional_var -> tkVar { CurrentSemanticValue.ob = true; } break; - case 524: // optional_var -> /* empty */ + case 525: // optional_var -> /* empty */ { CurrentSemanticValue.ob = false; } break; - case 526: // for_stmt_decl_or_assign -> tkColon, simple_type_identifier, tkAssign + case 527: // for_stmt_decl_or_assign -> tkColon, simple_type_identifier, tkAssign { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-2].td; } break; - case 527: // for_cycle_type -> tkTo + case 528: // for_cycle_type -> tkTo { CurrentSemanticValue.ob = for_cycle_type.to; } break; - case 528: // for_cycle_type -> tkDownto + case 529: // for_cycle_type -> tkDownto { CurrentSemanticValue.ob = for_cycle_type.downto; } break; - case 529: // with_stmt -> tkWith, expr_list, tkDo, unlabelled_stmt + case 530: // 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 530: // inherited_message -> tkInherited + case 531: // inherited_message -> tkInherited { CurrentSemanticValue.stn = new inherited_message(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 531: // try_stmt -> tkTry, stmt_list, try_handler + case 532: // 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 532: // try_handler -> tkFinally, stmt_list, tkEnd + case 533: // 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 533: // try_handler -> tkExcept, exception_block, tkEnd + case 534: // 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) @@ -4755,160 +4760,160 @@ public partial class GPPGParser: ShiftReduceParser exception_handler_list, exception_block_else_branch + case 535: // 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 535: // exception_block -> exception_handler_list, tkSemiColon, + case 536: // 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 536: // exception_block -> stmt_list + case 537: // 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 537: // exception_handler_list -> exception_handler + case 538: // exception_handler_list -> exception_handler { CurrentSemanticValue.stn = new exception_handler_list(ValueStack[ValueStack.Depth-1].stn as exception_handler, CurrentLocationSpan); } break; - case 538: // exception_handler_list -> exception_handler_list, tkSemiColon, + case 539: // 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 539: // exception_block_else_branch -> /* empty */ + case 540: // exception_block_else_branch -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 540: // exception_block_else_branch -> tkElse, stmt_list + case 541: // exception_block_else_branch -> tkElse, stmt_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 541: // exception_handler -> tkOn, exception_identifier, tkDo, unlabelled_stmt + case 542: // 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 542: // exception_identifier -> exception_class_type_identifier + case 543: // exception_identifier -> exception_class_type_identifier { CurrentSemanticValue.stn = new exception_ident(null, (named_type_reference)ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 543: // exception_identifier -> exception_variable, tkColon, + case 544: // 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 544: // exception_class_type_identifier -> simple_type_identifier + case 545: // exception_class_type_identifier -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 545: // exception_variable -> identifier + case 546: // exception_variable -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 546: // raise_stmt -> tkRaise + case 547: // raise_stmt -> tkRaise { CurrentSemanticValue.stn = new raise_stmt(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 547: // raise_stmt -> tkRaise, expr + case 548: // raise_stmt -> tkRaise, expr { CurrentSemanticValue.stn = new raise_stmt(ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 548: // expr_list -> expr_with_func_decl_lambda + case 549: // expr_list -> expr_with_func_decl_lambda { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 549: // expr_list -> expr_list, tkComma, expr_with_func_decl_lambda + case 550: // 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 550: // expr_as_stmt -> allowable_expr_as_stmt + case 551: // expr_as_stmt -> allowable_expr_as_stmt { CurrentSemanticValue.stn = new expression_as_statement(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 551: // allowable_expr_as_stmt -> new_expr + case 552: // allowable_expr_as_stmt -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 552: // expr_with_func_decl_lambda -> expr + case 553: // expr_with_func_decl_lambda -> expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 553: // expr_with_func_decl_lambda -> func_decl_lambda + case 554: // expr_with_func_decl_lambda -> func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 554: // expr -> expr_l1 + case 555: // expr -> expr_l1 { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 555: // expr -> format_expr + case 556: // expr -> format_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 556: // expr_l1 -> expr_dq + case 557: // expr_l1 -> expr_dq { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 557: // expr_l1 -> question_expr + case 558: // expr_l1 -> question_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 558: // expr_dq -> relop_expr + case 559: // expr_dq -> relop_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 559: // expr_dq -> expr_dq, tkDoubleQuestion, relop_expr + case 560: // 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 560: // sizeof_expr -> tkSizeOf, tkRoundOpen, simple_or_template_type_reference, + case 561: // 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 561: // typeof_expr -> tkTypeOf, tkRoundOpen, simple_or_template_type_reference, + case 562: // 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 562: // question_expr -> expr_l1, tkQuestion, expr_l1, tkColon, expr_l1 + case 563: // question_expr -> expr_l1, tkQuestion, expr_l1, tkColon, expr_l1 { CurrentSemanticValue.ex = new question_colon_expression(ValueStack[ValueStack.Depth-5].ex, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 563: // simple_or_template_type_reference -> simple_type_identifier + case 564: // simple_or_template_type_reference -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 564: // simple_or_template_type_reference -> simple_type_identifier, + case 565: // 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 565: // simple_or_template_type_reference -> simple_type_identifier, tkAmpersend, + case 566: // 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 566: // optional_array_initializer -> tkRoundOpen, typed_const_list, tkRoundClose + case 567: // optional_array_initializer -> tkRoundOpen, typed_const_list, tkRoundClose { CurrentSemanticValue.stn = new array_const((expression_list)ValueStack[ValueStack.Depth-2].stn, CurrentLocationSpan); } break; - case 568: // new_expr -> tkNew, simple_or_template_type_reference, + case 569: // 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 569: // new_expr -> tkNew, array_name_for_new_expr, tkSquareOpen, optional_expr_list, + case 570: // new_expr -> tkNew, array_name_for_new_expr, tkSquareOpen, optional_expr_list, // tkSquareClose, optional_array_initializer { var el = ValueStack[ValueStack.Depth-3].stn as expression_list; @@ -4924,7 +4929,7 @@ public partial class GPPGParser: ShiftReduceParser tkNew, tkClass, tkRoundOpen, list_fields_in_unnamed_object, + case 571: // new_expr -> tkNew, tkClass, tkRoundOpen, list_fields_in_unnamed_object, // tkRoundClose { // sugared node @@ -4939,12 +4944,12 @@ public partial class GPPGParser: ShiftReduceParser identifier, tkAssign, relop_expr + case 572: // field_in_unnamed_object -> identifier, tkAssign, relop_expr { CurrentSemanticValue.ob = new name_assign_expr(ValueStack[ValueStack.Depth-3].id,ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); } break; - case 572: // field_in_unnamed_object -> relop_expr + case 573: // field_in_unnamed_object -> relop_expr { ident name = null; var id = ValueStack[ValueStack.Depth-1].ex as ident; @@ -4964,13 +4969,13 @@ public partial class GPPGParser: ShiftReduceParser field_in_unnamed_object + case 574: // 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 574: // list_fields_in_unnamed_object -> list_fields_in_unnamed_object, tkComma, + case 575: // 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; @@ -4981,169 +4986,169 @@ public partial class GPPGParser: ShiftReduceParser simple_type_identifier + case 576: // array_name_for_new_expr -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 576: // array_name_for_new_expr -> unsized_array_type + case 577: // array_name_for_new_expr -> unsized_array_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 577: // optional_expr_list_with_bracket -> /* empty */ + case 578: // optional_expr_list_with_bracket -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 578: // optional_expr_list_with_bracket -> tkRoundOpen, optional_expr_list, + case 579: // optional_expr_list_with_bracket -> tkRoundOpen, optional_expr_list, // tkRoundClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 579: // relop_expr -> simple_expr + case 580: // relop_expr -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 580: // relop_expr -> relop_expr, relop, simple_expr + case 581: // 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 581: // simple_expr_or_nothing -> simple_expr + case 582: // simple_expr_or_nothing -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 582: // simple_expr_or_nothing -> /* empty */ + case 583: // simple_expr_or_nothing -> /* empty */ { CurrentSemanticValue.ex = null; } break; - case 583: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing + case 584: // 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 584: // format_expr -> tkColon, simple_expr_or_nothing + case 585: // format_expr -> tkColon, simple_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 585: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing, tkColon, + case 586: // 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 586: // format_expr -> tkColon, simple_expr_or_nothing, tkColon, simple_expr + case 587: // 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 587: // relop -> tkEqual + case 588: // relop -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 588: // relop -> tkNotEqual + case 589: // relop -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 589: // relop -> tkLower + case 590: // relop -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 590: // relop -> tkGreater + case 591: // relop -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 591: // relop -> tkLowerEqual + case 592: // relop -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 592: // relop -> tkGreaterEqual + case 593: // relop -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 593: // relop -> tkIn + case 594: // relop -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 594: // simple_expr -> term + case 595: // simple_expr -> term { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 595: // simple_expr -> simple_expr, addop, term + case 596: // simple_expr -> simple_expr, 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 596: // addop -> tkPlus + case 597: // addop -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 597: // addop -> tkMinus + case 598: // addop -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 598: // addop -> tkOr + case 599: // addop -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 599: // addop -> tkXor + case 600: // addop -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 600: // addop -> tkCSharpStyleOr + case 601: // addop -> tkCSharpStyleOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 601: // typecast_op -> tkAs + case 602: // typecast_op -> tkAs { CurrentSemanticValue.ob = op_typecast.as_op; } break; - case 602: // typecast_op -> tkIs + case 603: // typecast_op -> tkIs { CurrentSemanticValue.ob = op_typecast.is_op; } break; - case 603: // as_is_expr -> term, typecast_op, simple_or_template_type_reference + case 604: // as_is_expr -> term, typecast_op, simple_or_template_type_reference { CurrentSemanticValue.ex = NewAsIsExpr(ValueStack[ValueStack.Depth-3].ex, (op_typecast)ValueStack[ValueStack.Depth-2].ob, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 604: // simple_term -> factor + case 605: // simple_term -> factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 605: // power_expr -> simple_term, tkStarStar, factor + case 606: // power_expr -> simple_term, tkStarStar, factor { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].ex,(ValueStack[ValueStack.Depth-2].op).type, CurrentLocationSpan); } break; - case 606: // term -> factor + case 607: // term -> factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 607: // term -> new_expr + case 608: // term -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 608: // term -> power_expr + case 609: // term -> power_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 609: // term -> term, mulop, factor + case 610: // 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 610: // term -> term, mulop, power_expr + case 611: // 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 611: // term -> as_is_expr + case 612: // term -> as_is_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 612: // mulop -> tkStar + case 613: // mulop -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 613: // mulop -> tkSlash + case 614: // mulop -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 614: // mulop -> tkDiv + case 615: // mulop -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 615: // mulop -> tkMod + case 616: // mulop -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 616: // mulop -> tkShl + case 617: // mulop -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 617: // mulop -> tkShr + case 618: // mulop -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 618: // mulop -> tkAnd + case 619: // mulop -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 619: // default_expr -> tkDefault, tkRoundOpen, simple_or_template_type_reference, + case 620: // 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 620: // tuple -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, lambda_type_ref, + case 621: // tuple -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, lambda_type_ref, // optional_full_lambda_fp_list, tkRoundClose { /*if ($5 != null) @@ -5157,112 +5162,112 @@ public partial class GPPGParser: ShiftReduceParser tkNil + case 622: // factor -> tkNil { CurrentSemanticValue.ex = new nil_const(); CurrentSemanticValue.ex.source_context = CurrentLocationSpan; } break; - case 622: // factor -> literal_or_number + case 623: // factor -> literal_or_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 623: // factor -> default_expr + case 624: // factor -> default_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 624: // factor -> tkSquareOpen, elem_list, tkSquareClose + case 625: // factor -> tkSquareOpen, elem_list, tkSquareClose { CurrentSemanticValue.ex = new pascal_set_constant(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 625: // factor -> tkNot, factor + case 626: // factor -> tkNot, factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 626: // factor -> sign, factor + case 627: // factor -> sign, factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 627: // factor -> tkDeref, factor + case 628: // factor -> tkDeref, factor { CurrentSemanticValue.ex = new roof_dereference(ValueStack[ValueStack.Depth-1].ex as addressed_value, CurrentLocationSpan); } break; - case 628: // factor -> var_reference + case 629: // factor -> var_reference { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 629: // factor -> tuple + case 630: // factor -> tuple { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 630: // literal_or_number -> literal + case 631: // literal_or_number -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 631: // literal_or_number -> unsigned_number + case 632: // literal_or_number -> unsigned_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 632: // var_question_point -> variable, tkQuestionPoint, variable + case 633: // 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 633: // var_question_point -> variable, tkQuestionPoint, var_question_point + case 634: // 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 634: // var_reference -> var_address, variable + case 635: // 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 635: // var_reference -> variable + case 636: // var_reference -> variable { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 636: // var_reference -> var_question_point + case 637: // var_reference -> var_question_point { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 637: // var_address -> tkAddressOf + case 638: // var_address -> tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(CurrentLocationSpan); } break; - case 638: // var_address -> var_address, tkAddressOf + case 639: // var_address -> var_address, tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(ValueStack[ValueStack.Depth-2].stn as get_address, CurrentLocationSpan); } break; - case 639: // attribute_variable -> simple_type_identifier, optional_expr_list_with_bracket + case 640: // 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 640: // dotted_identifier -> identifier + case 641: // dotted_identifier -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 641: // dotted_identifier -> dotted_identifier, tkPoint, identifier_or_keyword + case 642: // 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 642: // variable_as_type -> dotted_identifier + case 643: // variable_as_type -> dotted_identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;} break; - case 643: // variable_as_type -> dotted_identifier, template_type_params + case 644: // 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 644: // variable -> identifier + case 645: // variable -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 645: // variable -> operator_name_ident + case 646: // variable -> operator_name_ident { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 646: // variable -> tkInherited, identifier + case 647: // variable -> tkInherited, identifier { CurrentSemanticValue.ex = new inherited_ident(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 647: // variable -> tkRoundOpen, expr, tkRoundClose + case 648: // variable -> tkRoundOpen, expr, tkRoundClose { if (!parsertools.build_tree_for_formatter) { @@ -5272,18 +5277,18 @@ public partial class GPPGParser: ShiftReduceParser sizeof_expr + case 649: // variable -> sizeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 649: // variable -> typeof_expr + case 650: // variable -> typeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 650: // variable -> literal_or_number, tkPoint, identifier_or_keyword + case 651: // 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 651: // variable -> variable, tkSquareOpen, expr_list, tkSquareClose + case 652: // variable -> variable, tkSquareOpen, expr_list, tkSquareClose { var el = ValueStack[ValueStack.Depth-2].stn as expression_list; // SSM 10/03/16 if (el.Count==1 && el.expressions[0] is format_expr) @@ -5298,7 +5303,7 @@ public partial class GPPGParser: ShiftReduceParser variable, tkQuestionSquareOpen, format_expr, tkSquareClose + case 653: // variable -> variable, tkQuestionSquareOpen, format_expr, tkSquareClose { var fe = ValueStack[ValueStack.Depth-2].ex as format_expr; // SSM 9/01/17 if (fe.expr == null) @@ -5308,508 +5313,508 @@ public partial class GPPGParser: ShiftReduceParser variable, tkRoundOpen, optional_expr_list, tkRoundClose + case 654: // 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 654: // variable -> variable, tkPoint, identifier_keyword_operatorname + case 655: // 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 655: // variable -> tuple, tkPoint, identifier_keyword_operatorname + case 656: // 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 656: // variable -> variable, tkDeref + case 657: // variable -> variable, tkDeref { CurrentSemanticValue.ex = new roof_dereference(ValueStack[ValueStack.Depth-2].ex as addressed_value,CurrentLocationSpan); } break; - case 657: // variable -> variable, tkAmpersend, template_type_params + case 658: // 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 658: // optional_expr_list -> expr_list + case 659: // optional_expr_list -> expr_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 659: // optional_expr_list -> /* empty */ + case 660: // optional_expr_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 660: // elem_list -> elem_list1 + case 661: // elem_list -> elem_list1 { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 661: // elem_list -> /* empty */ + case 662: // elem_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 662: // elem_list1 -> elem + case 663: // elem_list1 -> elem { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 663: // elem_list1 -> elem_list1, tkComma, elem + case 664: // 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 664: // elem -> expr + case 665: // elem -> expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 665: // elem -> expr, tkDotDot, expr + case 666: // elem -> expr, tkDotDot, expr { CurrentSemanticValue.ex = new diapason_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 666: // one_literal -> tkStringLiteral + case 667: // one_literal -> tkStringLiteral { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 667: // one_literal -> tkAsciiChar + case 668: // one_literal -> tkAsciiChar { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 668: // literal -> literal_list + case 669: // literal -> literal_list { CurrentSemanticValue.ex = NewLiteral(ValueStack[ValueStack.Depth-1].stn as literal_const_line); } break; - case 669: // literal_list -> one_literal + case 670: // literal_list -> one_literal { CurrentSemanticValue.stn = new literal_const_line(ValueStack[ValueStack.Depth-1].ex as literal, CurrentLocationSpan); } break; - case 670: // literal_list -> literal_list, one_literal + case 671: // literal_list -> literal_list, one_literal { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-2].stn as literal_const_line).Add(ValueStack[ValueStack.Depth-1].ex as literal, CurrentLocationSpan); } break; - case 671: // operator_name_ident -> tkOperator, overload_operator + case 672: // 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 672: // optional_method_modificators -> tkSemiColon + case 673: // optional_method_modificators -> tkSemiColon { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 673: // optional_method_modificators -> tkSemiColon, meth_modificators, tkSemiColon + case 674: // 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 674: // optional_method_modificators1 -> /* empty */ + case 675: // optional_method_modificators1 -> /* empty */ { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 675: // optional_method_modificators1 -> tkSemiColon, meth_modificators + case 676: // 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 676: // meth_modificators -> meth_modificator + case 677: // meth_modificators -> meth_modificator { CurrentSemanticValue.stn = new procedure_attributes_list(ValueStack[ValueStack.Depth-1].id as procedure_attribute, CurrentLocationSpan); } break; - case 677: // meth_modificators -> meth_modificators, tkSemiColon, meth_modificator + case 678: // 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 678: // identifier -> tkIdentifier + case 679: // identifier -> tkIdentifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 679: // identifier -> property_specifier_directives + case 680: // identifier -> property_specifier_directives { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 680: // identifier -> non_reserved + case 681: // identifier -> non_reserved { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 681: // identifier_or_keyword -> identifier + case 682: // identifier_or_keyword -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 682: // identifier_or_keyword -> keyword + case 683: // identifier_or_keyword -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 683: // identifier_or_keyword -> reserved_keyword + case 684: // identifier_or_keyword -> reserved_keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 684: // identifier_keyword_operatorname -> identifier + case 685: // identifier_keyword_operatorname -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 685: // identifier_keyword_operatorname -> keyword + case 686: // identifier_keyword_operatorname -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 686: // identifier_keyword_operatorname -> operator_name_ident + case 687: // identifier_keyword_operatorname -> operator_name_ident { CurrentSemanticValue.id = (ident)ValueStack[ValueStack.Depth-1].ex; } break; - case 687: // meth_modificator -> tkAbstract + case 688: // meth_modificator -> tkAbstract { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 688: // meth_modificator -> tkOverload + case 689: // 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 689: // meth_modificator -> tkReintroduce + case 690: // meth_modificator -> tkReintroduce { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 690: // meth_modificator -> tkOverride + case 691: // meth_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 691: // meth_modificator -> tkExtensionMethod + case 692: // meth_modificator -> tkExtensionMethod { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 692: // meth_modificator -> tkVirtual + case 693: // meth_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 693: // property_modificator -> tkVirtual + case 694: // property_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 694: // property_modificator -> tkOverride + case 695: // property_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 695: // property_specifier_directives -> tkRead + case 696: // property_specifier_directives -> tkRead { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 696: // property_specifier_directives -> tkWrite + case 697: // property_specifier_directives -> tkWrite { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 697: // non_reserved -> tkName + case 698: // non_reserved -> tkName { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 698: // non_reserved -> tkNew + case 699: // non_reserved -> tkNew { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 699: // visibility_specifier -> tkInternal + case 700: // visibility_specifier -> tkInternal { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 700: // visibility_specifier -> tkPublic + case 701: // visibility_specifier -> tkPublic { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 701: // visibility_specifier -> tkProtected + case 702: // visibility_specifier -> tkProtected { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 702: // visibility_specifier -> tkPrivate + case 703: // visibility_specifier -> tkPrivate { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 703: // keyword -> visibility_specifier + case 704: // keyword -> visibility_specifier { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 704: // keyword -> tkSealed + case 705: // keyword -> tkSealed { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 705: // keyword -> tkTemplate + case 706: // keyword -> tkTemplate { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 706: // keyword -> tkOr + case 707: // keyword -> tkOr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 707: // keyword -> tkTypeOf + case 708: // keyword -> tkTypeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 708: // keyword -> tkSizeOf + case 709: // keyword -> tkSizeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 709: // keyword -> tkDefault + case 710: // keyword -> tkDefault { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 710: // keyword -> tkWhere + case 711: // keyword -> tkWhere { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 711: // keyword -> tkXor + case 712: // keyword -> tkXor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 712: // keyword -> tkAnd + case 713: // keyword -> tkAnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 713: // keyword -> tkDiv + case 714: // keyword -> tkDiv { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 714: // keyword -> tkMod + case 715: // keyword -> tkMod { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 715: // keyword -> tkShl + case 716: // keyword -> tkShl { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 716: // keyword -> tkShr + case 717: // keyword -> tkShr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 717: // keyword -> tkNot + case 718: // keyword -> tkNot { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 718: // keyword -> tkAs + case 719: // keyword -> tkAs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 719: // keyword -> tkIn + case 720: // keyword -> tkIn { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 720: // keyword -> tkIs + case 721: // keyword -> tkIs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 721: // keyword -> tkArray + case 722: // keyword -> tkArray { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 722: // keyword -> tkSequence + case 723: // keyword -> tkSequence { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 723: // keyword -> tkBegin + case 724: // keyword -> tkBegin { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 724: // keyword -> tkCase + case 725: // keyword -> tkCase { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 725: // keyword -> tkClass + case 726: // keyword -> tkClass { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 726: // keyword -> tkConst + case 727: // keyword -> tkConst { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 727: // keyword -> tkConstructor + case 728: // keyword -> tkConstructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 728: // keyword -> tkDestructor + case 729: // keyword -> tkDestructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 729: // keyword -> tkDownto + case 730: // keyword -> tkDownto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 730: // keyword -> tkDo + case 731: // keyword -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 731: // keyword -> tkElse + case 732: // keyword -> tkElse { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 732: // keyword -> tkExcept + case 733: // keyword -> tkExcept { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 733: // keyword -> tkFile + case 734: // keyword -> tkFile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 734: // keyword -> tkAuto + case 735: // keyword -> tkAuto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 735: // keyword -> tkFinalization + case 736: // keyword -> tkFinalization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 736: // keyword -> tkFinally + case 737: // keyword -> tkFinally { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 737: // keyword -> tkFor + case 738: // keyword -> tkFor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 738: // keyword -> tkForeach + case 739: // keyword -> tkForeach { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 739: // keyword -> tkFunction + case 740: // keyword -> tkFunction { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 740: // keyword -> tkIf + case 741: // keyword -> tkIf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 741: // keyword -> tkImplementation + case 742: // keyword -> tkImplementation { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 742: // keyword -> tkInherited + case 743: // keyword -> tkInherited { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 743: // keyword -> tkInitialization + case 744: // keyword -> tkInitialization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 744: // keyword -> tkInterface + case 745: // keyword -> tkInterface { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 745: // keyword -> tkProcedure + case 746: // keyword -> tkProcedure { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 746: // keyword -> tkProperty + case 747: // keyword -> tkProperty { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 747: // keyword -> tkRaise + case 748: // keyword -> tkRaise { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 748: // keyword -> tkRecord + case 749: // keyword -> tkRecord { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 749: // keyword -> tkRepeat + case 750: // keyword -> tkRepeat { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 750: // keyword -> tkSet + case 751: // keyword -> tkSet { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 751: // keyword -> tkTry + case 752: // keyword -> tkTry { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 752: // keyword -> tkType + case 753: // keyword -> tkType { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 753: // keyword -> tkThen + case 754: // keyword -> tkThen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 754: // keyword -> tkTo + case 755: // keyword -> tkTo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 755: // keyword -> tkUntil + case 756: // keyword -> tkUntil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 756: // keyword -> tkUses + case 757: // keyword -> tkUses { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 757: // keyword -> tkVar + case 758: // keyword -> tkVar { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 758: // keyword -> tkWhile + case 759: // keyword -> tkWhile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 759: // keyword -> tkWith + case 760: // keyword -> tkWith { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 760: // keyword -> tkNil + case 761: // keyword -> tkNil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 761: // keyword -> tkGoto + case 762: // keyword -> tkGoto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 762: // keyword -> tkOf + case 763: // keyword -> tkOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 763: // keyword -> tkLabel + case 764: // keyword -> tkLabel { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 764: // keyword -> tkProgram + case 765: // keyword -> tkProgram { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 765: // keyword -> tkUnit + case 766: // keyword -> tkUnit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 766: // keyword -> tkLibrary + case 767: // keyword -> tkLibrary { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 767: // keyword -> tkNamespace + case 768: // keyword -> tkNamespace { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 768: // keyword -> tkExternal + case 769: // keyword -> tkExternal { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 769: // keyword -> tkParams + case 770: // keyword -> tkParams { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 770: // keyword -> tkEvent + case 771: // keyword -> tkEvent { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 771: // keyword -> tkYield + case 772: // keyword -> tkYield { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 772: // reserved_keyword -> tkOperator + case 773: // reserved_keyword -> tkOperator { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 773: // reserved_keyword -> tkEnd + case 774: // reserved_keyword -> tkEnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 774: // overload_operator -> tkMinus + case 775: // overload_operator -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 775: // overload_operator -> tkPlus + case 776: // overload_operator -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 776: // overload_operator -> tkSlash + case 777: // overload_operator -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 777: // overload_operator -> tkStar + case 778: // overload_operator -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 778: // overload_operator -> tkEqual + case 779: // overload_operator -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 779: // overload_operator -> tkGreater + case 780: // overload_operator -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 780: // overload_operator -> tkGreaterEqual + case 781: // overload_operator -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 781: // overload_operator -> tkLower + case 782: // overload_operator -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 782: // overload_operator -> tkLowerEqual + case 783: // overload_operator -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 783: // overload_operator -> tkNotEqual + case 784: // overload_operator -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 784: // overload_operator -> tkOr + case 785: // overload_operator -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 785: // overload_operator -> tkXor + case 786: // overload_operator -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 786: // overload_operator -> tkAnd + case 787: // overload_operator -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 787: // overload_operator -> tkDiv + case 788: // overload_operator -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 788: // overload_operator -> tkMod + case 789: // overload_operator -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 789: // overload_operator -> tkShl + case 790: // overload_operator -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 790: // overload_operator -> tkShr + case 791: // overload_operator -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 791: // overload_operator -> tkNot + case 792: // overload_operator -> tkNot { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 792: // overload_operator -> tkIn + case 793: // overload_operator -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 793: // overload_operator -> tkImplicit + case 794: // overload_operator -> tkImplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 794: // overload_operator -> tkExplicit + case 795: // overload_operator -> tkExplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 795: // overload_operator -> assign_operator + case 796: // overload_operator -> assign_operator { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 796: // overload_operator -> tkStarStar + case 797: // overload_operator -> tkStarStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 797: // assign_operator -> tkAssign + case 798: // assign_operator -> tkAssign { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 798: // assign_operator -> tkPlusEqual + case 799: // assign_operator -> tkPlusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 799: // assign_operator -> tkMinusEqual + case 800: // assign_operator -> tkMinusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 800: // assign_operator -> tkMultEqual + case 801: // assign_operator -> tkMultEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 801: // assign_operator -> tkDivEqual + case 802: // assign_operator -> tkDivEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 802: // func_decl_lambda -> identifier, tkArrow, lambda_function_body + case 803: // func_decl_lambda -> identifier, tkArrow, lambda_function_body { var idList = new ident_list(ValueStack[ValueStack.Depth-3].id, LocationStack[LocationStack.Depth-3]); var formalPars = new formal_parameters(new typed_parameters(idList, new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), LocationStack[LocationStack.Depth-3]), parametr_kind.none, null, LocationStack[LocationStack.Depth-3]), LocationStack[LocationStack.Depth-3]); CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), formalPars, new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), LocationStack[LocationStack.Depth-3]), ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 803: // func_decl_lambda -> tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, + case 804: // func_decl_lambda -> tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, // tkArrow, lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 804: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkRoundClose, + case 805: // 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]); @@ -5818,7 +5823,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, + case 806: // func_decl_lambda -> tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, // tkRoundClose, lambda_type_ref_noproctype, tkArrow, // lambda_function_body { @@ -5829,7 +5834,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, + case 807: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, // full_lambda_fp_list, tkRoundClose, // lambda_type_ref_noproctype, tkArrow, lambda_function_body { @@ -5841,7 +5846,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, expr_l1, tkComma, expr_l1_list, + case 808: // func_decl_lambda -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, // lambda_type_ref, optional_full_lambda_fp_list, // tkRoundClose, rem_lambda { @@ -5903,61 +5908,61 @@ public partial class GPPGParser: ShiftReduceParser expl_func_decl_lambda + case 809: // func_decl_lambda -> expl_func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 809: // optional_full_lambda_fp_list -> /* empty */ + case 810: // optional_full_lambda_fp_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 810: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list + case 811: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 811: // rem_lambda -> lambda_type_ref_noproctype, tkArrow, lambda_function_body + case 812: // 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 812: // expl_func_decl_lambda -> tkFunction, lambda_type_ref, tkArrow, + case 813: // expl_func_decl_lambda -> tkFunction, lambda_type_ref, tkArrow, // lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, 1, CurrentLocationSpan); } break; - case 813: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, tkRoundClose, lambda_type_ref, + case 814: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, tkRoundClose, lambda_type_ref, // tkArrow, lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, 1, CurrentLocationSpan); } break; - case 814: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, + case 815: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, // tkRoundClose, lambda_type_ref, tkArrow, // lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), ValueStack[ValueStack.Depth-5].stn as formal_parameters, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, 1, CurrentLocationSpan); } break; - case 815: // expl_func_decl_lambda -> tkProcedure, tkArrow, lambda_procedure_body + case 816: // 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 816: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, tkRoundClose, tkArrow, + case 817: // 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 817: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, full_lambda_fp_list, + case 818: // 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 818: // full_lambda_fp_list -> lambda_simple_fp_sect + case 819: // 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) @@ -5977,147 +5982,147 @@ public partial class GPPGParser: ShiftReduceParser full_lambda_fp_list, tkSemiColon, lambda_simple_fp_sect + case 820: // 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 820: // lambda_simple_fp_sect -> ident_list, lambda_type_ref + case 821: // 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 821: // lambda_type_ref -> /* empty */ + case 822: // lambda_type_ref -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 822: // lambda_type_ref -> tkColon, fptype + case 823: // lambda_type_ref -> tkColon, fptype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 823: // lambda_type_ref_noproctype -> /* empty */ + case 824: // lambda_type_ref_noproctype -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 824: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype + case 825: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 825: // lambda_function_body -> expr_l1 + case 826: // lambda_function_body -> expr_l1 { CurrentSemanticValue.stn = NewLambdaBody(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 826: // lambda_function_body -> compound_stmt + case 827: // lambda_function_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 827: // lambda_function_body -> if_stmt + case 828: // lambda_function_body -> if_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 828: // lambda_function_body -> while_stmt + case 829: // lambda_function_body -> while_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 829: // lambda_function_body -> repeat_stmt + case 830: // lambda_function_body -> repeat_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 830: // lambda_function_body -> for_stmt + case 831: // lambda_function_body -> for_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 831: // lambda_function_body -> foreach_stmt + case 832: // lambda_function_body -> foreach_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 832: // lambda_function_body -> case_stmt + case 833: // lambda_function_body -> case_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 833: // lambda_function_body -> try_stmt + case 834: // lambda_function_body -> try_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 834: // lambda_function_body -> lock_stmt + case 835: // lambda_function_body -> lock_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 835: // lambda_function_body -> yield_stmt + case 836: // lambda_function_body -> yield_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 836: // lambda_procedure_body -> proc_call + case 837: // lambda_procedure_body -> proc_call { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 837: // lambda_procedure_body -> compound_stmt + case 838: // lambda_procedure_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 838: // lambda_procedure_body -> if_stmt + case 839: // lambda_procedure_body -> if_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 839: // lambda_procedure_body -> while_stmt + case 840: // lambda_procedure_body -> while_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 840: // lambda_procedure_body -> repeat_stmt + case 841: // lambda_procedure_body -> repeat_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 841: // lambda_procedure_body -> for_stmt + case 842: // lambda_procedure_body -> for_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 842: // lambda_procedure_body -> foreach_stmt + case 843: // lambda_procedure_body -> foreach_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 843: // lambda_procedure_body -> case_stmt + case 844: // lambda_procedure_body -> case_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 844: // lambda_procedure_body -> try_stmt + case 845: // lambda_procedure_body -> try_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 845: // lambda_procedure_body -> lock_stmt + case 846: // lambda_procedure_body -> lock_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 846: // lambda_procedure_body -> yield_stmt + case 847: // lambda_procedure_body -> yield_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 847: // lambda_procedure_body -> assignment + case 848: // lambda_procedure_body -> assignment { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } diff --git a/TreeConverter/TreeConversion/syntax_tree_visitor.cs b/TreeConverter/TreeConversion/syntax_tree_visitor.cs index fe807ea5c..9c8eb4f16 100644 --- a/TreeConverter/TreeConversion/syntax_tree_visitor.cs +++ b/TreeConverter/TreeConversion/syntax_tree_visitor.cs @@ -16432,6 +16432,8 @@ namespace PascalABCCompiler.TreeConverter { string module_name = ""; string name = ""; + if (context.converted_func_stack.top() is common_method_node && (context.converted_func_stack.top() as common_method_node).polymorphic_state != SemanticTree.polymorphic_state.ps_static) + AddError(context.top_function.loc, "EXTERNAL_METHOD_SHOULD_BE_STATIC"); if (_external_directive.modulename == null) { if (!has_dll_import_attribute(context.top_function)) diff --git a/bin/Lng/Eng/SemanticErrors_ib.dat b/bin/Lng/Eng/SemanticErrors_ib.dat index e112204e7..8e52368a3 100644 --- a/bin/Lng/Eng/SemanticErrors_ib.dat +++ b/bin/Lng/Eng/SemanticErrors_ib.dat @@ -136,6 +136,7 @@ RETURN_VALUE_IMPLICIT_EXPLICIT_EXPECTED=Can not declare implicit and explicit op RETURN_TYPE_UNDEFINED_{0}=Return type of function {0} is not defined and cannot be deduced. Declare the return type explicitly. OPERATOR_RETURN_TYPE_UNDEFINED_{0}=Return type of operator {0} is not defined and cannot be deduced. Declare the return type explicitly. STRUCT_TYPE_DEFINITION_IN_AUTO_CLASS=Field types in auto classes cannot be record or array definition +EXTERNAL_METHOD_SHOULD_BE_STATIC=external-methods should be static %PREFIX%=COMPILATIONERROR_ UNIT_MODULE_EXPECTED_LIBRARY_FOUND=Unit expected, library found ASSEMBLY_{0}_READING_ERROR=Error by reading assembly '{0}' diff --git a/bin/Lng/Rus/SemanticErrors_ib.dat b/bin/Lng/Rus/SemanticErrors_ib.dat index 89fa13fa4..2c795d09c 100644 --- a/bin/Lng/Rus/SemanticErrors_ib.dat +++ b/bin/Lng/Rus/SemanticErrors_ib.dat @@ -131,6 +131,7 @@ RETURN_VALUE_IMPLICIT_EXPLICIT_EXPECTED=Тип возвращаемого зна RETURN_TYPE_UNDEFINED_{0}=Тип возвращаемого значения функции {0} не определен и не может быть выведен в данный момент. Укажите тип явно. OPERATOR_RETURN_TYPE_UNDEFINED_{0}=Тип возвращаемого значения оператора {0} не определен и не может быть выведен в данный момент. Укажите тип явно. STRUCT_TYPE_DEFINITION_IN_AUTO_CLASS=Типы полей авто-класса не могут быть описанием записи или описанием массива с границами +EXTERNAL_METHOD_SHOULD_BE_STATIC=external-методы должны быть статическими %PREFIX%=COMPILATIONERROR_ UNIT_MODULE_EXPECTED_LIBRARY_FOUND=Ожидался модуль, а встречена библиотека ASSEMBLY_{0}_READING_ERROR=Ошибка при чтении сборки '{0}' diff --git a/bin/Lng/Ukr/SemanticErrors_ib.dat b/bin/Lng/Ukr/SemanticErrors_ib.dat index 428fa881c..a9e44a2d8 100644 --- a/bin/Lng/Ukr/SemanticErrors_ib.dat +++ b/bin/Lng/Ukr/SemanticErrors_ib.dat @@ -129,6 +129,7 @@ RETURN_VALUE_IMPLICIT_EXPLICIT_EXPECTED=Тип возвращаемого зна RETURN_TYPE_UNDEFINED_{0}=Тип возвращаемого значения функции {0} не определен и не может быть выведен в данный момент. Укажите тип явно. OPERATOR_RETURN_TYPE_UNDEFINED_{0}=Тип возвращаемого значения оператора {0} не определен и не может быть выведен в данный момент. Укажите тип явно. STRUCT_TYPE_DEFINITION_IN_AUTO_CLASS=Типы полей авто-класса не могут быть описанием записи или описанием массива с границами +EXTERNAL_METHOD_SHOULD_BE_STATIC=external-методы должны быть статическими %PREFIX%=COMPILATIONERROR_ UNIT_MODULE_EXPECTED_LIBRARY_FOUND=Очікувався модуль, а зустріли бібліотеку ASSEMBLY_{0}_READING_ERROR=Помилка при читанні збірки '{0}'