diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index e43b3bb95..0dabee9b6 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs @@ -2,7 +2,7 @@ // This CSharp output file generated by Gardens Point LEX // Version: 1.1.3.301 // Machine: DESKTOP-A6LT9RI -// DateTime: 05.07.2018 12:41:15 +// DateTime: 12.07.2018 11:09:32 // UserName: ????????? // GPLEX input file // GPLEX frame file diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.lst b/Parsers/PascalABCParserNewSaushkin/ABCPascal.lst index b2d709d28..27d2f28ed 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.lst +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.lst @@ -4,7 +4,7 @@ // ========================================================================== // Version: 1.3.6 // Machine: DESKTOP-A6LT9RI -// DateTime: 01.07.2018 10:55:30 +// DateTime: 11.07.2018 23:15:18 // UserName: Станислав // ========================================================================== @@ -154,7 +154,7 @@ %type string_type %type sizeof_expr %type simple_prim_property_definition simple_property_definition -%type stmt_or_expression unlabelled_stmt optional_unlabelled_stmt stmt case_item +%type stmt_or_expression unlabelled_stmt stmt case_item %type set_type %type as_is_expr as_is_constexpr is_expr as_expr power_expr power_constexpr %type unsized_array_type simple_type_or_ simple_type array_name_for_new_expr foreach_stmt_ident_dype_opt fptype type_ref fptype_noproctype array_type @@ -189,13 +189,8 @@ %type pattern pattern_optional_var match_with pattern_case pattern_cases pattern_out_param pattern_out_param_optional_var %type pattern_out_param_list pattern_out_param_list_optional_var %% -// Warning: NonTerminal symbol "optional_unlabelled_stmt" is unreachable -// Error: NonTerminal symbol "optional_unlabelled_stmt" has no productions -// Error: There are 1 non-terminating NonTerminal Symbols - // {optional_unlabelled_stmt} -// Warning: Terminating optional_unlabelled_stmt fixes the following size-1 NonTerminal set - // {optional_unlabelled_stmt} -// ---------------------------------------------------------------------------------------- +// Warning: NonTerminal symbol "typed_var_init_expression" is unreachable +// ---------------------------------------------------------------------- parse_goal : program_file @@ -860,13 +855,13 @@ const_factor var i64 = $2 as int64_const; if (i64 != null && i64.val == (Int64)Int32.MaxValue + 1) { - $$ = new int32_const(Int32.MinValue); + $$ = new int32_const(Int32.MinValue,@$); break; } var ui64 = $2 as uint64_const; if (ui64 != null && ui64.val == (UInt64)Int64.MaxValue + 1) { - $$ = new int64_const(Int64.MinValue); + $$ = new int64_const(Int64.MinValue,@$); break; } if (ui64 != null && ui64.val > (UInt64)Int64.MaxValue + 1) @@ -1517,20 +1512,38 @@ object_type { $$ = NewObjectType((class_attribute)$1, $2, $3 as named_type_reference_list, $4 as where_definition_list, $5 as class_body_list, @$); class_definition cd = $$ as class_definition; + if (cd == null || cd.body == null) + break; var ccnt = cd.body.DescendantNodes().OfType().ToArray(); var cm = new class_members(access_modifer.private_modifer); foreach (var prop in ccnt) { var td = prop.property_type; - if (prop.accessors.read_accessor != null && prop.accessors.read_accessor.pr != null) + var ra = prop.accessors.read_accessor; + if (ra != null && ra.pr != null) { - (prop.accessors.read_accessor.pr.proc_header as function_header).return_type = td; - cm.Add(prop.accessors.read_accessor.pr); + (ra.pr.proc_header as function_header).return_type = td; + cm.Add(ra.pr); + if (prop.attr == definition_attribute.Static) + { + ra.pr.proc_header.class_keyword = true; + procedure_attribute pa = new procedure_attribute(proc_attribute.attr_static); + pa.source_context = ra.pr.proc_header.source_context; + ra.pr.proc_header.proc_attributes = new procedure_attributes_list(pa); + } } - if (prop.accessors.write_accessor != null && prop.accessors.write_accessor.pr != null) + var wa = prop.accessors.write_accessor; + if (wa != null && wa.pr != null) { - prop.accessors.write_accessor.pr.proc_header.parameters.params_list[0].vars_type = td; - cm.Add(prop.accessors.write_accessor.pr); + wa.pr.proc_header.parameters.params_list[0].vars_type = td; + cm.Add(wa.pr); + if (prop.attr == definition_attribute.Static) + { + wa.pr.proc_header.class_keyword = true; + procedure_attribute pa = new procedure_attribute(proc_attribute.attr_static); + pa.source_context = wa.pr.proc_header.source_context; + wa.pr.proc_header.proc_attributes = new procedure_attributes_list(pa); + } } } if (cm.Count>0) @@ -1957,9 +1970,9 @@ array_defaultproperty ; property_interface - : + :/* { $$ = null; } - | property_parameter_list tkColon fptype + |*/ property_parameter_list tkColon fptype { $$ = new property_interface($1 as property_parameter_list, $3, null, @$); } @@ -2004,13 +2017,6 @@ optional_write_expr { $$ = null; } ;*/ -/*optional_unlabelled_stmt - : unlabelled_stmt - { $$ = $1; } - | - { $$ = null; } - ;*/ - optional_read_expr : expr_with_func_decl_lambda { $$ = $1; } @@ -2040,16 +2046,16 @@ property_specifiers $$ = NewPropertySpecifiersWrite($1, null, null, $3 as property_accessors, @$); } - else if ($2 is procedure_call && ($2 as procedure_call).func_name.is_ident) + else if ($2 is procedure_call && ($2 as procedure_call).is_ident) { - $$ = NewPropertySpecifiersWrite($1, ($2 as procedure_call).func_name as ident, null, $3 as property_accessors, @$); + $$ = NewPropertySpecifiersWrite($1, ($2 as procedure_call).func_name as ident, null, $3 as property_accessors, @$); // ñòàðûå ñâîéñòâà - ñ èäåíòèôèêàòîðîì } else { var id = NewId("#SetGen"); - //var pr = CreateAndAddToClassWriteProc($2,id,@2); - $$ = NewPropertySpecifiersWrite($1, id, null, $3 as property_accessors, @$); + var pr = CreateAndAddToClassWriteProc($2 as statement,id,@2); + $$ = NewPropertySpecifiersWrite($1, id, pr, $3 as property_accessors, @$); } } ; @@ -2062,15 +2068,15 @@ write_property_specifiers $$ = NewPropertySpecifiersWrite($1, null, null, null, @$); } - else if ($2 is procedure_call && ($2 as procedure_call).func_name.is_ident) + else if ($2 is procedure_call && ($2 as procedure_call).is_ident) { - $$ = NewPropertySpecifiersWrite($1, ($2 as procedure_call).func_name as ident, null, null, @$); + $$ = NewPropertySpecifiersWrite($1, ($2 as procedure_call).func_name as ident, null, null, @$); // ñòàðûå ñâîéñòâà - ñ èäåíòèôèêàòîðîì } else { var id = NewId("#SetGen"); - //var pr = CreateAndAddToClassWriteProc($2,id,@2); - $$ = NewPropertySpecifiersWrite($1, id, null, null, @$); + var pr = CreateAndAddToClassWriteProc($2 as statement,id,@2); + $$ = NewPropertySpecifiersWrite($1, id, pr, null, @$); } } ; @@ -2126,7 +2132,7 @@ var_decl_part { $$ = new var_def_statement($1 as ident_list, null, $3, definition_attribute.None, false, @$); } - | ident_list tkColon type_ref tkAssignOrEqual typed_var_init_expression // typed_const_plus óæå äàâíî íå êîíñòàíòà :) Íî ñþäà íå ïîïàëè Tuples, ïîñêîëüêó îíè êîíêóðèðóþò ñ äóðàöêèìè ñòàðûìè èíèöèàëèçàòîðàìè ìàññèâîâ + | ident_list tkColon type_ref tkAssignOrEqual expr_l1 // typed_const_plus óæå äàâíî íå êîíñòàíòà :) Íî ñþäà íå ïîïàëè Tuples, ïîñêîëüêó îíè êîíêóðèðóþò ñ äóðàöêèìè ñòàðûìè èíèöèàëèçàòîðàìè ìàññèâîâ { $$ = new var_def_statement($1 as ident_list, $3, $5, definition_attribute.None, false, @$); } @@ -3497,13 +3503,13 @@ factor var i64 = $2 as int64_const; if (i64 != null && i64.val == (Int64)Int32.MaxValue + 1) { - $$ = new int32_const(Int32.MinValue); + $$ = new int32_const(Int32.MinValue,@$); break; } var ui64 = $2 as uint64_const; if (ui64 != null && ui64.val == (UInt64)Int64.MaxValue + 1) { - $$ = new int64_const(Int64.MinValue); + $$ = new int64_const(Int64.MinValue,@$); break; } if (ui64 != null && ui64.val > (UInt64)Int64.MaxValue + 1) @@ -4358,6 +4364,10 @@ lambda_procedure_body { $$ = new statement_list($1 as statement, @$); } + | raise_stmt + { + $$ = new statement_list($1 as statement, @$); + } | assignment { $$ = new statement_list($1 as statement, @$); diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y index 2474943e0..a05e60cc4 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y @@ -3991,6 +3991,8 @@ keyword { $$ = $1; } | tkWhen { $$ = $1; } + | tkInstance + { $$ = $1; } ; reserved_keyword diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index bede8d998..a322ff41f 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -2,7 +2,7 @@ // GPPG version 1.3.6 // Machine: DESKTOP-A6LT9RI -// DateTime: 05.07.2018 12:41:16 +// DateTime: 12.07.2018 11:09:33 // UserName: ????????? // Input file @@ -74,8 +74,8 @@ public partial class GPPGParser: ShiftReduceParser aliasses; #pragma warning restore 649 - private static Rule[] rules = new Rule[891]; - private static State[] states = new State[1468]; + private static Rule[] rules = new Rule[892]; + private static State[] states = new State[1469]; private static string[] nonTerms = new string[] { "parse_goal", "unit_key_word", "assignment", "optional_array_initializer", "attribute_declarations", "ot_visibility_specifier", "one_attribute", "attribute_variable", @@ -159,13 +159,13 @@ public partial class GPPGParser: ShiftReduceParser tkWhen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 814: // reserved_keyword -> tkOperator + case 814: // keyword -> tkInstance { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 815: // reserved_keyword -> tkEnd + case 815: // reserved_keyword -> tkOperator { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 816: // overload_operator -> tkMinus + case 816: // reserved_keyword -> tkEnd +{ CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } + break; + case 817: // overload_operator -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 817: // overload_operator -> tkPlus + case 818: // overload_operator -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 818: // overload_operator -> tkSlash + case 819: // overload_operator -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 819: // overload_operator -> tkStar + case 820: // overload_operator -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 820: // overload_operator -> tkEqual + case 821: // overload_operator -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 821: // overload_operator -> tkGreater + case 822: // overload_operator -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 822: // overload_operator -> tkGreaterEqual + case 823: // overload_operator -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 823: // overload_operator -> tkLower + case 824: // overload_operator -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 824: // overload_operator -> tkLowerEqual + case 825: // overload_operator -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 825: // overload_operator -> tkNotEqual + case 826: // overload_operator -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 826: // overload_operator -> tkOr + case 827: // overload_operator -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 827: // overload_operator -> tkXor + case 828: // overload_operator -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 828: // overload_operator -> tkAnd + case 829: // overload_operator -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 829: // overload_operator -> tkDiv + case 830: // overload_operator -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 830: // overload_operator -> tkMod + case 831: // overload_operator -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 831: // overload_operator -> tkShl + case 832: // overload_operator -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 832: // overload_operator -> tkShr + case 833: // overload_operator -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 833: // overload_operator -> tkNot + case 834: // overload_operator -> tkNot { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 834: // overload_operator -> tkIn + case 835: // overload_operator -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 835: // overload_operator -> tkImplicit + case 836: // overload_operator -> tkImplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 836: // overload_operator -> tkExplicit + case 837: // overload_operator -> tkExplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 837: // overload_operator -> assign_operator + case 838: // overload_operator -> assign_operator { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 838: // overload_operator -> tkStarStar + case 839: // overload_operator -> tkStarStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 839: // assign_operator -> tkAssign + case 840: // assign_operator -> tkAssign { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 840: // assign_operator -> tkPlusEqual + case 841: // assign_operator -> tkPlusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 841: // assign_operator -> tkMinusEqual + case 842: // assign_operator -> tkMinusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 842: // assign_operator -> tkMultEqual + case 843: // assign_operator -> tkMultEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 843: // assign_operator -> tkDivEqual + case 844: // assign_operator -> tkDivEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 844: // func_decl_lambda -> identifier, tkArrow, lambda_function_body + case 845: // 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 845: // func_decl_lambda -> tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, + case 846: // 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 846: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkRoundClose, + case 847: // 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]); @@ -6354,7 +6359,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, + case 848: // func_decl_lambda -> tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, // tkRoundClose, lambda_type_ref_noproctype, tkArrow, // lambda_function_body { @@ -6365,7 +6370,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, + case 849: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, // full_lambda_fp_list, tkRoundClose, // lambda_type_ref_noproctype, tkArrow, lambda_function_body { @@ -6377,7 +6382,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, expr_l1, tkComma, expr_l1_list, + case 850: // func_decl_lambda -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, // lambda_type_ref, optional_full_lambda_fp_list, // tkRoundClose, rem_lambda { @@ -6439,61 +6444,61 @@ public partial class GPPGParser: ShiftReduceParser expl_func_decl_lambda + case 851: // func_decl_lambda -> expl_func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 851: // optional_full_lambda_fp_list -> /* empty */ + case 852: // optional_full_lambda_fp_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 852: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list + case 853: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 853: // rem_lambda -> lambda_type_ref_noproctype, tkArrow, lambda_function_body + case 854: // 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 854: // expl_func_decl_lambda -> tkFunction, lambda_type_ref, tkArrow, + case 855: // 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 855: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, tkRoundClose, lambda_type_ref, + case 856: // 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 856: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, + case 857: // 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 857: // expl_func_decl_lambda -> tkProcedure, tkArrow, lambda_procedure_body + case 858: // 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 858: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, tkRoundClose, tkArrow, + case 859: // 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 859: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, full_lambda_fp_list, + case 860: // 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 860: // full_lambda_fp_list -> lambda_simple_fp_sect + case 861: // 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) @@ -6513,152 +6518,152 @@ public partial class GPPGParser: ShiftReduceParser full_lambda_fp_list, tkSemiColon, lambda_simple_fp_sect + case 862: // 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 862: // lambda_simple_fp_sect -> ident_list, lambda_type_ref + case 863: // 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 863: // lambda_type_ref -> /* empty */ + case 864: // lambda_type_ref -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 864: // lambda_type_ref -> tkColon, fptype + case 865: // lambda_type_ref -> tkColon, fptype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 865: // lambda_type_ref_noproctype -> /* empty */ + case 866: // lambda_type_ref_noproctype -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 866: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype + case 867: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 867: // lambda_function_body -> expr_l1 + case 868: // lambda_function_body -> expr_l1 { CurrentSemanticValue.stn = NewLambdaBody(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 868: // lambda_function_body -> compound_stmt + case 869: // lambda_function_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 869: // lambda_function_body -> if_stmt + case 870: // lambda_function_body -> if_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 870: // lambda_function_body -> while_stmt + case 871: // lambda_function_body -> while_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 871: // lambda_function_body -> repeat_stmt + case 872: // lambda_function_body -> repeat_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 872: // lambda_function_body -> for_stmt + case 873: // lambda_function_body -> for_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 873: // lambda_function_body -> foreach_stmt + case 874: // lambda_function_body -> foreach_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 874: // lambda_function_body -> case_stmt + case 875: // lambda_function_body -> case_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 875: // lambda_function_body -> try_stmt + case 876: // lambda_function_body -> try_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 876: // lambda_function_body -> lock_stmt + case 877: // lambda_function_body -> lock_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 877: // lambda_function_body -> yield_stmt + case 878: // lambda_function_body -> yield_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 878: // lambda_procedure_body -> proc_call + case 879: // lambda_procedure_body -> proc_call { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 879: // lambda_procedure_body -> compound_stmt + case 880: // lambda_procedure_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 880: // lambda_procedure_body -> if_stmt + case 881: // lambda_procedure_body -> if_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 881: // lambda_procedure_body -> while_stmt + case 882: // lambda_procedure_body -> while_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 882: // lambda_procedure_body -> repeat_stmt + case 883: // lambda_procedure_body -> repeat_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 883: // lambda_procedure_body -> for_stmt + case 884: // lambda_procedure_body -> for_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 884: // lambda_procedure_body -> foreach_stmt + case 885: // lambda_procedure_body -> foreach_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 885: // lambda_procedure_body -> case_stmt + case 886: // lambda_procedure_body -> case_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 886: // lambda_procedure_body -> try_stmt + case 887: // lambda_procedure_body -> try_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 887: // lambda_procedure_body -> lock_stmt + case 888: // lambda_procedure_body -> lock_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 888: // lambda_procedure_body -> yield_stmt + case 889: // lambda_procedure_body -> yield_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 889: // lambda_procedure_body -> raise_stmt + case 890: // lambda_procedure_body -> raise_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 890: // lambda_procedure_body -> assignment + case 891: // lambda_procedure_body -> assignment { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } diff --git a/Parsers/PascalABCParserNewSaushkin/PABC.ymc b/Parsers/PascalABCParserNewSaushkin/PABC.ymc index caeb5b1ac..9ee3f6a65 100644 --- a/Parsers/PascalABCParserNewSaushkin/PABC.ymc +++ b/Parsers/PascalABCParserNewSaushkin/PABC.ymc @@ -197,6 +197,8 @@ script= + +