diff --git a/CodeCompletion/CodeFormatter.cs b/CodeCompletion/CodeFormatter.cs index 59ed17a4a..a22b46240 100644 --- a/CodeCompletion/CodeFormatter.cs +++ b/CodeCompletion/CodeFormatter.cs @@ -2828,13 +2828,13 @@ namespace CodeFormatters public override void visit(assign_var_tuple _assign_var_tuple) { read_from_beg_pos = true; - for (int i = 0; i < _assign_var_tuple.vars.variables.Count; i++) + for (int i = 0; i < _assign_var_tuple.idents.idents.Count; i++) { if (options.SpaceBetweenArguments == 1) { add_space_after = true; } - visit_node(_assign_var_tuple.vars.variables[i]); + visit_node(_assign_var_tuple.idents.idents[i]); add_space_before = true; } visit_node(_assign_var_tuple.expr); diff --git a/CodeCompletion/DomSyntaxTreeVisitor.cs b/CodeCompletion/DomSyntaxTreeVisitor.cs index fa5f9911e..dce561467 100644 --- a/CodeCompletion/DomSyntaxTreeVisitor.cs +++ b/CodeCompletion/DomSyntaxTreeVisitor.cs @@ -4507,9 +4507,9 @@ namespace CodeCompletion TypeScope ts = returned_scope as TypeScope; if (ts != null && ts.instances != null && ts.instances.Count > 0) { - for (int i = 0; i < _assign_var_tuple.vars.variables.Count; i++) + for (int i = 0; i < _assign_var_tuple.idents.idents.Count; i++) { - ident id = _assign_var_tuple.vars.variables[i] as ident; + ident id = _assign_var_tuple.idents.idents[i]; if (id != null) { SymInfo si = new SymInfo(id.name, SymbolKind.Variable, id.name); diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 226163767..f2a31facd 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "2"; public const string Build = "0"; - public const string Revision = "1457"; + public const string Revision = "1463"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index 20c90e302..840ac3aa9 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %COREVERSION%=0 -%REVISION%=1457 +%REVISION%=1463 %MINOR%=2 %MAJOR%=3 diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index 75895d375..9c8042165 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-8EAQPI9 -// DateTime: 31.05.2017 22:24:31 +// DateTime: 01.06.2017 11:45:28 // UserName: ????????? // GPLEX input file // GPLEX frame file diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y index 71ac393a2..905826d08 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y @@ -168,7 +168,7 @@ %type func_decl_lambda expl_func_decl_lambda %type lambda_type_ref lambda_type_ref_noproctype %type full_lambda_fp_list lambda_simple_fp_sect lambda_function_body lambda_procedure_body optional_full_lambda_fp_list -%type field_in_unnamed_object list_fields_in_unnamed_object func_class_name_ident_list rem_lambda variable_list var_variable_list +%type field_in_unnamed_object list_fields_in_unnamed_object func_class_name_ident_list rem_lambda variable_list var_ident_list %type tkAssignOrEqual %% @@ -2310,18 +2310,22 @@ assignment ($4 as addressed_value_list).source_context = LexLocation.MergeAll(@1,@2,@3,@4,@5); $$ = new assign_tuple($4 as addressed_value_list, $7, @$); } - | tkRoundOpen tkVar variable tkComma var_variable_list tkRoundClose assign_operator expr + | tkRoundOpen tkVar identifier tkComma var_ident_list tkRoundClose assign_operator expr { if ($7.type != Operators.Assignment) parsertools.AddErrorFromResource("ONLY_BASE_ASSIGNMENT_FOR_TUPLE",@6); - ($5 as addressed_value_list).variables.Insert(0,$3 as addressed_value); - ($5 as addressed_value_list).source_context = LexLocation.MergeAll(@1,@2,@3,@4,@5,@6); - $$ = new assign_var_tuple($5 as addressed_value_list, $8, @$); + ($5 as ident_list).idents.Insert(0,$3); + ($5 as ident_list).source_context = LexLocation.MergeAll(@1,@2,@3,@4,@5,@6); + $$ = new assign_var_tuple($5 as ident_list, $8, @$); } -/* | tkVar tkRoundOpen variable tkComma variable_list tkRoundClose assign_operator expr - { - - }*/ + | tkVar tkRoundOpen identifier tkComma ident_list tkRoundClose assign_operator expr + { + if ($7.type != Operators.Assignment) + parsertools.AddErrorFromResource("ONLY_BASE_ASSIGNMENT_FOR_TUPLE",@6); + ($5 as ident_list).idents.Insert(0,$3); + ($5 as ident_list).source_context = LexLocation.MergeAll(@1,@2,@3,@4,@5,@6); + $$ = new assign_var_tuple($5 as ident_list, $8, @$); + } ; variable_list @@ -2337,15 +2341,15 @@ variable_list } ; -var_variable_list - : tkVar variable +var_ident_list + : tkVar identifier { - $$ = new addressed_value_list($2 as addressed_value,@$); + $$ = new ident_list($2,@$); } - | var_variable_list tkComma tkVar variable + | var_ident_list tkComma tkVar identifier { - ($1 as addressed_value_list).Add($4 as addressed_value); - ($1 as addressed_value_list).source_context = LexLocation.MergeAll(@1,@2,@3,@4); + ($1 as ident_list).Add($4); + ($1 as ident_list).source_context = LexLocation.MergeAll(@1,@2,@3,@4); $$ = $1; } ; diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index 89fce9d5d..2894fd239 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -2,7 +2,7 @@ // GPPG version 1.3.6 // Machine: DESKTOP-8EAQPI9 -// DateTime: 31.05.2017 22:24:31 +// DateTime: 01.06.2017 11:45:28 // UserName: ????????? // Input file @@ -73,8 +73,8 @@ public partial class GPPGParser: ShiftReduceParser aliasses; #pragma warning restore 649 - private static Rule[] rules = new Rule[821]; - private static State[] states = new State[1315]; + private static Rule[] rules = new Rule[822]; + private static State[] states = new State[1323]; private static string[] nonTerms = new string[] { "parse_goal", "unit_key_word", "assignment", "optional_array_initializer", "attribute_declarations", "ot_visibility_specifier", "one_attribute", "attribute_variable", @@ -148,17 +148,17 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, tkVar, variable, tkComma, var_variable_list, + case 473: // assignment -> tkRoundOpen, tkVar, identifier, tkComma, var_ident_list, // tkRoundClose, assign_operator, expr { if (ValueStack[ValueStack.Depth-2].op.type != Operators.Assignment) parsertools.AddErrorFromResource("ONLY_BASE_ASSIGNMENT_FOR_TUPLE",LocationStack[LocationStack.Depth-3]); - (ValueStack[ValueStack.Depth-4].ob as addressed_value_list).variables.Insert(0,ValueStack[ValueStack.Depth-6].ex as addressed_value); - (ValueStack[ValueStack.Depth-4].ob as addressed_value_list).source_context = LexLocation.MergeAll(LocationStack[LocationStack.Depth-8],LocationStack[LocationStack.Depth-7],LocationStack[LocationStack.Depth-6],LocationStack[LocationStack.Depth-5],LocationStack[LocationStack.Depth-4],LocationStack[LocationStack.Depth-3]); - CurrentSemanticValue.stn = new assign_var_tuple(ValueStack[ValueStack.Depth-4].ob as addressed_value_list, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); + (ValueStack[ValueStack.Depth-4].ob as ident_list).idents.Insert(0,ValueStack[ValueStack.Depth-6].id); + (ValueStack[ValueStack.Depth-4].ob as ident_list).source_context = LexLocation.MergeAll(LocationStack[LocationStack.Depth-8],LocationStack[LocationStack.Depth-7],LocationStack[LocationStack.Depth-6],LocationStack[LocationStack.Depth-5],LocationStack[LocationStack.Depth-4],LocationStack[LocationStack.Depth-3]); + CurrentSemanticValue.stn = new assign_var_tuple(ValueStack[ValueStack.Depth-4].ob as ident_list, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 474: // variable_list -> variable + case 474: // assignment -> tkVar, tkRoundOpen, identifier, tkComma, ident_list, tkRoundClose, + // assign_operator, expr +{ + if (ValueStack[ValueStack.Depth-2].op.type != Operators.Assignment) + parsertools.AddErrorFromResource("ONLY_BASE_ASSIGNMENT_FOR_TUPLE",LocationStack[LocationStack.Depth-3]); + (ValueStack[ValueStack.Depth-4].stn as ident_list).idents.Insert(0,ValueStack[ValueStack.Depth-6].id); + (ValueStack[ValueStack.Depth-4].stn as ident_list).source_context = LexLocation.MergeAll(LocationStack[LocationStack.Depth-8],LocationStack[LocationStack.Depth-7],LocationStack[LocationStack.Depth-6],LocationStack[LocationStack.Depth-5],LocationStack[LocationStack.Depth-4],LocationStack[LocationStack.Depth-3]); + CurrentSemanticValue.stn = new assign_var_tuple(ValueStack[ValueStack.Depth-4].stn as ident_list, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); + } + break; + case 475: // variable_list -> variable { CurrentSemanticValue.ob = new addressed_value_list(ValueStack[ValueStack.Depth-1].ex as addressed_value,LocationStack[LocationStack.Depth-1]); } break; - case 475: // variable_list -> variable_list, tkComma, variable + case 476: // 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 addressed_value_list).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 476: // var_variable_list -> tkVar, variable + case 477: // var_ident_list -> tkVar, identifier { - CurrentSemanticValue.ob = new addressed_value_list(ValueStack[ValueStack.Depth-1].ex as addressed_value,CurrentLocationSpan); + CurrentSemanticValue.ob = new ident_list(ValueStack[ValueStack.Depth-1].id,CurrentLocationSpan); } break; - case 477: // var_variable_list -> var_variable_list, tkComma, tkVar, variable + case 478: // var_ident_list -> var_ident_list, tkComma, tkVar, identifier { - (ValueStack[ValueStack.Depth-4].ob as addressed_value_list).Add(ValueStack[ValueStack.Depth-1].ex as addressed_value); - (ValueStack[ValueStack.Depth-4].ob as addressed_value_list).source_context = LexLocation.MergeAll(LocationStack[LocationStack.Depth-4],LocationStack[LocationStack.Depth-3],LocationStack[LocationStack.Depth-2],LocationStack[LocationStack.Depth-1]); + (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 478: // proc_call -> var_reference + case 479: // proc_call -> var_reference { CurrentSemanticValue.stn = new procedure_call(ValueStack[ValueStack.Depth-1].ex as addressed_value, CurrentLocationSpan); } break; - case 479: // goto_stmt -> tkGoto, label_name + case 480: // goto_stmt -> tkGoto, label_name { CurrentSemanticValue.stn = new goto_statement(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 480: // compound_stmt -> tkBegin, stmt_list, tkEnd + case 481: // 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; @@ -4389,73 +4408,73 @@ public partial class GPPGParser: ShiftReduceParser stmt + case 482: // stmt_list -> stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, LocationStack[LocationStack.Depth-1]); } break; - case 482: // stmt_list -> stmt_list, tkSemiColon, stmt + case 483: // 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 483: // if_stmt -> tkIf, expr_l1, tkThen, unlabelled_stmt + case 484: // 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 484: // if_stmt -> tkIf, expr_l1, tkThen, unlabelled_stmt, tkElse, unlabelled_stmt + case 485: // 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 485: // case_stmt -> tkCase, expr_l1, tkOf, case_list, else_case, tkEnd + case 486: // 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 486: // case_list -> case_item + case 487: // 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 487: // case_list -> case_list, tkSemiColon, case_item + case 488: // 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 488: // case_item -> /* empty */ + case 489: // case_item -> /* empty */ { CurrentSemanticValue.stn = new empty_statement(); } break; - case 489: // case_item -> case_label_list, tkColon, unlabelled_stmt + case 490: // 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 490: // case_label_list -> case_label + case 491: // case_label_list -> case_label { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 491: // case_label_list -> case_label_list, tkComma, case_label + case 492: // 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 492: // case_label -> const_elem + case 493: // case_label -> const_elem { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 493: // else_case -> /* empty */ + case 494: // else_case -> /* empty */ { CurrentSemanticValue.stn = null;} break; - case 494: // else_case -> tkElse, stmt_list + case 495: // else_case -> tkElse, stmt_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 495: // repeat_stmt -> tkRepeat, stmt_list, tkUntil, expr + case 496: // 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; @@ -4463,23 +4482,23 @@ public partial class GPPGParser: ShiftReduceParser tkWhile, expr_l1, optional_tk_do, unlabelled_stmt + case 497: // 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 497: // optional_tk_do -> tkDo + case 498: // optional_tk_do -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 498: // optional_tk_do -> /* empty */ + case 499: // optional_tk_do -> /* empty */ { CurrentSemanticValue.ti = null; } break; - case 499: // lock_stmt -> tkLock, expr_l1, tkDo, unlabelled_stmt + case 500: // 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 500: // foreach_stmt -> tkForeach, identifier, foreach_stmt_ident_dype_opt, tkIn, + case 501: // 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); @@ -4487,68 +4506,68 @@ public partial class GPPGParser: ShiftReduceParser tkForeach, tkVar, identifier, tkColon, type_ref, tkIn, expr_l1, + case 502: // 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 502: // foreach_stmt -> tkForeach, tkVar, identifier, tkIn, expr_l1, tkDo, + case 503: // 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 503: // foreach_stmt_ident_dype_opt -> tkColon, type_ref + case 504: // foreach_stmt_ident_dype_opt -> tkColon, type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 505: // for_stmt -> tkFor, optional_var, identifier, for_stmt_decl_or_assign, expr_l1, + case 506: // 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 506: // optional_var -> tkVar + case 507: // optional_var -> tkVar { CurrentSemanticValue.ob = true; } break; - case 507: // optional_var -> /* empty */ + case 508: // optional_var -> /* empty */ { CurrentSemanticValue.ob = false; } break; - case 509: // for_stmt_decl_or_assign -> tkColon, simple_type_identifier, tkAssign + case 510: // for_stmt_decl_or_assign -> tkColon, simple_type_identifier, tkAssign { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-2].td; } break; - case 510: // for_cycle_type -> tkTo + case 511: // for_cycle_type -> tkTo { CurrentSemanticValue.ob = for_cycle_type.to; } break; - case 511: // for_cycle_type -> tkDownto + case 512: // for_cycle_type -> tkDownto { CurrentSemanticValue.ob = for_cycle_type.downto; } break; - case 512: // with_stmt -> tkWith, expr_list, tkDo, unlabelled_stmt + case 513: // 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 513: // inherited_message -> tkInherited + case 514: // inherited_message -> tkInherited { CurrentSemanticValue.stn = new inherited_message(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 514: // try_stmt -> tkTry, stmt_list, try_handler + case 515: // 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 515: // try_handler -> tkFinally, stmt_list, tkEnd + case 516: // 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 516: // try_handler -> tkExcept, exception_block, tkEnd + case 517: // 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) @@ -4558,154 +4577,154 @@ public partial class GPPGParser: ShiftReduceParser exception_handler_list, exception_block_else_branch + case 518: // 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 518: // exception_block -> exception_handler_list, tkSemiColon, + case 519: // 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 519: // exception_block -> stmt_list + case 520: // 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 520: // exception_handler_list -> exception_handler + case 521: // exception_handler_list -> exception_handler { CurrentSemanticValue.stn = new exception_handler_list(ValueStack[ValueStack.Depth-1].stn as exception_handler, CurrentLocationSpan); } break; - case 521: // exception_handler_list -> exception_handler_list, tkSemiColon, + case 522: // 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 522: // exception_block_else_branch -> /* empty */ + case 523: // exception_block_else_branch -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 523: // exception_block_else_branch -> tkElse, stmt_list + case 524: // exception_block_else_branch -> tkElse, stmt_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 524: // exception_handler -> tkOn, exception_identifier, tkDo, unlabelled_stmt + case 525: // 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 525: // exception_identifier -> exception_class_type_identifier + case 526: // exception_identifier -> exception_class_type_identifier { CurrentSemanticValue.stn = new exception_ident(null, (named_type_reference)ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 526: // exception_identifier -> exception_variable, tkColon, + case 527: // 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 527: // exception_class_type_identifier -> simple_type_identifier + case 528: // exception_class_type_identifier -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 528: // exception_variable -> identifier + case 529: // exception_variable -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 529: // raise_stmt -> tkRaise + case 530: // raise_stmt -> tkRaise { CurrentSemanticValue.stn = new raise_stmt(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 530: // raise_stmt -> tkRaise, expr + case 531: // raise_stmt -> tkRaise, expr { CurrentSemanticValue.stn = new raise_stmt(ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 531: // expr_list -> expr_with_func_decl_lambda + case 532: // expr_list -> expr_with_func_decl_lambda { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 532: // expr_list -> expr_list, tkComma, expr_with_func_decl_lambda + case 533: // 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 533: // expr_as_stmt -> allowable_expr_as_stmt + case 534: // expr_as_stmt -> allowable_expr_as_stmt { CurrentSemanticValue.stn = new expression_as_statement(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 534: // allowable_expr_as_stmt -> new_expr + case 535: // allowable_expr_as_stmt -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 535: // expr_with_func_decl_lambda -> expr + case 536: // expr_with_func_decl_lambda -> expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 536: // expr_with_func_decl_lambda -> func_decl_lambda + case 537: // expr_with_func_decl_lambda -> func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 537: // expr -> expr_l1 + case 538: // expr -> expr_l1 { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 538: // expr -> format_expr + case 539: // expr -> format_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 539: // expr_l1 -> relop_expr + case 540: // expr_l1 -> relop_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 540: // expr_l1 -> question_expr + case 541: // expr_l1 -> question_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 541: // sizeof_expr -> tkSizeOf, tkRoundOpen, simple_or_template_type_reference, + case 542: // 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 542: // typeof_expr -> tkTypeOf, tkRoundOpen, simple_or_template_type_reference, + case 543: // 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 543: // question_expr -> expr_l1, tkQuestion, expr_l1, tkColon, expr_l1 + case 544: // 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 544: // simple_or_template_type_reference -> simple_type_identifier + case 545: // simple_or_template_type_reference -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 545: // simple_or_template_type_reference -> simple_type_identifier, + case 546: // 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 546: // simple_or_template_type_reference -> simple_type_identifier, tkAmpersend, + case 547: // 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 547: // optional_array_initializer -> tkRoundOpen, typed_const_list, tkRoundClose + case 548: // optional_array_initializer -> tkRoundOpen, typed_const_list, tkRoundClose { CurrentSemanticValue.stn = new array_const((expression_list)ValueStack[ValueStack.Depth-2].stn, CurrentLocationSpan); } break; - case 549: // new_expr -> tkNew, simple_or_template_type_reference, + case 550: // 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 550: // new_expr -> tkNew, array_name_for_new_expr, tkSquareOpen, optional_expr_list, + case 551: // 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; @@ -4721,7 +4740,7 @@ public partial class GPPGParser: ShiftReduceParser tkNew, tkClass, tkRoundOpen, list_fields_in_unnamed_object, + case 552: // new_expr -> tkNew, tkClass, tkRoundOpen, list_fields_in_unnamed_object, // tkRoundClose { // sugared node @@ -4736,12 +4755,12 @@ public partial class GPPGParser: ShiftReduceParser identifier, tkAssign, relop_expr + case 553: // 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 553: // field_in_unnamed_object -> relop_expr + case 554: // field_in_unnamed_object -> relop_expr { ident name = null; var id = ValueStack[ValueStack.Depth-1].ex as ident; @@ -4761,13 +4780,13 @@ public partial class GPPGParser: ShiftReduceParser field_in_unnamed_object + case 555: // 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 555: // list_fields_in_unnamed_object -> list_fields_in_unnamed_object, tkComma, + case 556: // 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; @@ -4778,157 +4797,157 @@ public partial class GPPGParser: ShiftReduceParser simple_type_identifier + case 557: // array_name_for_new_expr -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 557: // array_name_for_new_expr -> unsized_array_type + case 558: // array_name_for_new_expr -> unsized_array_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 558: // optional_expr_list_with_bracket -> /* empty */ + case 559: // optional_expr_list_with_bracket -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 559: // optional_expr_list_with_bracket -> tkRoundOpen, optional_expr_list, + case 560: // optional_expr_list_with_bracket -> tkRoundOpen, optional_expr_list, // tkRoundClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 560: // relop_expr -> simple_expr + case 561: // relop_expr -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 561: // relop_expr -> relop_expr, relop, simple_expr + case 562: // 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 562: // simple_expr_or_nothing -> simple_expr + case 563: // simple_expr_or_nothing -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 563: // simple_expr_or_nothing -> /* empty */ + case 564: // simple_expr_or_nothing -> /* empty */ { CurrentSemanticValue.ex = new int32_const(int.MaxValue); } break; - case 564: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing + case 565: // 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 565: // format_expr -> tkColon, simple_expr_or_nothing + case 566: // format_expr -> tkColon, simple_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(new int32_const(int.MaxValue), ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 566: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing, tkColon, + case 567: // 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 567: // format_expr -> tkColon, simple_expr_or_nothing, tkColon, simple_expr + case 568: // format_expr -> tkColon, simple_expr_or_nothing, tkColon, simple_expr { CurrentSemanticValue.ex = new format_expr(new int32_const(int.MaxValue), ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 568: // relop -> tkEqual + case 569: // relop -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 569: // relop -> tkNotEqual + case 570: // relop -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 570: // relop -> tkLower + case 571: // relop -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 571: // relop -> tkGreater + case 572: // relop -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 572: // relop -> tkLowerEqual + case 573: // relop -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 573: // relop -> tkGreaterEqual + case 574: // relop -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 574: // relop -> tkIn + case 575: // relop -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 575: // simple_expr -> term + case 576: // simple_expr -> term { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 576: // simple_expr -> simple_expr, addop, term + case 577: // 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 577: // addop -> tkPlus + case 578: // addop -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 578: // addop -> tkMinus + case 579: // addop -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 579: // addop -> tkOr + case 580: // addop -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 580: // addop -> tkXor + case 581: // addop -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 581: // addop -> tkCSharpStyleOr + case 582: // addop -> tkCSharpStyleOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 582: // typecast_op -> tkAs + case 583: // typecast_op -> tkAs { CurrentSemanticValue.ob = op_typecast.as_op; } break; - case 583: // typecast_op -> tkIs + case 584: // typecast_op -> tkIs { CurrentSemanticValue.ob = op_typecast.is_op; } break; - case 584: // as_is_expr -> term, typecast_op, simple_or_template_type_reference + case 585: // 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 585: // term -> factor + case 586: // term -> factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 586: // term -> new_expr + case 587: // term -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 587: // term -> term, mulop, factor + case 588: // 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 588: // term -> as_is_expr + case 589: // term -> as_is_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 589: // mulop -> tkStar + case 590: // mulop -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 590: // mulop -> tkSlash + case 591: // mulop -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 591: // mulop -> tkDiv + case 592: // mulop -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 592: // mulop -> tkMod + case 593: // mulop -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 593: // mulop -> tkShl + case 594: // mulop -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 594: // mulop -> tkShr + case 595: // mulop -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 595: // mulop -> tkAnd + case 596: // mulop -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 596: // default_expr -> tkDefault, tkRoundOpen, simple_or_template_type_reference, + case 597: // 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 597: // tuple -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, lambda_type_ref, + case 598: // tuple -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, lambda_type_ref, // optional_full_lambda_fp_list, tkRoundClose { /*if ($5 != null) @@ -4942,112 +4961,112 @@ public partial class GPPGParser: ShiftReduceParser tkNil + case 599: // factor -> tkNil { CurrentSemanticValue.ex = new nil_const(); CurrentSemanticValue.ex.source_context = CurrentLocationSpan; } break; - case 599: // factor -> literal_or_number + case 600: // factor -> literal_or_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 600: // factor -> default_expr + case 601: // factor -> default_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 601: // factor -> tkSquareOpen, elem_list, tkSquareClose + case 602: // factor -> tkSquareOpen, elem_list, tkSquareClose { CurrentSemanticValue.ex = new pascal_set_constant(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 602: // factor -> tkNot, factor + case 603: // factor -> tkNot, factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 603: // factor -> sign, factor + case 604: // factor -> sign, factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 604: // factor -> tkDeref, factor + case 605: // factor -> tkDeref, factor { CurrentSemanticValue.ex = new roof_dereference(ValueStack[ValueStack.Depth-1].ex as addressed_value, CurrentLocationSpan); } break; - case 605: // factor -> var_reference + case 606: // factor -> var_reference { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 606: // factor -> tuple + case 607: // factor -> tuple { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 607: // literal_or_number -> literal + case 608: // literal_or_number -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 608: // literal_or_number -> unsigned_number + case 609: // literal_or_number -> unsigned_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 609: // var_question_point -> variable, tkQuestionPoint, variable + case 610: // 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 610: // var_question_point -> variable, tkQuestionPoint, var_question_point + case 611: // 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 611: // var_reference -> var_address, variable + case 612: // 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 612: // var_reference -> variable + case 613: // var_reference -> variable { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 613: // var_reference -> var_question_point + case 614: // var_reference -> var_question_point { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 614: // var_address -> tkAddressOf + case 615: // var_address -> tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(CurrentLocationSpan); } break; - case 615: // var_address -> var_address, tkAddressOf + case 616: // var_address -> var_address, tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(ValueStack[ValueStack.Depth-2].stn as get_address, CurrentLocationSpan); } break; - case 616: // attribute_variable -> simple_type_identifier, optional_expr_list_with_bracket + case 617: // 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 617: // dotted_identifier -> identifier + case 618: // dotted_identifier -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 618: // dotted_identifier -> dotted_identifier, tkPoint, identifier_or_keyword + case 619: // 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 619: // variable_as_type -> dotted_identifier + case 620: // variable_as_type -> dotted_identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;} break; - case 620: // variable_as_type -> dotted_identifier, template_type_params + case 621: // 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 621: // variable -> identifier + case 622: // variable -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 622: // variable -> operator_name_ident + case 623: // variable -> operator_name_ident { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 623: // variable -> tkInherited, identifier + case 624: // variable -> tkInherited, identifier { CurrentSemanticValue.ex = new inherited_ident(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 624: // variable -> tkRoundOpen, expr, tkRoundClose + case 625: // variable -> tkRoundOpen, expr, tkRoundClose { if (!parsertools.build_tree_for_formatter) { @@ -5057,18 +5076,18 @@ public partial class GPPGParser: ShiftReduceParser sizeof_expr + case 626: // variable -> sizeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 626: // variable -> typeof_expr + case 627: // variable -> typeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 627: // variable -> literal_or_number, tkPoint, identifier_or_keyword + case 628: // 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 628: // variable -> variable, tkSquareOpen, expr_list, tkSquareClose + case 629: // variable -> variable, tkSquareOpen, expr_list, tkSquareClose { var el = ValueStack[ValueStack.Depth-2].stn as expression_list; // SSM 10/03/16 if (el.expressions.Count==1 && el.expressions[0] is format_expr) @@ -5079,502 +5098,502 @@ public partial class GPPGParser: ShiftReduceParser variable, tkQuestionSquareOpen, format_expr, tkSquareClose + case 630: // variable -> variable, tkQuestionSquareOpen, format_expr, tkSquareClose { var fe = ValueStack[ValueStack.Depth-2].ex as format_expr; // SSM 9/01/17 CurrentSemanticValue.ex = new slice_expr_question(ValueStack[ValueStack.Depth-4].ex as addressed_value,fe.expr,fe.format1,fe.format2,CurrentLocationSpan); } break; - case 630: // variable -> variable, tkRoundOpen, optional_expr_list, tkRoundClose + case 631: // 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 631: // variable -> variable, tkPoint, identifier_keyword_operatorname + case 632: // 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 632: // variable -> tuple, tkPoint, identifier_keyword_operatorname + case 633: // 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 633: // variable -> variable, tkDeref + case 634: // variable -> variable, tkDeref { CurrentSemanticValue.ex = new roof_dereference(ValueStack[ValueStack.Depth-2].ex as addressed_value,CurrentLocationSpan); } break; - case 634: // variable -> variable, tkAmpersend, template_type_params + case 635: // 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 635: // optional_expr_list -> expr_list + case 636: // optional_expr_list -> expr_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 636: // optional_expr_list -> /* empty */ + case 637: // optional_expr_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 637: // elem_list -> elem_list1 + case 638: // elem_list -> elem_list1 { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 638: // elem_list -> /* empty */ + case 639: // elem_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 639: // elem_list1 -> elem + case 640: // elem_list1 -> elem { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 640: // elem_list1 -> elem_list1, tkComma, elem + case 641: // 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 641: // elem -> expr + case 642: // elem -> expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 642: // elem -> expr, tkDotDot, expr + case 643: // elem -> expr, tkDotDot, expr { CurrentSemanticValue.ex = new diapason_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 643: // one_literal -> tkStringLiteral + case 644: // one_literal -> tkStringLiteral { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 644: // one_literal -> tkAsciiChar + case 645: // one_literal -> tkAsciiChar { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 645: // literal -> literal_list + case 646: // literal -> literal_list { CurrentSemanticValue.ex = NewLiteral(ValueStack[ValueStack.Depth-1].stn as literal_const_line); } break; - case 646: // literal_list -> one_literal + case 647: // literal_list -> one_literal { CurrentSemanticValue.stn = new literal_const_line(ValueStack[ValueStack.Depth-1].ex as literal, CurrentLocationSpan); } break; - case 647: // literal_list -> literal_list, one_literal + case 648: // 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 648: // operator_name_ident -> tkOperator, overload_operator + case 649: // 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 649: // optional_method_modificators -> tkSemiColon + case 650: // optional_method_modificators -> tkSemiColon { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 650: // optional_method_modificators -> tkSemiColon, meth_modificators, tkSemiColon + case 651: // 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 651: // optional_method_modificators1 -> /* empty */ + case 652: // optional_method_modificators1 -> /* empty */ { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 652: // optional_method_modificators1 -> tkSemiColon, meth_modificators + case 653: // 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 653: // meth_modificators -> meth_modificator + case 654: // meth_modificators -> meth_modificator { CurrentSemanticValue.stn = new procedure_attributes_list(ValueStack[ValueStack.Depth-1].id as procedure_attribute, CurrentLocationSpan); } break; - case 654: // meth_modificators -> meth_modificators, tkSemiColon, meth_modificator + case 655: // 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 655: // identifier -> tkIdentifier + case 656: // identifier -> tkIdentifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 656: // identifier -> property_specifier_directives + case 657: // identifier -> property_specifier_directives { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 657: // identifier -> non_reserved + case 658: // identifier -> non_reserved { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 658: // identifier_or_keyword -> identifier + case 659: // identifier_or_keyword -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 659: // identifier_or_keyword -> keyword + case 660: // identifier_or_keyword -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 660: // identifier_or_keyword -> reserved_keyword + case 661: // identifier_or_keyword -> reserved_keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 661: // identifier_keyword_operatorname -> identifier + case 662: // identifier_keyword_operatorname -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 662: // identifier_keyword_operatorname -> keyword + case 663: // identifier_keyword_operatorname -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 663: // identifier_keyword_operatorname -> operator_name_ident + case 664: // identifier_keyword_operatorname -> operator_name_ident { CurrentSemanticValue.id = (ident)ValueStack[ValueStack.Depth-1].ex; } break; - case 664: // meth_modificator -> tkAbstract + case 665: // meth_modificator -> tkAbstract { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 665: // meth_modificator -> tkOverload + case 666: // 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 666: // meth_modificator -> tkReintroduce + case 667: // meth_modificator -> tkReintroduce { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 667: // meth_modificator -> tkOverride + case 668: // meth_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 668: // meth_modificator -> tkExtensionMethod + case 669: // meth_modificator -> tkExtensionMethod { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 669: // meth_modificator -> tkVirtual + case 670: // meth_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 670: // property_specifier_directives -> tkRead + case 671: // property_specifier_directives -> tkRead { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 671: // property_specifier_directives -> tkWrite + case 672: // property_specifier_directives -> tkWrite { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 672: // non_reserved -> tkName + case 673: // non_reserved -> tkName { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 673: // non_reserved -> tkNew + case 674: // non_reserved -> tkNew { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 674: // visibility_specifier -> tkInternal + case 675: // visibility_specifier -> tkInternal { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 675: // visibility_specifier -> tkPublic + case 676: // visibility_specifier -> tkPublic { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 676: // visibility_specifier -> tkProtected + case 677: // visibility_specifier -> tkProtected { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 677: // visibility_specifier -> tkPrivate + case 678: // visibility_specifier -> tkPrivate { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 678: // keyword -> visibility_specifier + case 679: // keyword -> visibility_specifier { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 679: // keyword -> tkSealed + case 680: // keyword -> tkSealed { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 680: // keyword -> tkTemplate + case 681: // keyword -> tkTemplate { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 681: // keyword -> tkOr + case 682: // keyword -> tkOr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 682: // keyword -> tkTypeOf + case 683: // keyword -> tkTypeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 683: // keyword -> tkSizeOf + case 684: // keyword -> tkSizeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 684: // keyword -> tkDefault + case 685: // keyword -> tkDefault { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 685: // keyword -> tkWhere + case 686: // keyword -> tkWhere { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 686: // keyword -> tkXor + case 687: // keyword -> tkXor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 687: // keyword -> tkAnd + case 688: // keyword -> tkAnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 688: // keyword -> tkDiv + case 689: // keyword -> tkDiv { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 689: // keyword -> tkMod + case 690: // keyword -> tkMod { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 690: // keyword -> tkShl + case 691: // keyword -> tkShl { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 691: // keyword -> tkShr + case 692: // keyword -> tkShr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 692: // keyword -> tkNot + case 693: // keyword -> tkNot { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 693: // keyword -> tkAs + case 694: // keyword -> tkAs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 694: // keyword -> tkIn + case 695: // keyword -> tkIn { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 695: // keyword -> tkIs + case 696: // keyword -> tkIs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 696: // keyword -> tkArray + case 697: // keyword -> tkArray { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 697: // keyword -> tkSequence + case 698: // keyword -> tkSequence { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 698: // keyword -> tkBegin + case 699: // keyword -> tkBegin { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 699: // keyword -> tkCase + case 700: // keyword -> tkCase { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 700: // keyword -> tkClass + case 701: // keyword -> tkClass { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 701: // keyword -> tkConst + case 702: // keyword -> tkConst { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 702: // keyword -> tkConstructor + case 703: // keyword -> tkConstructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 703: // keyword -> tkDestructor + case 704: // keyword -> tkDestructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 704: // keyword -> tkDownto + case 705: // keyword -> tkDownto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 705: // keyword -> tkDo + case 706: // keyword -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 706: // keyword -> tkElse + case 707: // keyword -> tkElse { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 707: // keyword -> tkExcept + case 708: // keyword -> tkExcept { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 708: // keyword -> tkFile + case 709: // keyword -> tkFile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 709: // keyword -> tkAuto + case 710: // keyword -> tkAuto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 710: // keyword -> tkFinalization + case 711: // keyword -> tkFinalization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 711: // keyword -> tkFinally + case 712: // keyword -> tkFinally { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 712: // keyword -> tkFor + case 713: // keyword -> tkFor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 713: // keyword -> tkForeach + case 714: // keyword -> tkForeach { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 714: // keyword -> tkFunction + case 715: // keyword -> tkFunction { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 715: // keyword -> tkIf + case 716: // keyword -> tkIf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 716: // keyword -> tkImplementation + case 717: // keyword -> tkImplementation { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 717: // keyword -> tkInherited + case 718: // keyword -> tkInherited { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 718: // keyword -> tkInitialization + case 719: // keyword -> tkInitialization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 719: // keyword -> tkInterface + case 720: // keyword -> tkInterface { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 720: // keyword -> tkProcedure + case 721: // keyword -> tkProcedure { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 721: // keyword -> tkProperty + case 722: // keyword -> tkProperty { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 722: // keyword -> tkRaise + case 723: // keyword -> tkRaise { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 723: // keyword -> tkRecord + case 724: // keyword -> tkRecord { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 724: // keyword -> tkRepeat + case 725: // keyword -> tkRepeat { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 725: // keyword -> tkSet + case 726: // keyword -> tkSet { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 726: // keyword -> tkTry + case 727: // keyword -> tkTry { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 727: // keyword -> tkType + case 728: // keyword -> tkType { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 728: // keyword -> tkThen + case 729: // keyword -> tkThen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 729: // keyword -> tkTo + case 730: // keyword -> tkTo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 730: // keyword -> tkUntil + case 731: // keyword -> tkUntil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 731: // keyword -> tkUses + case 732: // keyword -> tkUses { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 732: // keyword -> tkVar + case 733: // keyword -> tkVar { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 733: // keyword -> tkWhile + case 734: // keyword -> tkWhile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 734: // keyword -> tkWith + case 735: // keyword -> tkWith { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 735: // keyword -> tkNil + case 736: // keyword -> tkNil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 736: // keyword -> tkGoto + case 737: // keyword -> tkGoto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 737: // keyword -> tkOf + case 738: // keyword -> tkOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 738: // keyword -> tkLabel + case 739: // keyword -> tkLabel { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 739: // keyword -> tkProgram + case 740: // keyword -> tkProgram { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 740: // keyword -> tkUnit + case 741: // keyword -> tkUnit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 741: // keyword -> tkLibrary + case 742: // keyword -> tkLibrary { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 742: // keyword -> tkExternal + case 743: // keyword -> tkExternal { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 743: // keyword -> tkParams + case 744: // keyword -> tkParams { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 744: // keyword -> tkEvent + case 745: // keyword -> tkEvent { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 745: // keyword -> tkYield + case 746: // keyword -> tkYield { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 746: // reserved_keyword -> tkOperator + case 747: // reserved_keyword -> tkOperator { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 747: // reserved_keyword -> tkEnd + case 748: // reserved_keyword -> tkEnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 748: // overload_operator -> tkMinus + case 749: // overload_operator -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 749: // overload_operator -> tkPlus + case 750: // overload_operator -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 750: // overload_operator -> tkSlash + case 751: // overload_operator -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 751: // overload_operator -> tkStar + case 752: // overload_operator -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 752: // overload_operator -> tkEqual + case 753: // overload_operator -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 753: // overload_operator -> tkGreater + case 754: // overload_operator -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 754: // overload_operator -> tkGreaterEqual + case 755: // overload_operator -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 755: // overload_operator -> tkLower + case 756: // overload_operator -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 756: // overload_operator -> tkLowerEqual + case 757: // overload_operator -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 757: // overload_operator -> tkNotEqual + case 758: // overload_operator -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 758: // overload_operator -> tkOr + case 759: // overload_operator -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 759: // overload_operator -> tkXor + case 760: // overload_operator -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 760: // overload_operator -> tkAnd + case 761: // overload_operator -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 761: // overload_operator -> tkDiv + case 762: // overload_operator -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 762: // overload_operator -> tkMod + case 763: // overload_operator -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 763: // overload_operator -> tkShl + case 764: // overload_operator -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 764: // overload_operator -> tkShr + case 765: // overload_operator -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 765: // overload_operator -> tkNot + case 766: // overload_operator -> tkNot { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 766: // overload_operator -> tkIn + case 767: // overload_operator -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 767: // overload_operator -> tkImplicit + case 768: // overload_operator -> tkImplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 768: // overload_operator -> tkExplicit + case 769: // overload_operator -> tkExplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 769: // overload_operator -> assign_operator + case 770: // overload_operator -> assign_operator { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 770: // assign_operator -> tkAssign + case 771: // assign_operator -> tkAssign { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 771: // assign_operator -> tkPlusEqual + case 772: // assign_operator -> tkPlusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 772: // assign_operator -> tkMinusEqual + case 773: // assign_operator -> tkMinusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 773: // assign_operator -> tkMultEqual + case 774: // assign_operator -> tkMultEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 774: // assign_operator -> tkDivEqual + case 775: // assign_operator -> tkDivEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 775: // func_decl_lambda -> identifier, tkArrow, lambda_function_body + case 776: // 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(), null), 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(), null), ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 776: // func_decl_lambda -> tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, + case 777: // 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 777: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkRoundClose, + case 778: // 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]); @@ -5583,7 +5602,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, + case 779: // func_decl_lambda -> tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, // tkRoundClose, lambda_type_ref_noproctype, tkArrow, // lambda_function_body { @@ -5594,7 +5613,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, + case 780: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, // full_lambda_fp_list, tkRoundClose, // lambda_type_ref_noproctype, tkArrow, lambda_function_body { @@ -5606,7 +5625,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, expr_l1, tkComma, expr_l1_list, + case 781: // func_decl_lambda -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, // lambda_type_ref, optional_full_lambda_fp_list, // tkRoundClose, rem_lambda { @@ -5668,61 +5687,61 @@ public partial class GPPGParser: ShiftReduceParser expl_func_decl_lambda + case 782: // func_decl_lambda -> expl_func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 782: // optional_full_lambda_fp_list -> /* empty */ + case 783: // optional_full_lambda_fp_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 783: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list + case 784: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 784: // rem_lambda -> lambda_type_ref_noproctype, tkArrow, lambda_function_body + case 785: // 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 785: // expl_func_decl_lambda -> tkFunction, lambda_type_ref, tkArrow, + case 786: // 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 786: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, tkRoundClose, lambda_type_ref, + case 787: // 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 787: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, + case 788: // 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 788: // expl_func_decl_lambda -> tkProcedure, tkArrow, lambda_procedure_body + case 789: // 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 789: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, tkRoundClose, tkArrow, + case 790: // 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 790: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, full_lambda_fp_list, + case 791: // 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 791: // full_lambda_fp_list -> lambda_simple_fp_sect + case 792: // 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) @@ -5742,147 +5761,147 @@ public partial class GPPGParser: ShiftReduceParser full_lambda_fp_list, tkSemiColon, lambda_simple_fp_sect + case 793: // 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 793: // lambda_simple_fp_sect -> ident_list, lambda_type_ref + case 794: // 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 794: // lambda_type_ref -> /* empty */ + case 795: // lambda_type_ref -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 795: // lambda_type_ref -> tkColon, fptype + case 796: // lambda_type_ref -> tkColon, fptype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 796: // lambda_type_ref_noproctype -> /* empty */ + case 797: // lambda_type_ref_noproctype -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 797: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype + case 798: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 798: // lambda_function_body -> expr_l1 + case 799: // lambda_function_body -> expr_l1 { CurrentSemanticValue.stn = NewLambdaBody(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 799: // lambda_function_body -> compound_stmt + case 800: // lambda_function_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 800: // lambda_function_body -> if_stmt + case 801: // lambda_function_body -> if_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 801: // lambda_function_body -> while_stmt + case 802: // lambda_function_body -> while_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 802: // lambda_function_body -> repeat_stmt + case 803: // lambda_function_body -> repeat_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 803: // lambda_function_body -> for_stmt + case 804: // lambda_function_body -> for_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 804: // lambda_function_body -> foreach_stmt + case 805: // lambda_function_body -> foreach_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 805: // lambda_function_body -> case_stmt + case 806: // lambda_function_body -> case_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 806: // lambda_function_body -> try_stmt + case 807: // lambda_function_body -> try_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 807: // lambda_function_body -> lock_stmt + case 808: // lambda_function_body -> lock_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 808: // lambda_function_body -> yield_stmt + case 809: // lambda_function_body -> yield_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 809: // lambda_procedure_body -> proc_call + case 810: // lambda_procedure_body -> proc_call { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 810: // lambda_procedure_body -> compound_stmt + case 811: // lambda_procedure_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 811: // lambda_procedure_body -> if_stmt + case 812: // lambda_procedure_body -> if_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 812: // lambda_procedure_body -> while_stmt + case 813: // lambda_procedure_body -> while_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 813: // lambda_procedure_body -> repeat_stmt + case 814: // lambda_procedure_body -> repeat_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 814: // lambda_procedure_body -> for_stmt + case 815: // lambda_procedure_body -> for_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 815: // lambda_procedure_body -> foreach_stmt + case 816: // lambda_procedure_body -> foreach_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 816: // lambda_procedure_body -> case_stmt + case 817: // lambda_procedure_body -> case_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 817: // lambda_procedure_body -> try_stmt + case 818: // lambda_procedure_body -> try_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 818: // lambda_procedure_body -> lock_stmt + case 819: // lambda_procedure_body -> lock_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 819: // lambda_procedure_body -> yield_stmt + case 820: // lambda_procedure_body -> yield_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 820: // lambda_procedure_body -> assignment + case 821: // 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 609f0cd47..17bf8c5c5 100644 --- a/Parsers/PascalABCParserNewSaushkin/PABC.ymc +++ b/Parsers/PascalABCParserNewSaushkin/PABC.ymc @@ -168,5 +168,6 @@ script= + diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index d8fdba39f..1c040d932 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.2.0.1457' +!define VERSION '3.2.0.1463' diff --git a/SyntaxTree/tree/HierarchyVisitor.cs b/SyntaxTree/tree/HierarchyVisitor.cs index 0318a0977..02e819676 100644 --- a/SyntaxTree/tree/HierarchyVisitor.cs +++ b/SyntaxTree/tree/HierarchyVisitor.cs @@ -3629,6 +3629,8 @@ namespace PascalABCCompiler.SyntaxTree { DefaultVisit(_assign_var_tuple); pre_do_visit(_assign_var_tuple); + visit(assign_var_tuple.idents); + visit(assign_var_tuple.expr); post_do_visit(_assign_var_tuple); } diff --git a/SyntaxTree/tree/SyntaxTreeStreamReader.cs b/SyntaxTree/tree/SyntaxTreeStreamReader.cs index 5317103d0..7968091a4 100644 --- a/SyntaxTree/tree/SyntaxTreeStreamReader.cs +++ b/SyntaxTree/tree/SyntaxTreeStreamReader.cs @@ -3836,7 +3836,9 @@ namespace PascalABCCompiler.SyntaxTree public void read_assign_var_tuple(assign_var_tuple _assign_var_tuple) { - read_assign_tuple(_assign_var_tuple); + read_statement(_assign_var_tuple); + _assign_var_tuple.idents = _read_node() as ident_list; + _assign_var_tuple.expr = _read_node() as expression; } diff --git a/SyntaxTree/tree/SyntaxTreeStreamWriter.cs b/SyntaxTree/tree/SyntaxTreeStreamWriter.cs index 56dec6994..66b4eab22 100644 --- a/SyntaxTree/tree/SyntaxTreeStreamWriter.cs +++ b/SyntaxTree/tree/SyntaxTreeStreamWriter.cs @@ -5988,7 +5988,25 @@ namespace PascalABCCompiler.SyntaxTree public void write_assign_var_tuple(assign_var_tuple _assign_var_tuple) { - write_assign_tuple(_assign_var_tuple); + write_statement(_assign_var_tuple); + if (_assign_var_tuple.idents == null) + { + bw.Write((byte)0); + } + else + { + bw.Write((byte)1); + _assign_var_tuple.idents.visit(this); + } + if (_assign_var_tuple.expr == null) + { + bw.Write((byte)0); + } + else + { + bw.Write((byte)1); + _assign_var_tuple.expr.visit(this); + } } diff --git a/SyntaxTree/tree/Tree.cs b/SyntaxTree/tree/Tree.cs index 77e96ece7..26a80d1c5 100644 --- a/SyntaxTree/tree/Tree.cs +++ b/SyntaxTree/tree/Tree.cs @@ -44109,7 +44109,7 @@ namespace PascalABCCompiler.SyntaxTree /// /// [Serializable] - public partial class assign_var_tuple : assign_tuple + public partial class assign_var_tuple : statement { /// @@ -44120,13 +44120,12 @@ namespace PascalABCCompiler.SyntaxTree } - /// ///Конструктор с параметрами. /// - public assign_var_tuple(addressed_value_list _vars,expression _expr) + public assign_var_tuple(ident_list _idents,expression _expr) { - this._vars=_vars; + this._idents=_idents; this._expr=_expr; FillParentsInDirectChilds(); } @@ -44134,13 +44133,47 @@ namespace PascalABCCompiler.SyntaxTree /// ///Конструктор с параметрами. /// - public assign_var_tuple(addressed_value_list _vars,expression _expr,SourceContext sc) + public assign_var_tuple(ident_list _idents,expression _expr,SourceContext sc) { - this._vars=_vars; + this._idents=_idents; this._expr=_expr; source_context = sc; FillParentsInDirectChilds(); } + protected ident_list _idents; + protected expression _expr; + + /// + /// + /// + public ident_list idents + { + get + { + return _idents; + } + set + { + _idents=value; + } + } + + /// + /// + /// + public expression expr + { + get + { + return _expr; + } + set + { + _expr=value; + } + } + + /// Создает копию узла public override syntax_tree_node Clone() { @@ -44153,10 +44186,10 @@ namespace PascalABCCompiler.SyntaxTree copy.attributes = (attribute_list)attributes.Clone(); copy.attributes.Parent = copy; } - if (vars != null) + if (idents != null) { - copy.vars = (addressed_value_list)vars.Clone(); - copy.vars.Parent = copy; + copy.idents = (ident_list)idents.Clone(); + copy.idents.Parent = copy; } if (expr != null) { @@ -44177,8 +44210,8 @@ namespace PascalABCCompiler.SyntaxTree { if (attributes != null) attributes.Parent = this; - if (vars != null) - vars.Parent = this; + if (idents != null) + idents.Parent = this; if (expr != null) expr.Parent = this; } @@ -44188,7 +44221,7 @@ namespace PascalABCCompiler.SyntaxTree { FillParentsInDirectChilds(); attributes?.FillParentsInAllChilds(); - vars?.FillParentsInAllChilds(); + idents?.FillParentsInAllChilds(); expr?.FillParentsInAllChilds(); } @@ -44224,7 +44257,7 @@ namespace PascalABCCompiler.SyntaxTree switch(ind) { case 0: - return vars; + return idents; case 1: return expr; } @@ -44237,7 +44270,7 @@ namespace PascalABCCompiler.SyntaxTree switch(ind) { case 0: - vars = (addressed_value_list)value; + idents = (ident_list)value; break; case 1: expr = (expression)value; diff --git a/SyntaxTree/tree/tree.xml b/SyntaxTree/tree/tree.xml index a3a3e2d29..83f67d560 100644 --- a/SyntaxTree/tree/tree.xml +++ b/SyntaxTree/tree/tree.xml @@ -2790,8 +2790,11 @@ - - + + + + + @@ -2990,6 +2993,8 @@ + + diff --git a/SyntaxVisitors/SugarVisitors/AssignTuplesDesugarVisitor.cs b/SyntaxVisitors/SugarVisitors/AssignTuplesDesugarVisitor.cs index 5e16aa2fb..a728c9da3 100644 --- a/SyntaxVisitors/SugarVisitors/AssignTuplesDesugarVisitor.cs +++ b/SyntaxVisitors/SugarVisitors/AssignTuplesDesugarVisitor.cs @@ -28,7 +28,7 @@ namespace SyntaxVisitors.SugarVisitors { // тут возможно ошибка более глубокая - в semantic_check_sugared_statement_node(asstup) возможно остаются во вложенных лямбдах другие assign_tuple var sl = new statement_list(); - sl.Add(new semantic_check_sugared_statement_node(typeof(assign_tuple), new List { asstup.vars, asstup.expr })); // Это нужно для проверок на этапе преобразования в семантику + sl.Add(new semantic_check_sugared_statement_node(typeof(assign_tuple), new List { asstup.vars, asstup.expr }, asstup.source_context)); // Это нужно для проверок на этапе преобразования в семантику var tname = "#temp_var" + UniqueNumStr(); var tt = new var_statement(new ident(tname), asstup.expr); @@ -51,18 +51,18 @@ namespace SyntaxVisitors.SugarVisitors public override void visit(assign_var_tuple assvartup) { var sl = new List(); - sl.Add(new semantic_check_sugared_statement_node(typeof(assign_tuple), new List { assvartup.vars, assvartup.expr })); // Это нужно для проверок на этапе преобразования в семантику + sl.Add(new semantic_check_sugared_statement_node(typeof(assign_var_tuple), new List { assvartup.idents, assvartup.expr }, assvartup.source_context)); // Это нужно для проверок на этапе преобразования в семантику var tname = "#temp_var" + UniqueNumStr(); var tt = new var_statement(new ident(tname), assvartup.expr); // тут для assvartup.expr внутри повторно вызывается convert_strong, это плохо, но если там лямбда, то иначе - с semantic_addr_value - не работает!!! sl.Add(tt); // он же помещается в новое синтаксическое дерево - var n = assvartup.vars.variables.Count(); + var n = assvartup.idents.idents.Count(); for (var i = 0; i < n; i++) { - var a = new var_statement(assvartup.vars.variables[i] as ident, + var a = new var_statement(assvartup.idents.idents[i], new dot_node(new ident(tname), new ident("Item" + (i + 1).ToString())), - assvartup.vars.variables[i].source_context); + assvartup.idents.idents[i].source_context); sl.Add(a); } ReplaceStatementUsingParent(assvartup, sl); diff --git a/TestSuite/CompilationSamples/PABCSystem.pas b/TestSuite/CompilationSamples/PABCSystem.pas index 8385da5e7..d9a4fbaee 100644 --- a/TestSuite/CompilationSamples/PABCSystem.pas +++ b/TestSuite/CompilationSamples/PABCSystem.pas @@ -1087,6 +1087,8 @@ function ArcTan(x: real): real; function Exp(x: real): real; /// Возвращает натуральный логарифм числа x function Ln(x: real): real; +/// Возвращает натуральный логарифм числа x +function Log(x: real): real; /// Возвращает логарифм числа x по основанию 2 function Log2(x: real): real; /// Возвращает десятичный логарифм числа x @@ -1231,6 +1233,8 @@ function Cos(c: Complex): Complex; /// Возвращает экспоненту комплексного числа function Exp(c: Complex): Complex; /// Возвращает натуральный логарифм комплексного числа +function Ln(c: Complex): Complex; +/// Возвращает натуральный логарифм комплексного числа function Log(c: Complex): Complex; /// Возвращает десятичный логарифм комплексного числа function Log10(c: Complex): Complex; @@ -6573,10 +6577,7 @@ begin System.Diagnostics.Process.Start(filename) end; -procedure Execute(filename: string; args: string); -begin - System.Diagnostics.Process.Start(filename, args) -end; +procedure Execute(filename: string; args: string) := System.Diagnostics.Process.Start(filename, args); // ----------------------------------------------------- // EnumerateFiles, EnumerateDirectories @@ -6734,130 +6735,57 @@ begin Result := Math.Abs(x); end; -function Sin(x: real): real; -begin - Result := Math.Sin(x); -end; +function Sin(x: real) := Math.Sin(x); -function Sinh(x: real): real; -begin - Result := Math.Sinh(x); -end; +function Sinh(x: real) := Math.Sinh(x); -function Cos(x: real): real; -begin - Result := Math.Cos(x); -end; +function Cos(x: real) := Math.Cos(x); -function Cosh(x: real): real; -begin - Result := Math.Cosh(x); -end; +function Cosh(x: real) := Math.Cosh(x); -function Tan(x: real): real; -begin - Result := Math.Tan(x); -end; +function Tan(x: real) := Math.Tan(x); -function Tanh(x: real): real; -begin - Result := Math.Tanh(x); -end; +function Tanh(x: real) := Math.Tanh(x); -function ArcSin(x: real): real; -begin - Result := Math.Asin(x); -end; +function ArcSin(x: real) := Math.Asin(x); -function ArcCos(x: real): real; -begin - Result := Math.Acos(x); -end; +function ArcCos(x: real) := Math.Acos(x); -function ArcTan(x: real): real; -begin - Result := Math.Atan(x); -end; +function ArcTan(x: real) := Math.Atan(x); -function Exp(x: real): real; -begin - Result := Math.Exp(x); -end; +function Exp(x: real) := Math.Exp(x); -function Ln(x: real): real; -begin - Result := Math.Log(x); -end; +function Ln(x: real) := Math.Log(x); -function Log2(x: real): real; -begin - Result := LogN(2, x); -end; +function Log(x: real) := Math.Log(x); -function Log10(x: real): real; -begin - Result := Math.Log10(x); -end; +function Log2(x: real) := LogN(2, x); -function LogN(base, x: real): real; -begin - Result := Math.Log(x) / Math.Log(base); -end; +function Log10(x: real) := Math.Log10(x); -function Sqrt(x: real): real; -begin - Result := Math.Sqrt(x); -end; +function LogN(base, x: real) := Math.Log(x) / Math.Log(base); -function Sqr(x: integer): int64; -begin - Result := x * x; -end; +function Sqrt(x: real) := Math.Sqrt(x); -function Sqr(x: shortint): integer; -begin - Result := x * x; -end; +function Sqr(x: integer): int64 := x * x; -function Sqr(x: smallint): integer; -begin - Result := x * x; -end; +function Sqr(x: shortint): integer := x * x; -function Sqr(x: BigInteger): BigInteger; -begin - Result := x * x; -end; +function Sqr(x: smallint): integer := x * x; -function Sqr(x: longword): uint64; -begin - Result := x * x; -end; +function Sqr(x: BigInteger): BigInteger := x * x; -function Sqr(x: int64): int64; -begin - Result := x * x; -end; +function Sqr(x: longword): uint64 := x * x; -function Sqr(x: uint64): uint64; -begin - Result := x * x; -end; +function Sqr(x: int64): int64 := x * x; -function Sqr(x: real): real; -begin - Result := x * x; -end; +function Sqr(x: uint64): uint64 := x * x; -function Power(x, y: real): real; -begin - Result := Math.Pow(x, y); -end; +function Sqr(x: real): real := x * x; -function Power(x, y: integer): real; -begin - Result := Math.Pow(x, y); -end; +function Power(x, y: real): real := Math.Pow(x, y); + +function Power(x, y: integer): real := Math.Pow(x, y); function Power(x: BigInteger; y: integer): BigInteger; begin @@ -7104,6 +7032,8 @@ function Exp(c: Complex) := Complex.Exp(c); function Log(c: Complex) := Complex.Log(c); +function Ln(c: Complex) := Complex.Log(c); + function Log10(c: Complex) := Complex.Log10(c); function Power(c,power: Complex) := Complex.Pow(c,power); diff --git a/TestSuite/CompilationSamples/TupleAssign.pas b/TestSuite/CompilationSamples/TupleAssign.pas new file mode 100644 index 000000000..b6fdcb3c8 --- /dev/null +++ b/TestSuite/CompilationSamples/TupleAssign.pas @@ -0,0 +1,4 @@ +begin + var a,b: integer; + (a, b) := (1,1); +end. \ No newline at end of file diff --git a/TestSuite/TupleVar2Assign.pas b/TestSuite/TupleVar2Assign.pas new file mode 100644 index 000000000..704f6e79a --- /dev/null +++ b/TestSuite/TupleVar2Assign.pas @@ -0,0 +1,5 @@ +begin + var (a, b) := (1,1); + assert((a=1) and (b=1)); + assert((a,b) = (1,1)); +end. \ No newline at end of file diff --git a/TreeConverter/TreeConversion/semantic_checks_for_sugar.cs b/TreeConverter/TreeConversion/semantic_checks_for_sugar.cs index 4bebe90fb..d7381f8be 100644 --- a/TreeConverter/TreeConversion/semantic_checks_for_sugar.cs +++ b/TreeConverter/TreeConversion/semantic_checks_for_sugar.cs @@ -10,7 +10,7 @@ namespace PascalABCCompiler.TreeConverter { public partial class syntax_tree_visitor { - public void semantic_check_assign_tuple(addressed_value_list vars, expression ex) // подходит и для assign_var_tuple + public void semantic_check_assign_tuple(addressed_value_list vars, expression ex) { // Проверить, что справа - Tuple var expr = convert_strong(ex); @@ -28,6 +28,24 @@ namespace PascalABCCompiler.TreeConverter AddError(get_location(vars), "TOO_MANY_ELEMENTS_ON_LEFT_SIDE_OF_TUPLE_ASSIGNMRNT"); } + public void semantic_check_assign_var_tuple(ident_list vars, expression ex) + { + // Проверить, что справа - Tuple + var expr = convert_strong(ex); + expr = convert_if_typed_expression_to_function_call(expr); + + var t = ConvertSemanticTypeNodeToNETType(expr.type); + if (t == null) + AddError(expr.location, "TUPLE_EXPECTED"); + + if (!t.FullName.StartsWith("System.Tuple")) + AddError(expr.location, "TUPLE_EXPECTED"); + + var n = vars.idents.Count(); + if (n > t.GetGenericArguments().Count()) + AddError(get_location(vars), "TOO_MANY_ELEMENTS_ON_LEFT_SIDE_OF_TUPLE_ASSIGNMRNT"); + } + void semantic_check_method_call_as_slice_expr(SyntaxTree.method_call mc) // нельзя проверять сахарный узел, т.к.могут быть вложенные сахарные expression!! { diff --git a/TreeConverter/TreeConversion/syntax_tree_visitor.cs b/TreeConverter/TreeConversion/syntax_tree_visitor.cs index 3f9d929c4..6e12bed78 100644 --- a/TreeConverter/TreeConversion/syntax_tree_visitor.cs +++ b/TreeConverter/TreeConversion/syntax_tree_visitor.cs @@ -19385,11 +19385,17 @@ namespace PascalABCCompiler.TreeConverter { var vars = st.lst[0] as SyntaxTree.addressed_value_list; var expr = st.lst[1] as SyntaxTree.expression; - semantic_check_assign_tuple(vars,expr); + semantic_check_assign_tuple(vars, expr); } - else + else if (st.typ as System.Type == typeof(SyntaxTree.assign_var_tuple)) { - AddError(get_location(st), "MISSED_SEMANTIC_CHECK_FOR_SUGARED_NODE_{0}", st.GetType().Name); + var idents = st.lst[0] as SyntaxTree.ident_list; + var expr = st.lst[1] as SyntaxTree.expression; + semantic_check_assign_var_tuple(idents, expr); + } + else + { + AddError(get_location(st), "MISSED_SEMANTIC_CHECK_FOR_SUGARED_NODE_{0}", (st.typ as System.Type)?.Name??"Unknown"); } ret.reset(); // обязательно очистить - этот узел в семантику ничего не должен приносить! } diff --git a/bin/Lib/PABCRtl.dll b/bin/Lib/PABCRtl.dll index cac26c5a1..572f3e13d 100644 Binary files a/bin/Lib/PABCRtl.dll and b/bin/Lib/PABCRtl.dll differ diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index 8385da5e7..d9a4fbaee 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -1087,6 +1087,8 @@ function ArcTan(x: real): real; function Exp(x: real): real; /// Возвращает натуральный логарифм числа x function Ln(x: real): real; +/// Возвращает натуральный логарифм числа x +function Log(x: real): real; /// Возвращает логарифм числа x по основанию 2 function Log2(x: real): real; /// Возвращает десятичный логарифм числа x @@ -1231,6 +1233,8 @@ function Cos(c: Complex): Complex; /// Возвращает экспоненту комплексного числа function Exp(c: Complex): Complex; /// Возвращает натуральный логарифм комплексного числа +function Ln(c: Complex): Complex; +/// Возвращает натуральный логарифм комплексного числа function Log(c: Complex): Complex; /// Возвращает десятичный логарифм комплексного числа function Log10(c: Complex): Complex; @@ -6573,10 +6577,7 @@ begin System.Diagnostics.Process.Start(filename) end; -procedure Execute(filename: string; args: string); -begin - System.Diagnostics.Process.Start(filename, args) -end; +procedure Execute(filename: string; args: string) := System.Diagnostics.Process.Start(filename, args); // ----------------------------------------------------- // EnumerateFiles, EnumerateDirectories @@ -6734,130 +6735,57 @@ begin Result := Math.Abs(x); end; -function Sin(x: real): real; -begin - Result := Math.Sin(x); -end; +function Sin(x: real) := Math.Sin(x); -function Sinh(x: real): real; -begin - Result := Math.Sinh(x); -end; +function Sinh(x: real) := Math.Sinh(x); -function Cos(x: real): real; -begin - Result := Math.Cos(x); -end; +function Cos(x: real) := Math.Cos(x); -function Cosh(x: real): real; -begin - Result := Math.Cosh(x); -end; +function Cosh(x: real) := Math.Cosh(x); -function Tan(x: real): real; -begin - Result := Math.Tan(x); -end; +function Tan(x: real) := Math.Tan(x); -function Tanh(x: real): real; -begin - Result := Math.Tanh(x); -end; +function Tanh(x: real) := Math.Tanh(x); -function ArcSin(x: real): real; -begin - Result := Math.Asin(x); -end; +function ArcSin(x: real) := Math.Asin(x); -function ArcCos(x: real): real; -begin - Result := Math.Acos(x); -end; +function ArcCos(x: real) := Math.Acos(x); -function ArcTan(x: real): real; -begin - Result := Math.Atan(x); -end; +function ArcTan(x: real) := Math.Atan(x); -function Exp(x: real): real; -begin - Result := Math.Exp(x); -end; +function Exp(x: real) := Math.Exp(x); -function Ln(x: real): real; -begin - Result := Math.Log(x); -end; +function Ln(x: real) := Math.Log(x); -function Log2(x: real): real; -begin - Result := LogN(2, x); -end; +function Log(x: real) := Math.Log(x); -function Log10(x: real): real; -begin - Result := Math.Log10(x); -end; +function Log2(x: real) := LogN(2, x); -function LogN(base, x: real): real; -begin - Result := Math.Log(x) / Math.Log(base); -end; +function Log10(x: real) := Math.Log10(x); -function Sqrt(x: real): real; -begin - Result := Math.Sqrt(x); -end; +function LogN(base, x: real) := Math.Log(x) / Math.Log(base); -function Sqr(x: integer): int64; -begin - Result := x * x; -end; +function Sqrt(x: real) := Math.Sqrt(x); -function Sqr(x: shortint): integer; -begin - Result := x * x; -end; +function Sqr(x: integer): int64 := x * x; -function Sqr(x: smallint): integer; -begin - Result := x * x; -end; +function Sqr(x: shortint): integer := x * x; -function Sqr(x: BigInteger): BigInteger; -begin - Result := x * x; -end; +function Sqr(x: smallint): integer := x * x; -function Sqr(x: longword): uint64; -begin - Result := x * x; -end; +function Sqr(x: BigInteger): BigInteger := x * x; -function Sqr(x: int64): int64; -begin - Result := x * x; -end; +function Sqr(x: longword): uint64 := x * x; -function Sqr(x: uint64): uint64; -begin - Result := x * x; -end; +function Sqr(x: int64): int64 := x * x; -function Sqr(x: real): real; -begin - Result := x * x; -end; +function Sqr(x: uint64): uint64 := x * x; -function Power(x, y: real): real; -begin - Result := Math.Pow(x, y); -end; +function Sqr(x: real): real := x * x; -function Power(x, y: integer): real; -begin - Result := Math.Pow(x, y); -end; +function Power(x, y: real): real := Math.Pow(x, y); + +function Power(x, y: integer): real := Math.Pow(x, y); function Power(x: BigInteger; y: integer): BigInteger; begin @@ -7104,6 +7032,8 @@ function Exp(c: Complex) := Complex.Exp(c); function Log(c: Complex) := Complex.Log(c); +function Ln(c: Complex) := Complex.Log(c); + function Log10(c: Complex) := Complex.Log10(c); function Power(c,power: Complex) := Complex.Pow(c,power); diff --git a/bin/PascalABCNET.chm b/bin/PascalABCNET.chm index 881c09021..e4fe9606b 100644 Binary files a/bin/PascalABCNET.chm and b/bin/PascalABCNET.chm differ