From c77b124cceec406ff16f4f5e8ce2c7015059c393 Mon Sep 17 00:00:00 2001 From: Mikhalkovich Stanislav Date: Sat, 27 Feb 2021 23:44:07 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=B5=D1=80=D1=81=D0=B8=D1=8F=20=D1=81?= =?UTF-8?q?=20=D0=BD=D0=B5=D0=B2=D0=B5=D1=80=D0=BD=D0=BE=20=D1=84=D0=BE?= =?UTF-8?q?=D1=80=D0=BC=D0=B0=D1=82=D0=B8=D1=80=D1=83=D1=8E=D1=89=D0=B8?= =?UTF-8?q?=D0=BC=D1=81=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## {asg} uses School; procedure p := Print(1); p; Код с ### пока без процедур и функций --- CodeCompletion/CodeFormatter.cs | 5 +- Configuration/GlobalAssemblyInfo.cs | 2 +- Configuration/Version.defs | 2 +- Localization/DefaultLang.resources | Bin 96480 -> 96763 bytes .../PascalABCParserNewSaushkin/ABCPascal.cs | 2 +- .../PascalABCParserNewSaushkin/ABCPascal.y | 67 +- .../ABCPascalYacc.cs | 7336 +++++++++-------- Parsers/PascalABCParserNewSaushkin/PABC.tags | 1 - Parsers/PascalABCParserNewSaushkin/PABC.ymc | 2 + Release/pabcversion.txt | 2 +- ReleaseGenerators/PascalABCNET_version.nsh | 2 +- .../SugarVisitors/SliceDesugarVisitor.cs | 6 +- TestSuite/CompilationSamples/PABCSystem.pas | 4 +- TestSuite/CompilationSamples/SF.pas | 18 +- TestSuite/TestMultiSlices_1.pas | 2 +- .../semantic_checks_for_sugar.cs | 94 +- bin/Lib/PABCSystem.pas | 4 +- bin/Lib/SF.pas | 18 +- bin/Lng/Eng/SemanticErrors_ms.dat | 4 +- bin/Lng/Rus/SemanticErrors_ms.dat | 4 +- 20 files changed, 3869 insertions(+), 3706 deletions(-) diff --git a/CodeCompletion/CodeFormatter.cs b/CodeCompletion/CodeFormatter.cs index 25c239675..b209b2995 100644 --- a/CodeCompletion/CodeFormatter.cs +++ b/CodeCompletion/CodeFormatter.cs @@ -1679,13 +1679,14 @@ namespace CodeFormatters public override void visit(program_module _program_module) { + // Где-то хранить и добавить ## if (_program_module.program_name != null) visit_node(_program_module.program_name); if (_program_module.used_units != null && _program_module.used_units.source_context != null) { - if (_program_module.program_block != null && _program_module.program_block.program_code.left_logical_bracket.text.StartsWith("##")) + /*if (_program_module.program_block != null && _program_module.program_block.program_code.left_logical_bracket.text.StartsWith("##")) ; - else visit_node(_program_module.used_units); + else*/ visit_node(_program_module.used_units); } if (_program_module.program_block != null) visit_node(_program_module.program_block); diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 73b153c7a..f20904081 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "7"; public const string Build = "2"; - public const string Revision = "2830"; + public const string Revision = "2838"; 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 a207685fc..0d5961fd2 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %COREVERSION%=2 -%REVISION%=2830 +%REVISION%=2838 %MINOR%=7 %MAJOR%=3 diff --git a/Localization/DefaultLang.resources b/Localization/DefaultLang.resources index 1629304fc47e4f7644a5a907970fcb66931388dc..746ddc23d1f74dfb4c9b6584786ccba354bd2650 100644 GIT binary patch delta 300 zcmZ9HO-chX6o5hKMsVfAmGCao#k3PKIFr%&0bS)BUG)lr2T}0=E(P%rAx>)Uye&?zZ+S|ugrF--|8XvU(1M|mDyadLT1 zrX`8TFBV^0)!ANw>(ru$8l7J)Z4VyJra`F9H?#r5EwzSLIHx7bgMC(|6O!}ngby;x z{(M0<|K}@Cvnq-Cgm7|Eg^Ds8Lh^{6ji1rzPvyMCZ3IftMuWDsYFrq0`cN_WMd&nd mHt;Byq85Gw4w~JW_7FO;_$?0KsCW4CVfE&b9X~X8A5T9L^R_Dh delta 20 ecmV+v0PFwz^9A7X1(4tZ{CBb9^{=z?u?fhDY7Gql diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index 1ef4263ad..4bdffb0d4 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs @@ -2,7 +2,7 @@ // This CSharp output file generated by Gardens Point LEX // Version: 1.1.3.301 // Machine: DESKTOP-G8V08V4 -// DateTime: 24.02.2021 14:31:41 +// DateTime: 27.02.2021 21:02:16 // UserName: ????????? // GPLEX input file // GPLEX frame file diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y index 8f3efa29a..00d87a4a4 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y @@ -70,6 +70,7 @@ %type case_stmt %type case_list %type program_decl_sect_list int_decl_sect_list1 inclass_decl_sect_list1 interface_decl_sect_list decl_sect_list decl_sect_list1 inclass_decl_sect_list +%type decl_sect_list_proc_func_only %type field_or_const_definition abc_decl_sect decl_sect int_decl_sect type_decl simple_type_decl simple_field_or_const_definition res_str_decl_sect %type method_decl_withattr method_or_property_decl property_definition fp_sect %type default_expr tuple @@ -159,7 +160,7 @@ %type template_param_list template_empty_param_list template_type_params template_type_empty_params %type template_type %type try_stmt -%type uses_clause used_units_list +%type uses_clause used_units_list uses_clause_one uses_clause_one_or_empty %type unit_file %type used_unit_name %type unit_header @@ -188,15 +189,17 @@ parse_goal { root = $1; } | parts { root = $1; } - | tkShortProgram uses_clause stmt_list + | tkShortProgram uses_clause_one_or_empty decl_sect_list_proc_func_only stmt_list { - var stl = $3 as statement_list; + var stl = $4 as statement_list; stl.left_logical_bracket = $1; stl.right_logical_bracket = new token_info(""); var ul = $2 as uses_list; - root = $$ = NewProgramModule(null, null, ul, new block(null, stl, @$), new token_info(""), @$); + SourceContext sc3 = @3; + SourceContext sc4 = @4; + root = $$ = NewProgramModule(null, null, ul, new block($3 as declarations, stl, @4), new token_info(""), @$); } - | tkShortSFProgram uses_clause stmt_list + | tkShortSFProgram uses_clause_one stmt_list { var stl = $3 as statement_list; stl.left_logical_bracket = $1; @@ -330,21 +333,43 @@ ident_or_keyword_pointseparator_list } ; + +uses_clause_one + : tkUses used_units_list tkSemiColon + { + $$ = $2; + $$.source_context = @$; + } + ; + +uses_clause_one_or_empty + : + { + $$ = null; + } + | uses_clause_one + { + if (parsertools.build_tree_for_formatter) + $$ = new uses_closure($1 as uses_list,@$); + $$ = $1; + } + ; + uses_clause : { $$ = null; } - | uses_clause tkUses used_units_list tkSemiColon + | uses_clause uses_clause_one { if (parsertools.build_tree_for_formatter) { if ($1 == null) { - $$ = new uses_closure($3 as uses_list,@$); + $$ = new uses_closure($2 as uses_list,@$); } else { - ($1 as uses_closure).AddUsesList($3 as uses_list,@$); + ($1 as uses_closure).AddUsesList($2 as uses_list,@$); $$ = $1; } } @@ -352,12 +377,12 @@ uses_clause { if ($1 == null) { - $$ = $3; + $$ = $2; $$.source_context = @$; } else { - ($1 as uses_list).AddUsesList($3 as uses_list,@$); + ($1 as uses_list).AddUsesList($2 as uses_list,@$); $$ = $1; $$.source_context = @$; } @@ -497,6 +522,28 @@ decl_sect_list } ; +decl_sect_list_proc_func_only + : + { + $$ = new declarations(); + if (GlobalDecls==null) + GlobalDecls = $$ as declarations; + } + | decl_sect_list_proc_func_only proc_func_decl_noclass + { + var dcl = $1 as declarations; + if (dcl.Count == 0) + $$ = dcl.Add($2 as declaration, @2); + else + { + var sc = dcl.source_context; + sc = sc.Merge($2.source_context); + $$ = dcl.Add($2 as declaration, @2); + $$.source_context = sc; + } + } + ; + decl_sect_list1 : { diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index 93802e3bb..02647d052 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -2,7 +2,7 @@ // GPPG version 1.3.6 // Machine: DESKTOP-G8V08V4 -// DateTime: 24.02.2021 14:31:42 +// DateTime: 27.02.2021 21:02:16 // UserName: ????????? // Input file @@ -76,8 +76,8 @@ public partial class GPPGParser: ShiftReduceParser aliasses; #pragma warning restore 649 - private static Rule[] rules = new Rule[990]; - private static State[] states = new State[1640]; + private static Rule[] rules = new Rule[995]; + private static State[] states = new State[1644]; private static string[] nonTerms = new string[] { "parse_goal", "unit_key_word", "class_or_static", "assignment", "optional_array_initializer", "attribute_declarations", "ot_visibility_specifier", "one_attribute", "attribute_variable", @@ -89,2715 +89,2726 @@ public partial class GPPGParser: ShiftReduceParser parts { root = ValueStack[ValueStack.Depth-1].stn; } break; - case 5: // parse_goal -> tkShortProgram, uses_clause, stmt_list + case 5: // parse_goal -> tkShortProgram, uses_clause_one_or_empty, + // decl_sect_list_proc_func_only, stmt_list { var stl = ValueStack[ValueStack.Depth-1].stn as statement_list; - stl.left_logical_bracket = ValueStack[ValueStack.Depth-3].ti; + stl.left_logical_bracket = ValueStack[ValueStack.Depth-4].ti; stl.right_logical_bracket = new token_info(""); - var ul = ValueStack[ValueStack.Depth-2].stn as uses_list; - root = CurrentSemanticValue.stn = NewProgramModule(null, null, ul, new block(null, stl, CurrentLocationSpan), new token_info(""), CurrentLocationSpan); + var ul = ValueStack[ValueStack.Depth-3].stn as uses_list; + SourceContext sc3 = LocationStack[LocationStack.Depth-2]; + SourceContext sc4 = LocationStack[LocationStack.Depth-1]; + root = CurrentSemanticValue.stn = NewProgramModule(null, null, ul, new block(ValueStack[ValueStack.Depth-2].stn as declarations, stl, LocationStack[LocationStack.Depth-1]), new token_info(""), CurrentLocationSpan); } break; - case 6: // parse_goal -> tkShortSFProgram, uses_clause, stmt_list + case 6: // parse_goal -> tkShortSFProgram, uses_clause_one, stmt_list { var stl = ValueStack[ValueStack.Depth-1].stn as statement_list; stl.left_logical_bracket = ValueStack[ValueStack.Depth-3].ti; @@ -2950,133 +2964,151 @@ public partial class GPPGParser: ShiftReduceParser /* empty */ + case 38: // uses_clause_one -> tkUses, used_units_list, tkSemiColon +{ + CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; + CurrentSemanticValue.stn.source_context = CurrentLocationSpan; + } + break; + case 39: // uses_clause_one_or_empty -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 39: // uses_clause -> uses_clause, tkUses, used_units_list, tkSemiColon + case 40: // uses_clause_one_or_empty -> uses_clause_one +{ + if (parsertools.build_tree_for_formatter) + CurrentSemanticValue.stn = new uses_closure(ValueStack[ValueStack.Depth-1].stn as uses_list,CurrentLocationSpan); + CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; + } + break; + case 41: // uses_clause -> /* empty */ +{ + CurrentSemanticValue.stn = null; + } + break; + case 42: // uses_clause -> uses_clause, uses_clause_one { if (parsertools.build_tree_for_formatter) { - if (ValueStack[ValueStack.Depth-4].stn == null) + if (ValueStack[ValueStack.Depth-2].stn == null) { - CurrentSemanticValue.stn = new uses_closure(ValueStack[ValueStack.Depth-2].stn as uses_list,CurrentLocationSpan); + CurrentSemanticValue.stn = new uses_closure(ValueStack[ValueStack.Depth-1].stn as uses_list,CurrentLocationSpan); } else { - (ValueStack[ValueStack.Depth-4].stn as uses_closure).AddUsesList(ValueStack[ValueStack.Depth-2].stn as uses_list,CurrentLocationSpan); - CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-4].stn; + (ValueStack[ValueStack.Depth-2].stn as uses_closure).AddUsesList(ValueStack[ValueStack.Depth-1].stn as uses_list,CurrentLocationSpan); + CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } } else { - if (ValueStack[ValueStack.Depth-4].stn == null) + if (ValueStack[ValueStack.Depth-2].stn == null) { - CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; + CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } else { - (ValueStack[ValueStack.Depth-4].stn as uses_list).AddUsesList(ValueStack[ValueStack.Depth-2].stn as uses_list,CurrentLocationSpan); - CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-4].stn; + (ValueStack[ValueStack.Depth-2].stn as uses_list).AddUsesList(ValueStack[ValueStack.Depth-1].stn as uses_list,CurrentLocationSpan); + CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } } } break; - case 40: // used_units_list -> used_unit_name + case 43: // used_units_list -> used_unit_name { CurrentSemanticValue.stn = new uses_list(ValueStack[ValueStack.Depth-1].stn as unit_or_namespace,CurrentLocationSpan); } break; - case 41: // used_units_list -> used_units_list, tkComma, used_unit_name + case 44: // used_units_list -> used_units_list, tkComma, used_unit_name { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as uses_list).Add(ValueStack[ValueStack.Depth-1].stn as unit_or_namespace, CurrentLocationSpan); } break; - case 42: // used_unit_name -> ident_or_keyword_pointseparator_list + case 45: // used_unit_name -> ident_or_keyword_pointseparator_list { CurrentSemanticValue.stn = new unit_or_namespace(ValueStack[ValueStack.Depth-1].stn as ident_list,CurrentLocationSpan); } break; - case 43: // used_unit_name -> ident_or_keyword_pointseparator_list, tkIn, tkStringLiteral + case 46: // used_unit_name -> ident_or_keyword_pointseparator_list, tkIn, tkStringLiteral { if (ValueStack[ValueStack.Depth-1].stn is char_const _cc) ValueStack[ValueStack.Depth-1].stn = new string_const(_cc.cconst.ToString()); CurrentSemanticValue.stn = new uses_unit_in(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].stn as string_const, CurrentLocationSpan); } break; - case 44: // unit_file -> attribute_declarations, unit_header, interface_part, + case 47: // unit_file -> attribute_declarations, unit_header, interface_part, // implementation_part, initialization_part, tkPoint { CurrentSemanticValue.stn = new unit_module(ValueStack[ValueStack.Depth-5].stn as unit_name, ValueStack[ValueStack.Depth-4].stn as interface_node, ValueStack[ValueStack.Depth-3].stn as implementation_node, (ValueStack[ValueStack.Depth-2].stn as initfinal_part).initialization_sect, (ValueStack[ValueStack.Depth-2].stn as initfinal_part).finalization_sect, ValueStack[ValueStack.Depth-6].stn as attribute_list, CurrentLocationSpan); } break; - case 45: // unit_file -> attribute_declarations, unit_header, abc_interface_part, + case 48: // unit_file -> attribute_declarations, unit_header, abc_interface_part, // initialization_part, tkPoint { CurrentSemanticValue.stn = new unit_module(ValueStack[ValueStack.Depth-4].stn as unit_name, ValueStack[ValueStack.Depth-3].stn as interface_node, null, (ValueStack[ValueStack.Depth-2].stn as initfinal_part).initialization_sect, (ValueStack[ValueStack.Depth-2].stn as initfinal_part).finalization_sect, ValueStack[ValueStack.Depth-5].stn as attribute_list, CurrentLocationSpan); } break; - case 46: // unit_header -> unit_key_word, unit_name, tkSemiColon, + case 49: // unit_header -> unit_key_word, unit_name, tkSemiColon, // optional_head_compiler_directives { CurrentSemanticValue.stn = NewUnitHeading(new ident(ValueStack[ValueStack.Depth-4].ti.text, LocationStack[LocationStack.Depth-4]), ValueStack[ValueStack.Depth-3].id, CurrentLocationSpan); } break; - case 47: // unit_header -> tkNamespace, ident_or_keyword_pointseparator_list, tkSemiColon, + case 50: // unit_header -> tkNamespace, ident_or_keyword_pointseparator_list, tkSemiColon, // optional_head_compiler_directives { CurrentSemanticValue.stn = NewNamespaceHeading(new ident(ValueStack[ValueStack.Depth-4].ti.text, LocationStack[LocationStack.Depth-4]), ValueStack[ValueStack.Depth-3].stn as ident_list, CurrentLocationSpan); } break; - case 48: // unit_key_word -> tkUnit + case 51: // unit_key_word -> tkUnit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 49: // unit_key_word -> tkLibrary + case 52: // unit_key_word -> tkLibrary { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 50: // unit_name -> identifier + case 53: // unit_name -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 51: // interface_part -> tkInterface, uses_clause, interface_decl_sect_list + case 54: // interface_part -> tkInterface, uses_clause, interface_decl_sect_list { CurrentSemanticValue.stn = new interface_node(ValueStack[ValueStack.Depth-1].stn as declarations, ValueStack[ValueStack.Depth-2].stn as uses_list, null, LexLocation.MergeAll(LocationStack[LocationStack.Depth-3],LocationStack[LocationStack.Depth-2],LocationStack[LocationStack.Depth-1])); } break; - case 52: // implementation_part -> tkImplementation, uses_clause, decl_sect_list + case 55: // implementation_part -> tkImplementation, uses_clause, decl_sect_list { CurrentSemanticValue.stn = new implementation_node(ValueStack[ValueStack.Depth-2].stn as uses_list, ValueStack[ValueStack.Depth-1].stn as declarations, null, LexLocation.MergeAll(LocationStack[LocationStack.Depth-3],LocationStack[LocationStack.Depth-2],LocationStack[LocationStack.Depth-1])); } break; - case 53: // abc_interface_part -> uses_clause, decl_sect_list + case 56: // abc_interface_part -> uses_clause, decl_sect_list { CurrentSemanticValue.stn = new interface_node(ValueStack[ValueStack.Depth-1].stn as declarations, ValueStack[ValueStack.Depth-2].stn as uses_list, null, null); } break; - case 54: // initialization_part -> tkEnd + case 57: // initialization_part -> tkEnd { CurrentSemanticValue.stn = new initfinal_part(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 55: // initialization_part -> tkInitialization, stmt_list, tkEnd + case 58: // initialization_part -> tkInitialization, stmt_list, tkEnd { CurrentSemanticValue.stn = new initfinal_part(ValueStack[ValueStack.Depth-3].ti, ValueStack[ValueStack.Depth-2].stn as statement_list, ValueStack[ValueStack.Depth-1].ti, null, null, CurrentLocationSpan); } break; - case 56: // initialization_part -> tkInitialization, stmt_list, tkFinalization, stmt_list, + case 59: // initialization_part -> tkInitialization, stmt_list, tkFinalization, stmt_list, // tkEnd { CurrentSemanticValue.stn = new initfinal_part(ValueStack[ValueStack.Depth-5].ti, ValueStack[ValueStack.Depth-4].stn as statement_list, ValueStack[ValueStack.Depth-3].ti, ValueStack[ValueStack.Depth-2].stn as statement_list, ValueStack[ValueStack.Depth-1].ti, CurrentLocationSpan); } break; - case 57: // initialization_part -> tkBegin, stmt_list, tkEnd + case 60: // initialization_part -> tkBegin, stmt_list, tkEnd { CurrentSemanticValue.stn = new initfinal_part(ValueStack[ValueStack.Depth-3].ti, ValueStack[ValueStack.Depth-2].stn as statement_list, ValueStack[ValueStack.Depth-1].ti, null, null, CurrentLocationSpan); } break; - case 58: // interface_decl_sect_list -> int_decl_sect_list1 + case 61: // interface_decl_sect_list -> int_decl_sect_list1 { if ((ValueStack[ValueStack.Depth-1].stn as declarations).Count > 0) CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; @@ -3084,19 +3116,19 @@ public partial class GPPGParser: ShiftReduceParser /* empty */ + case 62: // int_decl_sect_list1 -> /* empty */ { CurrentSemanticValue.stn = new declarations(); if (GlobalDecls==null) GlobalDecls = CurrentSemanticValue.stn as declarations; } break; - case 60: // int_decl_sect_list1 -> int_decl_sect_list1, int_decl_sect + case 63: // int_decl_sect_list1 -> int_decl_sect_list1, int_decl_sect { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-2].stn as declarations).Add(ValueStack[ValueStack.Depth-1].stn as declaration, CurrentLocationSpan); } break; - case 61: // decl_sect_list -> decl_sect_list1 + case 64: // decl_sect_list -> decl_sect_list1 { if ((ValueStack[ValueStack.Depth-1].stn as declarations).Count > 0) CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; @@ -3104,19 +3136,41 @@ public partial class GPPGParser: ShiftReduceParser /* empty */ + case 65: // decl_sect_list_proc_func_only -> /* empty */ { CurrentSemanticValue.stn = new declarations(); if (GlobalDecls==null) GlobalDecls = CurrentSemanticValue.stn as declarations; } break; - case 63: // decl_sect_list1 -> decl_sect_list1, decl_sect + case 66: // decl_sect_list_proc_func_only -> decl_sect_list_proc_func_only, + // proc_func_decl_noclass +{ + var dcl = ValueStack[ValueStack.Depth-2].stn as declarations; + if (dcl.Count == 0) + CurrentSemanticValue.stn = dcl.Add(ValueStack[ValueStack.Depth-1].stn as declaration, LocationStack[LocationStack.Depth-1]); + else + { + var sc = dcl.source_context; + sc = sc.Merge(ValueStack[ValueStack.Depth-1].stn.source_context); + CurrentSemanticValue.stn = dcl.Add(ValueStack[ValueStack.Depth-1].stn as declaration, LocationStack[LocationStack.Depth-1]); + CurrentSemanticValue.stn.source_context = sc; + } + } + break; + case 67: // decl_sect_list1 -> /* empty */ +{ + CurrentSemanticValue.stn = new declarations(); + if (GlobalDecls==null) + GlobalDecls = CurrentSemanticValue.stn as declarations; + } + break; + case 68: // decl_sect_list1 -> decl_sect_list1, decl_sect { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-2].stn as declarations).Add(ValueStack[ValueStack.Depth-1].stn as declaration, CurrentLocationSpan); } break; - case 64: // inclass_decl_sect_list -> inclass_decl_sect_list1 + case 69: // inclass_decl_sect_list -> inclass_decl_sect_list1 { if ((ValueStack[ValueStack.Depth-1].stn as declarations).Count > 0) CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; @@ -3124,163 +3178,163 @@ public partial class GPPGParser: ShiftReduceParser /* empty */ + case 70: // inclass_decl_sect_list1 -> /* empty */ { CurrentSemanticValue.stn = new declarations(); } break; - case 66: // inclass_decl_sect_list1 -> inclass_decl_sect_list1, abc_decl_sect + case 71: // inclass_decl_sect_list1 -> inclass_decl_sect_list1, abc_decl_sect { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-2].stn as declarations).Add(ValueStack[ValueStack.Depth-1].stn as declaration, CurrentLocationSpan); } break; - case 67: // int_decl_sect -> const_decl_sect + case 72: // int_decl_sect -> const_decl_sect { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 68: // int_decl_sect -> res_str_decl_sect + case 73: // int_decl_sect -> res_str_decl_sect { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 69: // int_decl_sect -> type_decl_sect + case 74: // int_decl_sect -> type_decl_sect { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 70: // int_decl_sect -> var_decl_sect + case 75: // int_decl_sect -> var_decl_sect { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 71: // int_decl_sect -> int_proc_header + case 76: // int_decl_sect -> int_proc_header { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].td; } break; - case 72: // int_decl_sect -> int_func_header + case 77: // int_decl_sect -> int_func_header { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].td; } break; - case 73: // decl_sect -> label_decl_sect + case 78: // decl_sect -> label_decl_sect { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 74: // decl_sect -> const_decl_sect + case 79: // decl_sect -> const_decl_sect { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 75: // decl_sect -> res_str_decl_sect + case 80: // decl_sect -> res_str_decl_sect { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 76: // decl_sect -> type_decl_sect + case 81: // decl_sect -> type_decl_sect { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 77: // decl_sect -> var_decl_sect + case 82: // decl_sect -> var_decl_sect { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 78: // decl_sect -> proc_func_constr_destr_decl_with_attr + case 83: // decl_sect -> proc_func_constr_destr_decl_with_attr { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 79: // proc_func_constr_destr_decl -> proc_func_decl + case 84: // proc_func_constr_destr_decl -> proc_func_decl { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 80: // proc_func_constr_destr_decl -> constr_destr_decl + case 85: // proc_func_constr_destr_decl -> constr_destr_decl { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 81: // proc_func_constr_destr_decl_with_attr -> attribute_declarations, + case 86: // proc_func_constr_destr_decl_with_attr -> attribute_declarations, // proc_func_constr_destr_decl { (ValueStack[ValueStack.Depth-1].stn as procedure_definition).AssignAttrList(ValueStack[ValueStack.Depth-2].stn as attribute_list); CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 82: // abc_decl_sect -> label_decl_sect + case 87: // abc_decl_sect -> label_decl_sect { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 83: // abc_decl_sect -> const_decl_sect + case 88: // abc_decl_sect -> const_decl_sect { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 84: // abc_decl_sect -> res_str_decl_sect + case 89: // abc_decl_sect -> res_str_decl_sect { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 85: // abc_decl_sect -> type_decl_sect + case 90: // abc_decl_sect -> type_decl_sect { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 86: // abc_decl_sect -> var_decl_sect + case 91: // abc_decl_sect -> var_decl_sect { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 87: // int_proc_header -> attribute_declarations, proc_header + case 92: // int_proc_header -> attribute_declarations, proc_header { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; (CurrentSemanticValue.td as procedure_header).attributes = ValueStack[ValueStack.Depth-2].stn as attribute_list; } break; - case 88: // int_proc_header -> attribute_declarations, proc_header, tkForward, tkSemiColon + case 93: // int_proc_header -> attribute_declarations, proc_header, tkForward, tkSemiColon { CurrentSemanticValue.td = NewProcedureHeader(ValueStack[ValueStack.Depth-4].stn as attribute_list, ValueStack[ValueStack.Depth-3].td as procedure_header, ValueStack[ValueStack.Depth-2].id as procedure_attribute, CurrentLocationSpan); } break; - case 89: // int_func_header -> attribute_declarations, func_header + case 94: // int_func_header -> attribute_declarations, func_header { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; (CurrentSemanticValue.td as procedure_header).attributes = ValueStack[ValueStack.Depth-2].stn as attribute_list; } break; - case 90: // int_func_header -> attribute_declarations, func_header, tkForward, tkSemiColon + case 95: // int_func_header -> attribute_declarations, func_header, tkForward, tkSemiColon { CurrentSemanticValue.td = NewProcedureHeader(ValueStack[ValueStack.Depth-4].stn as attribute_list, ValueStack[ValueStack.Depth-3].td as procedure_header, ValueStack[ValueStack.Depth-2].id as procedure_attribute, CurrentLocationSpan); } break; - case 91: // label_decl_sect -> tkLabel, label_list, tkSemiColon + case 96: // label_decl_sect -> tkLabel, label_list, tkSemiColon { CurrentSemanticValue.stn = new label_definitions(ValueStack[ValueStack.Depth-2].stn as ident_list, CurrentLocationSpan); } break; - case 92: // label_list -> label_name + case 97: // label_list -> label_name { CurrentSemanticValue.stn = new ident_list(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 93: // label_list -> label_list, tkComma, label_name + case 98: // label_list -> label_list, tkComma, label_name { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as ident_list).Add(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 94: // label_name -> tkInteger + case 99: // label_name -> tkInteger { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ex.ToString(), CurrentLocationSpan); } break; - case 95: // label_name -> identifier + case 100: // label_name -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 96: // const_decl_sect -> tkConst, const_decl + case 101: // const_decl_sect -> tkConst, const_decl { CurrentSemanticValue.stn = new consts_definitions_list(ValueStack[ValueStack.Depth-1].stn as const_definition, CurrentLocationSpan); } break; - case 97: // const_decl_sect -> const_decl_sect, const_decl + case 102: // const_decl_sect -> const_decl_sect, const_decl { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-2].stn as consts_definitions_list).Add(ValueStack[ValueStack.Depth-1].stn as const_definition, CurrentLocationSpan); } break; - case 98: // res_str_decl_sect -> tkResourceString, const_decl + case 103: // res_str_decl_sect -> tkResourceString, const_decl { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 99: // res_str_decl_sect -> res_str_decl_sect, const_decl + case 104: // res_str_decl_sect -> res_str_decl_sect, const_decl { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 100: // type_decl_sect -> tkType, type_decl + case 105: // type_decl_sect -> tkType, type_decl { CurrentSemanticValue.stn = new type_declarations(ValueStack[ValueStack.Depth-1].stn as type_declaration, CurrentLocationSpan); } break; - case 101: // type_decl_sect -> type_decl_sect, type_decl + case 106: // type_decl_sect -> type_decl_sect, type_decl { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-2].stn as type_declarations).Add(ValueStack[ValueStack.Depth-1].stn as type_declaration, CurrentLocationSpan); } break; - case 102: // var_decl_with_assign_var_tuple -> var_decl + case 107: // var_decl_with_assign_var_tuple -> var_decl { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 103: // var_decl_with_assign_var_tuple -> tkRoundOpen, identifier, tkComma, ident_list, + case 108: // var_decl_with_assign_var_tuple -> tkRoundOpen, identifier, tkComma, ident_list, // tkRoundClose, tkAssign, expr_l1, // tkSemiColon { @@ -3289,203 +3343,203 @@ public partial class GPPGParser: ShiftReduceParser tkVar, var_decl_with_assign_var_tuple + case 109: // var_decl_sect -> tkVar, var_decl_with_assign_var_tuple { CurrentSemanticValue.stn = new variable_definitions(ValueStack[ValueStack.Depth-1].stn as var_def_statement, CurrentLocationSpan); } break; - case 105: // var_decl_sect -> tkEvent, var_decl_with_assign_var_tuple + case 110: // var_decl_sect -> tkEvent, var_decl_with_assign_var_tuple { CurrentSemanticValue.stn = new variable_definitions(ValueStack[ValueStack.Depth-1].stn as var_def_statement, CurrentLocationSpan); (ValueStack[ValueStack.Depth-1].stn as var_def_statement).is_event = true; } break; - case 106: // var_decl_sect -> var_decl_sect, var_decl_with_assign_var_tuple + case 111: // var_decl_sect -> var_decl_sect, var_decl_with_assign_var_tuple { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-2].stn as variable_definitions).Add(ValueStack[ValueStack.Depth-1].stn as var_def_statement, CurrentLocationSpan); } break; - case 107: // const_decl -> only_const_decl, tkSemiColon + case 112: // const_decl -> only_const_decl, tkSemiColon { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 108: // only_const_decl -> const_name, tkEqual, init_const_expr + case 113: // only_const_decl -> const_name, tkEqual, init_const_expr { CurrentSemanticValue.stn = new simple_const_definition(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 109: // only_const_decl -> const_name, tkColon, type_ref, tkEqual, typed_const + case 114: // only_const_decl -> const_name, tkColon, type_ref, tkEqual, typed_const { CurrentSemanticValue.stn = new typed_const_definition(ValueStack[ValueStack.Depth-5].id, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-3].td, CurrentLocationSpan); } break; - case 110: // init_const_expr -> const_expr + case 115: // init_const_expr -> const_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 111: // init_const_expr -> array_const + case 116: // init_const_expr -> array_const { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 112: // const_name -> identifier + case 117: // const_name -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 113: // expr_l1_list -> expr_l1 + case 118: // expr_l1_list -> expr_l1 { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 114: // expr_l1_list -> expr_l1_list, tkComma, expr_l1 + case 119: // expr_l1_list -> expr_l1_list, tkComma, expr_l1 { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as expression_list).Add(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 115: // const_relop_expr -> const_simple_expr + case 120: // const_relop_expr -> const_simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 116: // const_relop_expr -> const_relop_expr, const_relop, const_simple_expr + case 121: // const_relop_expr -> const_relop_expr, const_relop, const_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 117: // const_expr -> const_relop_expr + case 122: // const_expr -> const_relop_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 118: // const_expr -> question_constexpr + case 123: // const_expr -> question_constexpr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 119: // const_expr -> const_expr, tkDoubleQuestion, const_relop_expr + case 124: // const_expr -> const_expr, tkDoubleQuestion, const_relop_expr { CurrentSemanticValue.ex = new double_question_node(ValueStack[ValueStack.Depth-3].ex as expression, ValueStack[ValueStack.Depth-1].ex as expression, CurrentLocationSpan);} break; - case 120: // question_constexpr -> const_expr, tkQuestion, const_expr, tkColon, const_expr + case 125: // question_constexpr -> const_expr, tkQuestion, const_expr, tkColon, const_expr { CurrentSemanticValue.ex = new question_colon_expression(ValueStack[ValueStack.Depth-5].ex, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 121: // const_relop -> tkEqual + case 126: // const_relop -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 122: // const_relop -> tkNotEqual + case 127: // const_relop -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 123: // const_relop -> tkLower + case 128: // const_relop -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 124: // const_relop -> tkGreater + case 129: // const_relop -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 125: // const_relop -> tkLowerEqual + case 130: // const_relop -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 126: // const_relop -> tkGreaterEqual + case 131: // const_relop -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 127: // const_relop -> tkIn + case 132: // const_relop -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 128: // const_simple_expr -> const_term + case 133: // const_simple_expr -> const_term { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 129: // const_simple_expr -> const_simple_expr, const_addop, const_term + case 134: // const_simple_expr -> const_simple_expr, const_addop, const_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 130: // const_addop -> tkPlus + case 135: // const_addop -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 131: // const_addop -> tkMinus + case 136: // const_addop -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 132: // const_addop -> tkOr + case 137: // const_addop -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 133: // const_addop -> tkXor + case 138: // const_addop -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 134: // as_is_constexpr -> const_term, typecast_op, simple_or_template_type_reference + case 139: // as_is_constexpr -> const_term, typecast_op, simple_or_template_type_reference { CurrentSemanticValue.ex = NewAsIsConstexpr(ValueStack[ValueStack.Depth-3].ex, (op_typecast)ValueStack[ValueStack.Depth-2].ob, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 135: // power_constexpr -> const_factor_without_unary_op, tkStarStar, const_factor + case 140: // power_constexpr -> const_factor_without_unary_op, tkStarStar, const_factor { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 136: // power_constexpr -> const_factor_without_unary_op, tkStarStar, power_constexpr + case 141: // power_constexpr -> const_factor_without_unary_op, tkStarStar, power_constexpr { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].ex,(ValueStack[ValueStack.Depth-2].op).type, CurrentLocationSpan); } break; - case 137: // power_constexpr -> sign, power_constexpr + case 142: // power_constexpr -> sign, power_constexpr { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 138: // const_term -> const_factor + case 143: // const_term -> const_factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 139: // const_term -> as_is_constexpr + case 144: // const_term -> as_is_constexpr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 140: // const_term -> power_constexpr + case 145: // const_term -> power_constexpr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 141: // const_term -> const_term, const_mulop, const_factor + case 146: // const_term -> const_term, const_mulop, const_factor { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 142: // const_term -> const_term, const_mulop, power_constexpr + case 147: // const_term -> const_term, const_mulop, power_constexpr { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].ex,(ValueStack[ValueStack.Depth-2].op).type, CurrentLocationSpan); } break; - case 143: // const_mulop -> tkStar + case 148: // const_mulop -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 144: // const_mulop -> tkSlash + case 149: // const_mulop -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 145: // const_mulop -> tkDiv + case 150: // const_mulop -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 146: // const_mulop -> tkMod + case 151: // const_mulop -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 147: // const_mulop -> tkShl + case 152: // const_mulop -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 148: // const_mulop -> tkShr + case 153: // const_mulop -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 149: // const_mulop -> tkAnd + case 154: // const_mulop -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 150: // const_factor_without_unary_op -> const_variable + case 155: // const_factor_without_unary_op -> const_variable { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 151: // const_factor_without_unary_op -> tkRoundOpen, const_expr, tkRoundClose + case 156: // const_factor_without_unary_op -> tkRoundOpen, const_expr, tkRoundClose { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-2].ex; } break; - case 152: // const_factor -> const_variable + case 157: // const_factor -> const_variable { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 153: // const_factor -> const_set + case 158: // const_factor -> const_set { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 154: // const_factor -> tkNil + case 159: // const_factor -> tkNil { CurrentSemanticValue.ex = new nil_const(); CurrentSemanticValue.ex.source_context = CurrentLocationSpan; } break; - case 155: // const_factor -> tkAddressOf, const_factor + case 160: // const_factor -> tkAddressOf, const_factor { CurrentSemanticValue.ex = new get_address(ValueStack[ValueStack.Depth-1].ex as addressed_value, CurrentLocationSpan); } break; - case 156: // const_factor -> tkRoundOpen, const_expr, tkRoundClose + case 161: // const_factor -> tkRoundOpen, const_expr, tkRoundClose { CurrentSemanticValue.ex = new bracket_expr(ValueStack[ValueStack.Depth-2].ex, CurrentLocationSpan); } break; - case 157: // const_factor -> tkNot, const_factor + case 162: // const_factor -> tkNot, const_factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 158: // const_factor -> sign, const_factor + case 163: // const_factor -> sign, const_factor { // ������ ��������� ����� �������� if (ValueStack[ValueStack.Depth-2].op.type == Operators.Minus) @@ -3512,56 +3566,56 @@ public partial class GPPGParser: ShiftReduceParser new_expr + case 164: // const_factor -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 160: // const_set -> tkSquareOpen, elem_list, tkSquareClose + case 165: // const_set -> tkSquareOpen, elem_list, tkSquareClose { CurrentSemanticValue.ex = new pascal_set_constant(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 161: // const_set -> tkVertParen, elem_list, tkVertParen + case 166: // const_set -> tkVertParen, elem_list, tkVertParen { CurrentSemanticValue.ex = new array_const_new(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 162: // sign -> tkPlus + case 167: // sign -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 163: // sign -> tkMinus + case 168: // sign -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 164: // const_variable -> identifier + case 169: // const_variable -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 165: // const_variable -> literal + case 170: // const_variable -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 166: // const_variable -> unsigned_number + case 171: // const_variable -> unsigned_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 167: // const_variable -> tkInherited, identifier + case 172: // const_variable -> tkInherited, identifier { CurrentSemanticValue.ex = new inherited_ident(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 168: // const_variable -> sizeof_expr + case 173: // const_variable -> sizeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 169: // const_variable -> typeof_expr + case 174: // const_variable -> typeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 170: // const_variable -> const_variable, const_variable_2 + case 175: // const_variable -> const_variable, const_variable_2 { CurrentSemanticValue.ex = NewConstVariable(ValueStack[ValueStack.Depth-2].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 171: // const_variable -> const_variable, tkAmpersend, template_type_params + case 176: // const_variable -> const_variable, tkAmpersend, template_type_params { CurrentSemanticValue.ex = new ident_with_templateparams(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].stn as template_param_list, CurrentLocationSpan); } break; - case 172: // const_variable -> const_variable, tkSquareOpen, format_const_expr, + case 177: // const_variable -> const_variable, tkSquareOpen, format_const_expr, // tkSquareClose { var fe = ValueStack[ValueStack.Depth-2].ex as format_expr; @@ -3575,199 +3629,199 @@ public partial class GPPGParser: ShiftReduceParser tkPoint, identifier_or_keyword + case 178: // const_variable_2 -> tkPoint, identifier_or_keyword { CurrentSemanticValue.ex = new dot_node(null, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan); } break; - case 174: // const_variable_2 -> tkDeref + case 179: // const_variable_2 -> tkDeref { CurrentSemanticValue.ex = new roof_dereference(); CurrentSemanticValue.ex.source_context = CurrentLocationSpan; } break; - case 175: // const_variable_2 -> tkRoundOpen, optional_const_func_expr_list, tkRoundClose + case 180: // const_variable_2 -> tkRoundOpen, optional_const_func_expr_list, tkRoundClose { CurrentSemanticValue.ex = new method_call(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 176: // const_variable_2 -> tkSquareOpen, const_elem_list, tkSquareClose + case 181: // const_variable_2 -> tkSquareOpen, const_elem_list, tkSquareClose { CurrentSemanticValue.ex = new indexer(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 177: // optional_const_func_expr_list -> expr_list + case 182: // optional_const_func_expr_list -> expr_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 178: // optional_const_func_expr_list -> /* empty */ + case 183: // optional_const_func_expr_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 179: // const_elem_list -> const_elem_list1 + case 184: // const_elem_list -> const_elem_list1 { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 181: // const_elem_list1 -> const_elem + case 186: // const_elem_list1 -> const_elem { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 182: // const_elem_list1 -> const_elem_list1, tkComma, const_elem + case 187: // const_elem_list1 -> const_elem_list1, tkComma, const_elem { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as expression_list).Add(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 183: // const_elem -> const_expr + case 188: // const_elem -> const_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 184: // const_elem -> const_expr, tkDotDot, const_expr + case 189: // const_elem -> const_expr, tkDotDot, const_expr { CurrentSemanticValue.ex = new diapason_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 185: // unsigned_number -> tkInteger + case 190: // unsigned_number -> tkInteger { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 186: // unsigned_number -> tkHex + case 191: // unsigned_number -> tkHex { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 187: // unsigned_number -> tkFloat + case 192: // unsigned_number -> tkFloat { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 188: // unsigned_number -> tkBigInteger + case 193: // unsigned_number -> tkBigInteger { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 189: // typed_const -> const_expr + case 194: // typed_const -> const_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 190: // typed_const -> array_const + case 195: // typed_const -> array_const { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 191: // typed_const -> record_const + case 196: // typed_const -> record_const { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 192: // array_const -> tkRoundOpen, typed_const_list, tkRoundClose + case 197: // array_const -> tkRoundOpen, typed_const_list, tkRoundClose { CurrentSemanticValue.ex = new array_const(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 194: // typed_const_list -> typed_const_list1 + case 199: // typed_const_list -> typed_const_list1 { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 195: // typed_const_list1 -> typed_const_plus + case 200: // typed_const_list1 -> typed_const_plus { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 196: // typed_const_list1 -> typed_const_list1, tkComma, typed_const_plus + case 201: // typed_const_list1 -> typed_const_list1, tkComma, typed_const_plus { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as expression_list).Add(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 197: // record_const -> tkRoundOpen, const_field_list, tkRoundClose + case 202: // record_const -> tkRoundOpen, const_field_list, tkRoundClose { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-2].ex; CurrentSemanticValue.ex.source_context = CurrentLocationSpan; } break; - case 198: // const_field_list -> const_field_list_1 + case 203: // const_field_list -> const_field_list_1 { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 199: // const_field_list -> const_field_list_1, tkSemiColon + case 204: // const_field_list -> const_field_list_1, tkSemiColon { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-2].ex; } break; - case 200: // const_field_list_1 -> const_field + case 205: // const_field_list_1 -> const_field { CurrentSemanticValue.ex = new record_const(ValueStack[ValueStack.Depth-1].stn as record_const_definition, CurrentLocationSpan); } break; - case 201: // const_field_list_1 -> const_field_list_1, tkSemiColon, const_field + case 206: // const_field_list_1 -> const_field_list_1, tkSemiColon, const_field { CurrentSemanticValue.ex = (ValueStack[ValueStack.Depth-3].ex as record_const).Add(ValueStack[ValueStack.Depth-1].stn as record_const_definition, CurrentLocationSpan); } break; - case 202: // const_field -> const_field_name, tkColon, typed_const + case 207: // const_field -> const_field_name, tkColon, typed_const { CurrentSemanticValue.stn = new record_const_definition(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 203: // const_field_name -> identifier + case 208: // const_field_name -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 204: // type_decl -> attribute_declarations, simple_type_decl + case 209: // type_decl -> attribute_declarations, simple_type_decl { (ValueStack[ValueStack.Depth-1].stn as declaration).attributes = ValueStack[ValueStack.Depth-2].stn as attribute_list; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; CurrentSemanticValue.stn.source_context = LocationStack[LocationStack.Depth-1]; } break; - case 205: // attribute_declarations -> attribute_declaration + case 210: // attribute_declarations -> attribute_declaration { CurrentSemanticValue.stn = new attribute_list(ValueStack[ValueStack.Depth-1].stn as simple_attribute_list, CurrentLocationSpan); } break; - case 206: // attribute_declarations -> attribute_declarations, attribute_declaration + case 211: // attribute_declarations -> attribute_declarations, attribute_declaration { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-2].stn as attribute_list).Add(ValueStack[ValueStack.Depth-1].stn as simple_attribute_list, CurrentLocationSpan); } break; - case 207: // attribute_declarations -> /* empty */ + case 212: // attribute_declarations -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 208: // attribute_declaration -> tkSquareOpen, one_or_some_attribute, tkSquareClose + case 213: // attribute_declaration -> tkSquareOpen, one_or_some_attribute, tkSquareClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 209: // one_or_some_attribute -> one_attribute + case 214: // one_or_some_attribute -> one_attribute { CurrentSemanticValue.stn = new simple_attribute_list(ValueStack[ValueStack.Depth-1].stn as attribute, CurrentLocationSpan); } break; - case 210: // one_or_some_attribute -> one_or_some_attribute, tkComma, one_attribute + case 215: // one_or_some_attribute -> one_or_some_attribute, tkComma, one_attribute { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as simple_attribute_list).Add(ValueStack[ValueStack.Depth-1].stn as attribute, CurrentLocationSpan); } break; - case 211: // one_attribute -> attribute_variable + case 216: // one_attribute -> attribute_variable { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 212: // one_attribute -> identifier, tkColon, attribute_variable + case 217: // one_attribute -> identifier, tkColon, attribute_variable { (ValueStack[ValueStack.Depth-1].stn as attribute).qualifier = ValueStack[ValueStack.Depth-3].id; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 213: // simple_type_decl -> type_decl_identifier, tkEqual, type_decl_type, tkSemiColon + case 218: // simple_type_decl -> type_decl_identifier, tkEqual, type_decl_type, tkSemiColon { CurrentSemanticValue.stn = new type_declaration(ValueStack[ValueStack.Depth-4].id, ValueStack[ValueStack.Depth-2].td, CurrentLocationSpan); } break; - case 214: // simple_type_decl -> template_identifier_with_equal, type_decl_type, tkSemiColon + case 219: // simple_type_decl -> template_identifier_with_equal, type_decl_type, tkSemiColon { CurrentSemanticValue.stn = new type_declaration(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-2].td, CurrentLocationSpan); } break; - case 215: // type_decl_identifier -> identifier + case 220: // type_decl_identifier -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 216: // type_decl_identifier -> identifier, template_arguments + case 221: // type_decl_identifier -> identifier, template_arguments { CurrentSemanticValue.id = new template_type_name(ValueStack[ValueStack.Depth-2].id.name, ValueStack[ValueStack.Depth-1].stn as ident_list, CurrentLocationSpan); } break; - case 217: // template_identifier_with_equal -> identifier, tkLower, ident_list, + case 222: // template_identifier_with_equal -> identifier, tkLower, ident_list, // tkGreaterEqual { CurrentSemanticValue.id = new template_type_name(ValueStack[ValueStack.Depth-4].id.name, ValueStack[ValueStack.Depth-2].stn as ident_list, CurrentLocationSpan); } break; - case 218: // type_decl_type -> type_ref + case 223: // type_decl_type -> type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 219: // type_decl_type -> object_type + case 224: // type_decl_type -> object_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 220: // simple_type_question -> simple_type, tkQuestion + case 225: // simple_type_question -> simple_type, tkQuestion { if (parsertools.build_tree_for_formatter) { @@ -3782,7 +3836,7 @@ public partial class GPPGParser: ShiftReduceParser template_type, tkQuestion + case 226: // simple_type_question -> template_type, tkQuestion { if (parsertools.build_tree_for_formatter) { @@ -3797,39 +3851,39 @@ public partial class GPPGParser: ShiftReduceParser simple_type + case 227: // type_ref -> simple_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 223: // type_ref -> simple_type_question + case 228: // type_ref -> simple_type_question { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 224: // type_ref -> string_type + case 229: // type_ref -> string_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 225: // type_ref -> pointer_type + case 230: // type_ref -> pointer_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 226: // type_ref -> structured_type + case 231: // type_ref -> structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 227: // type_ref -> procedural_type + case 232: // type_ref -> procedural_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 228: // type_ref -> template_type + case 233: // type_ref -> template_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 229: // template_type -> simple_type_identifier, template_type_params + case 234: // template_type -> simple_type_identifier, template_type_params { CurrentSemanticValue.td = new template_type_reference(ValueStack[ValueStack.Depth-2].td as named_type_reference, ValueStack[ValueStack.Depth-1].stn as template_param_list, CurrentLocationSpan); } break; - case 230: // template_type_params -> tkLower, template_param_list, tkGreater + case 235: // template_type_params -> tkLower, template_param_list, tkGreater { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 231: // template_type_empty_params -> tkNotEqual + case 236: // template_type_empty_params -> tkNotEqual { var ntr = new named_type_reference(new ident(""), CurrentLocationSpan); @@ -3837,42 +3891,42 @@ public partial class GPPGParser: ShiftReduceParser tkLower, template_empty_param_list, tkGreater + case 237: // template_type_empty_params -> tkLower, template_empty_param_list, tkGreater { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 233: // template_param_list -> template_param + case 238: // template_param_list -> template_param { CurrentSemanticValue.stn = new template_param_list(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 234: // template_param_list -> template_param_list, tkComma, template_param + case 239: // template_param_list -> template_param_list, tkComma, template_param { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as template_param_list).Add(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 235: // template_empty_param_list -> template_empty_param + case 240: // template_empty_param_list -> template_empty_param { CurrentSemanticValue.stn = new template_param_list(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 236: // template_empty_param_list -> template_empty_param_list, tkComma, + case 241: // template_empty_param_list -> template_empty_param_list, tkComma, // template_empty_param { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as template_param_list).Add(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 237: // template_empty_param -> /* empty */ + case 242: // template_empty_param -> /* empty */ { CurrentSemanticValue.td = new named_type_reference(new ident(""), CurrentLocationSpan); } break; - case 238: // template_param -> simple_type + case 243: // template_param -> simple_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 239: // template_param -> simple_type, tkQuestion + case 244: // template_param -> simple_type, tkQuestion { if (parsertools.build_tree_for_formatter) { @@ -3887,240 +3941,240 @@ public partial class GPPGParser: ShiftReduceParser structured_type + case 245: // template_param -> structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 241: // template_param -> procedural_type + case 246: // template_param -> procedural_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 242: // template_param -> template_type + case 247: // template_param -> template_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 243: // simple_type -> range_expr + case 248: // simple_type -> range_expr { CurrentSemanticValue.td = parsertools.ConvertDotNodeOrIdentToNamedTypeReference(ValueStack[ValueStack.Depth-1].ex); } break; - case 244: // simple_type -> range_expr, tkDotDot, range_expr + case 249: // simple_type -> range_expr, tkDotDot, range_expr { CurrentSemanticValue.td = new diapason(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 245: // simple_type -> tkRoundOpen, enumeration_id_list, tkRoundClose + case 250: // simple_type -> tkRoundOpen, enumeration_id_list, tkRoundClose { CurrentSemanticValue.td = new enum_type_definition(ValueStack[ValueStack.Depth-2].stn as enumerator_list, CurrentLocationSpan); } break; - case 246: // range_expr -> range_term + case 251: // range_expr -> range_term { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 247: // range_expr -> range_expr, const_addop, range_term + case 252: // range_expr -> range_expr, const_addop, range_term { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 248: // range_term -> range_factor + case 253: // range_term -> range_factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 249: // range_term -> range_term, const_mulop, range_factor + case 254: // range_term -> range_term, const_mulop, range_factor { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 250: // range_factor -> simple_type_identifier + case 255: // range_factor -> simple_type_identifier { CurrentSemanticValue.ex = parsertools.ConvertNamedTypeReferenceToDotNodeOrIdent(ValueStack[ValueStack.Depth-1].td as named_type_reference); } break; - case 251: // range_factor -> unsigned_number + case 256: // range_factor -> unsigned_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 252: // range_factor -> sign, range_factor + case 257: // range_factor -> sign, range_factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 253: // range_factor -> literal + case 258: // range_factor -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 254: // range_factor -> range_factor, tkRoundOpen, const_elem_list, tkRoundClose + case 259: // range_factor -> range_factor, tkRoundOpen, const_elem_list, tkRoundClose { CurrentSemanticValue.ex = new method_call(ValueStack[ValueStack.Depth-4].ex as addressed_value, ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 255: // simple_type_identifier -> identifier + case 260: // simple_type_identifier -> identifier { CurrentSemanticValue.td = new named_type_reference(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 256: // simple_type_identifier -> simple_type_identifier, tkPoint, + case 261: // simple_type_identifier -> simple_type_identifier, tkPoint, // identifier_or_keyword { CurrentSemanticValue.td = (ValueStack[ValueStack.Depth-3].td as named_type_reference).Add(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 257: // enumeration_id_list -> enumeration_id, tkComma, enumeration_id + case 262: // enumeration_id_list -> enumeration_id, tkComma, enumeration_id { CurrentSemanticValue.stn = new enumerator_list(ValueStack[ValueStack.Depth-3].stn as enumerator, CurrentLocationSpan); (CurrentSemanticValue.stn as enumerator_list).Add(ValueStack[ValueStack.Depth-1].stn as enumerator, CurrentLocationSpan); } break; - case 258: // enumeration_id_list -> enumeration_id_list, tkComma, enumeration_id + case 263: // enumeration_id_list -> enumeration_id_list, tkComma, enumeration_id { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as enumerator_list).Add(ValueStack[ValueStack.Depth-1].stn as enumerator, CurrentLocationSpan); } break; - case 259: // enumeration_id -> type_ref + case 264: // enumeration_id -> type_ref { CurrentSemanticValue.stn = new enumerator(ValueStack[ValueStack.Depth-1].td, null, CurrentLocationSpan); } break; - case 260: // enumeration_id -> type_ref, tkEqual, expr + case 265: // enumeration_id -> type_ref, tkEqual, expr { CurrentSemanticValue.stn = new enumerator(ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 261: // pointer_type -> tkDeref, fptype + case 266: // pointer_type -> tkDeref, fptype { CurrentSemanticValue.td = new ref_type(ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 262: // structured_type -> unpacked_structured_type + case 267: // structured_type -> unpacked_structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 263: // structured_type -> tkPacked, unpacked_structured_type + case 268: // structured_type -> tkPacked, unpacked_structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 264: // unpacked_structured_type -> array_type + case 269: // unpacked_structured_type -> array_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 265: // unpacked_structured_type -> record_type + case 270: // unpacked_structured_type -> record_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 266: // unpacked_structured_type -> set_type + case 271: // unpacked_structured_type -> set_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 267: // unpacked_structured_type -> file_type + case 272: // unpacked_structured_type -> file_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 268: // unpacked_structured_type -> sequence_type + case 273: // unpacked_structured_type -> sequence_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 269: // sequence_type -> tkSequence, tkOf, type_ref + case 274: // sequence_type -> tkSequence, tkOf, type_ref { CurrentSemanticValue.td = new sequence_type(ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 270: // array_type -> tkArray, tkSquareOpen, simple_type_list, tkSquareClose, tkOf, + case 275: // array_type -> tkArray, tkSquareOpen, simple_type_list, tkSquareClose, tkOf, // type_ref { CurrentSemanticValue.td = new array_type(ValueStack[ValueStack.Depth-4].stn as indexers_types, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 271: // array_type -> unsized_array_type + case 276: // array_type -> unsized_array_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 272: // unsized_array_type -> tkArray, tkOf, type_ref + case 277: // unsized_array_type -> tkArray, tkOf, type_ref { CurrentSemanticValue.td = new array_type(null, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 273: // simple_type_list -> simple_type_or_ + case 278: // simple_type_list -> simple_type_or_ { CurrentSemanticValue.stn = new indexers_types(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 274: // simple_type_list -> simple_type_list, tkComma, simple_type_or_ + case 279: // simple_type_list -> simple_type_list, tkComma, simple_type_or_ { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as indexers_types).Add(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 275: // simple_type_or_ -> simple_type + case 280: // simple_type_or_ -> simple_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 276: // simple_type_or_ -> /* empty */ + case 281: // simple_type_or_ -> /* empty */ { CurrentSemanticValue.td = null; } break; - case 277: // set_type -> tkSet, tkOf, type_ref + case 282: // set_type -> tkSet, tkOf, type_ref { CurrentSemanticValue.td = new set_type_definition(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 278: // file_type -> tkFile, tkOf, type_ref + case 283: // file_type -> tkFile, tkOf, type_ref { CurrentSemanticValue.td = new file_type(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 279: // file_type -> tkFile + case 284: // file_type -> tkFile { CurrentSemanticValue.td = new file_type(); CurrentSemanticValue.td.source_context = CurrentLocationSpan; } break; - case 280: // string_type -> tkIdentifier, tkSquareOpen, const_expr, tkSquareClose + case 285: // string_type -> tkIdentifier, tkSquareOpen, const_expr, tkSquareClose { CurrentSemanticValue.td = new string_num_definition(ValueStack[ValueStack.Depth-2].ex, ValueStack[ValueStack.Depth-4].id, CurrentLocationSpan); } break; - case 281: // procedural_type -> procedural_type_kind + case 286: // procedural_type -> procedural_type_kind { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 282: // procedural_type_kind -> proc_type_decl + case 287: // procedural_type_kind -> proc_type_decl { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 283: // proc_type_decl -> tkProcedure, fp_list + case 288: // proc_type_decl -> tkProcedure, fp_list { CurrentSemanticValue.td = new procedure_header(ValueStack[ValueStack.Depth-1].stn as formal_parameters,null,null,false,false,null,null,CurrentLocationSpan); } break; - case 284: // proc_type_decl -> tkFunction, fp_list, tkColon, fptype + case 289: // proc_type_decl -> tkFunction, fp_list, tkColon, fptype { CurrentSemanticValue.td = new function_header(ValueStack[ValueStack.Depth-3].stn as formal_parameters, null, null, null, ValueStack[ValueStack.Depth-1].td as type_definition, CurrentLocationSpan); } break; - case 285: // proc_type_decl -> simple_type_identifier, tkArrow, template_param + case 290: // proc_type_decl -> simple_type_identifier, tkArrow, template_param { CurrentSemanticValue.td = new modern_proc_type(ValueStack[ValueStack.Depth-3].td,null,ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 286: // proc_type_decl -> template_type, tkArrow, template_param + case 291: // proc_type_decl -> template_type, tkArrow, template_param { CurrentSemanticValue.td = new modern_proc_type(ValueStack[ValueStack.Depth-3].td,null,ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 287: // proc_type_decl -> tkRoundOpen, tkRoundClose, tkArrow, template_param + case 292: // proc_type_decl -> tkRoundOpen, tkRoundClose, tkArrow, template_param { CurrentSemanticValue.td = new modern_proc_type(null,null,ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 288: // proc_type_decl -> tkRoundOpen, enumeration_id_list, tkRoundClose, tkArrow, + case 293: // proc_type_decl -> tkRoundOpen, enumeration_id_list, tkRoundClose, tkArrow, // template_param { CurrentSemanticValue.td = new modern_proc_type(null,ValueStack[ValueStack.Depth-4].stn as enumerator_list,ValueStack[ValueStack.Depth-1].td,CurrentLocationSpan); } break; - case 289: // proc_type_decl -> simple_type_identifier, tkArrow, tkRoundOpen, tkRoundClose + case 294: // proc_type_decl -> simple_type_identifier, tkArrow, tkRoundOpen, tkRoundClose { CurrentSemanticValue.td = new modern_proc_type(ValueStack[ValueStack.Depth-4].td,null,null,CurrentLocationSpan); } break; - case 290: // proc_type_decl -> template_type, tkArrow, tkRoundOpen, tkRoundClose + case 295: // proc_type_decl -> template_type, tkArrow, tkRoundOpen, tkRoundClose { CurrentSemanticValue.td = new modern_proc_type(ValueStack[ValueStack.Depth-4].td,null,null,CurrentLocationSpan); } break; - case 291: // proc_type_decl -> tkRoundOpen, tkRoundClose, tkArrow, tkRoundOpen, tkRoundClose + case 296: // proc_type_decl -> tkRoundOpen, tkRoundClose, tkArrow, tkRoundOpen, tkRoundClose { CurrentSemanticValue.td = new modern_proc_type(null,null,null,CurrentLocationSpan); } break; - case 292: // proc_type_decl -> tkRoundOpen, enumeration_id_list, tkRoundClose, tkArrow, + case 297: // proc_type_decl -> tkRoundOpen, enumeration_id_list, tkRoundClose, tkArrow, // tkRoundOpen, tkRoundClose { CurrentSemanticValue.td = new modern_proc_type(null,ValueStack[ValueStack.Depth-5].stn as enumerator_list,null,CurrentLocationSpan); } break; - case 293: // object_type -> class_attributes, class_or_interface_keyword, + case 298: // object_type -> class_attributes, class_or_interface_keyword, // optional_base_classes, optional_where_section, // optional_component_list_seq_end { @@ -4128,7 +4182,7 @@ public partial class GPPGParser: ShiftReduceParser tkRecord, optional_base_classes, optional_where_section, + case 299: // record_type -> tkRecord, optional_base_classes, optional_where_section, // member_list_section, tkEnd { var nnrt = new class_definition(ValueStack[ValueStack.Depth-4].stn as named_type_reference_list, ValueStack[ValueStack.Depth-2].stn as class_body_list, class_keyword.Record, null, ValueStack[ValueStack.Depth-3].stn as where_definition_list, class_attribute.None, false, CurrentLocationSpan); @@ -4141,37 +4195,37 @@ public partial class GPPGParser: ShiftReduceParser tkSealed + case 300: // class_attribute -> tkSealed { CurrentSemanticValue.ob = class_attribute.Sealed; } break; - case 296: // class_attribute -> tkPartial + case 301: // class_attribute -> tkPartial { CurrentSemanticValue.ob = class_attribute.Partial; } break; - case 297: // class_attribute -> tkAbstract + case 302: // class_attribute -> tkAbstract { CurrentSemanticValue.ob = class_attribute.Abstract; } break; - case 298: // class_attribute -> tkAuto + case 303: // class_attribute -> tkAuto { CurrentSemanticValue.ob = class_attribute.Auto; } break; - case 299: // class_attribute -> tkStatic + case 304: // class_attribute -> tkStatic { CurrentSemanticValue.ob = class_attribute.Static; } break; - case 300: // class_attributes -> /* empty */ + case 305: // class_attributes -> /* empty */ { CurrentSemanticValue.ob = class_attribute.None; } break; - case 301: // class_attributes -> class_attributes1 + case 306: // class_attributes -> class_attributes1 { CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-1].ob; } break; - case 302: // class_attributes1 -> class_attribute + case 307: // class_attributes1 -> class_attribute { CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-1].ob; } break; - case 303: // class_attributes1 -> class_attributes1, class_attribute + case 308: // class_attributes1 -> class_attributes1, class_attribute { if (((class_attribute)ValueStack[ValueStack.Depth-2].ob & (class_attribute)ValueStack[ValueStack.Depth-1].ob) == (class_attribute)ValueStack[ValueStack.Depth-1].ob) parsertools.AddErrorFromResource("ATTRIBUTE_REDECLARED",LocationStack[LocationStack.Depth-1]); @@ -4179,123 +4233,123 @@ public partial class GPPGParser: ShiftReduceParser tkClass + case 309: // class_or_interface_keyword -> tkClass { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 305: // class_or_interface_keyword -> tkInterface + case 310: // class_or_interface_keyword -> tkInterface { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 306: // class_or_interface_keyword -> tkTemplate + case 311: // class_or_interface_keyword -> tkTemplate { CurrentSemanticValue.ti = NewClassOrInterfaceKeyword(ValueStack[ValueStack.Depth-1].ti); } break; - case 307: // class_or_interface_keyword -> tkTemplate, tkClass + case 312: // class_or_interface_keyword -> tkTemplate, tkClass { CurrentSemanticValue.ti = NewClassOrInterfaceKeyword(ValueStack[ValueStack.Depth-2].ti, "c", CurrentLocationSpan); } break; - case 308: // class_or_interface_keyword -> tkTemplate, tkRecord + case 313: // class_or_interface_keyword -> tkTemplate, tkRecord { CurrentSemanticValue.ti = NewClassOrInterfaceKeyword(ValueStack[ValueStack.Depth-2].ti, "r", CurrentLocationSpan); } break; - case 309: // class_or_interface_keyword -> tkTemplate, tkInterface + case 314: // class_or_interface_keyword -> tkTemplate, tkInterface { CurrentSemanticValue.ti = NewClassOrInterfaceKeyword(ValueStack[ValueStack.Depth-2].ti, "i", CurrentLocationSpan); } break; - case 310: // optional_component_list_seq_end -> /* empty */ + case 315: // optional_component_list_seq_end -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 311: // optional_component_list_seq_end -> member_list_section, tkEnd + case 316: // optional_component_list_seq_end -> member_list_section, tkEnd { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 313: // optional_base_classes -> tkRoundOpen, base_classes_names_list, tkRoundClose + case 318: // optional_base_classes -> tkRoundOpen, base_classes_names_list, tkRoundClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 314: // base_classes_names_list -> base_class_name + case 319: // base_classes_names_list -> base_class_name { CurrentSemanticValue.stn = new named_type_reference_list(ValueStack[ValueStack.Depth-1].stn as named_type_reference, CurrentLocationSpan); } break; - case 315: // base_classes_names_list -> base_classes_names_list, tkComma, base_class_name + case 320: // base_classes_names_list -> base_classes_names_list, tkComma, base_class_name { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as named_type_reference_list).Add(ValueStack[ValueStack.Depth-1].stn as named_type_reference, CurrentLocationSpan); } break; - case 316: // base_class_name -> simple_type_identifier + case 321: // base_class_name -> simple_type_identifier { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].td; } break; - case 317: // base_class_name -> template_type + case 322: // base_class_name -> template_type { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].td; } break; - case 318: // template_arguments -> tkLower, ident_list, tkGreater + case 323: // template_arguments -> tkLower, ident_list, tkGreater { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 319: // optional_where_section -> /* empty */ + case 324: // optional_where_section -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 320: // optional_where_section -> where_part_list + case 325: // optional_where_section -> where_part_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 321: // where_part_list -> where_part + case 326: // where_part_list -> where_part { CurrentSemanticValue.stn = new where_definition_list(ValueStack[ValueStack.Depth-1].stn as where_definition, CurrentLocationSpan); } break; - case 322: // where_part_list -> where_part_list, where_part + case 327: // where_part_list -> where_part_list, where_part { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-2].stn as where_definition_list).Add(ValueStack[ValueStack.Depth-1].stn as where_definition, CurrentLocationSpan); } break; - case 323: // where_part -> tkWhere, ident_list, tkColon, type_ref_and_secific_list, + case 328: // where_part -> tkWhere, ident_list, tkColon, type_ref_and_secific_list, // tkSemiColon { CurrentSemanticValue.stn = new where_definition(ValueStack[ValueStack.Depth-4].stn as ident_list, ValueStack[ValueStack.Depth-2].stn as where_type_specificator_list, CurrentLocationSpan); } break; - case 324: // type_ref_and_secific_list -> type_ref_or_secific + case 329: // type_ref_and_secific_list -> type_ref_or_secific { CurrentSemanticValue.stn = new where_type_specificator_list(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 325: // type_ref_and_secific_list -> type_ref_and_secific_list, tkComma, + case 330: // type_ref_and_secific_list -> type_ref_and_secific_list, tkComma, // type_ref_or_secific { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as where_type_specificator_list).Add(ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 326: // type_ref_or_secific -> type_ref + case 331: // type_ref_or_secific -> type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 327: // type_ref_or_secific -> tkClass + case 332: // type_ref_or_secific -> tkClass { CurrentSemanticValue.td = new declaration_specificator(DeclarationSpecificator.WhereDefClass, ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 328: // type_ref_or_secific -> tkRecord + case 333: // type_ref_or_secific -> tkRecord { CurrentSemanticValue.td = new declaration_specificator(DeclarationSpecificator.WhereDefValueType, ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 329: // type_ref_or_secific -> tkConstructor + case 334: // type_ref_or_secific -> tkConstructor { CurrentSemanticValue.td = new declaration_specificator(DeclarationSpecificator.WhereDefConstructor, ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 330: // member_list_section -> member_list + case 335: // member_list_section -> member_list { CurrentSemanticValue.stn = new class_body_list(ValueStack[ValueStack.Depth-1].stn as class_members, CurrentLocationSpan); } break; - case 331: // member_list_section -> member_list_section, ot_visibility_specifier, + case 336: // member_list_section -> member_list_section, ot_visibility_specifier, // member_list { (ValueStack[ValueStack.Depth-1].stn as class_members).access_mod = ValueStack[ValueStack.Depth-2].stn as access_modifer_node; @@ -4307,121 +4361,121 @@ public partial class GPPGParser: ShiftReduceParser tkInternal + case 337: // ot_visibility_specifier -> tkInternal { CurrentSemanticValue.stn = new access_modifer_node(access_modifer.internal_modifer, CurrentLocationSpan); } break; - case 333: // ot_visibility_specifier -> tkPublic + case 338: // ot_visibility_specifier -> tkPublic { CurrentSemanticValue.stn = new access_modifer_node(access_modifer.public_modifer, CurrentLocationSpan); } break; - case 334: // ot_visibility_specifier -> tkProtected + case 339: // ot_visibility_specifier -> tkProtected { CurrentSemanticValue.stn = new access_modifer_node(access_modifer.protected_modifer, CurrentLocationSpan); } break; - case 335: // ot_visibility_specifier -> tkPrivate + case 340: // ot_visibility_specifier -> tkPrivate { CurrentSemanticValue.stn = new access_modifer_node(access_modifer.private_modifer, CurrentLocationSpan); } break; - case 336: // member_list -> /* empty */ + case 341: // member_list -> /* empty */ { CurrentSemanticValue.stn = new class_members(); } break; - case 337: // member_list -> field_or_const_definition_list, optional_semicolon + case 342: // member_list -> field_or_const_definition_list, optional_semicolon { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 338: // member_list -> method_decl_list + case 343: // member_list -> method_decl_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 339: // member_list -> field_or_const_definition_list, tkSemiColon, method_decl_list + case 344: // member_list -> field_or_const_definition_list, tkSemiColon, method_decl_list { (ValueStack[ValueStack.Depth-3].stn as class_members).members.AddRange((ValueStack[ValueStack.Depth-1].stn as class_members).members); (ValueStack[ValueStack.Depth-3].stn as class_members).source_context = CurrentLocationSpan; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-3].stn; } break; - case 340: // ident_list -> identifier + case 345: // ident_list -> identifier { CurrentSemanticValue.stn = new ident_list(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 341: // ident_list -> ident_list, tkComma, identifier + case 346: // ident_list -> ident_list, tkComma, identifier { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as ident_list).Add(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 342: // optional_semicolon -> /* empty */ + case 347: // optional_semicolon -> /* empty */ { CurrentSemanticValue.ob = null; } break; - case 343: // optional_semicolon -> tkSemiColon + case 348: // optional_semicolon -> tkSemiColon { CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-1].ti; } break; - case 344: // field_or_const_definition_list -> field_or_const_definition + case 349: // field_or_const_definition_list -> field_or_const_definition { CurrentSemanticValue.stn = new class_members(ValueStack[ValueStack.Depth-1].stn as declaration, CurrentLocationSpan); } break; - case 345: // field_or_const_definition_list -> field_or_const_definition_list, tkSemiColon, + case 350: // field_or_const_definition_list -> field_or_const_definition_list, tkSemiColon, // field_or_const_definition { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as class_members).Add(ValueStack[ValueStack.Depth-1].stn as declaration, CurrentLocationSpan); } break; - case 346: // field_or_const_definition -> attribute_declarations, + case 351: // field_or_const_definition -> attribute_declarations, // simple_field_or_const_definition { (ValueStack[ValueStack.Depth-1].stn as declaration).attributes = ValueStack[ValueStack.Depth-2].stn as attribute_list; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 347: // method_decl_list -> method_or_property_decl + case 352: // method_decl_list -> method_or_property_decl { CurrentSemanticValue.stn = new class_members(ValueStack[ValueStack.Depth-1].stn as declaration, CurrentLocationSpan); } break; - case 348: // method_decl_list -> method_decl_list, method_or_property_decl + case 353: // method_decl_list -> method_decl_list, method_or_property_decl { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-2].stn as class_members).Add(ValueStack[ValueStack.Depth-1].stn as declaration, CurrentLocationSpan); } break; - case 349: // method_or_property_decl -> method_decl_withattr + case 354: // method_or_property_decl -> method_decl_withattr { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 350: // method_or_property_decl -> property_definition + case 355: // method_or_property_decl -> property_definition { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 351: // simple_field_or_const_definition -> tkConst, only_const_decl + case 356: // simple_field_or_const_definition -> tkConst, only_const_decl { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 352: // simple_field_or_const_definition -> field_definition + case 357: // simple_field_or_const_definition -> field_definition { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 353: // simple_field_or_const_definition -> class_or_static, field_definition + case 358: // simple_field_or_const_definition -> class_or_static, field_definition { (ValueStack[ValueStack.Depth-1].stn as var_def_statement).var_attr = definition_attribute.Static; (ValueStack[ValueStack.Depth-1].stn as var_def_statement).source_context = CurrentLocationSpan; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 354: // class_or_static -> tkStatic + case 359: // class_or_static -> tkStatic { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 355: // class_or_static -> tkClass + case 360: // class_or_static -> tkClass { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 356: // field_definition -> var_decl_part + case 361: // field_definition -> var_decl_part { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 357: // field_definition -> tkEvent, ident_list, tkColon, type_ref + case 362: // field_definition -> tkEvent, ident_list, tkColon, type_ref { CurrentSemanticValue.stn = new var_def_statement(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, null, definition_attribute.None, true, CurrentLocationSpan); } break; - case 358: // method_decl_withattr -> attribute_declarations, method_header + case 363: // method_decl_withattr -> attribute_declarations, method_header { (ValueStack[ValueStack.Depth-1].td as declaration).attributes = ValueStack[ValueStack.Depth-2].stn as attribute_list; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].td; } break; - case 359: // method_decl_withattr -> attribute_declarations, method_decl + case 364: // method_decl_withattr -> attribute_declarations, method_decl { (ValueStack[ValueStack.Depth-1].stn as declaration).attributes = ValueStack[ValueStack.Depth-2].stn as attribute_list; if (ValueStack[ValueStack.Depth-1].stn is procedure_definition && (ValueStack[ValueStack.Depth-1].stn as procedure_definition).proc_header != null) @@ -4429,88 +4483,88 @@ public partial class GPPGParser: ShiftReduceParser inclass_proc_func_decl + case 365: // method_decl -> inclass_proc_func_decl { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 361: // method_decl -> inclass_constr_destr_decl + case 366: // method_decl -> inclass_constr_destr_decl { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 362: // method_header -> class_or_static, method_procfunc_header + case 367: // method_header -> class_or_static, method_procfunc_header { (ValueStack[ValueStack.Depth-1].td as procedure_header).class_keyword = true; CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 363: // method_header -> method_procfunc_header + case 368: // method_header -> method_procfunc_header { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 364: // method_header -> constr_destr_header + case 369: // method_header -> constr_destr_header { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 365: // method_procfunc_header -> proc_func_header + case 370: // method_procfunc_header -> proc_func_header { CurrentSemanticValue.td = NewProcfuncHeading(ValueStack[ValueStack.Depth-1].td as procedure_header); } break; - case 366: // proc_func_header -> proc_header + case 371: // proc_func_header -> proc_header { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 367: // proc_func_header -> func_header + case 372: // proc_func_header -> func_header { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 368: // constr_destr_header -> tkConstructor, optional_proc_name, fp_list, + case 373: // constr_destr_header -> tkConstructor, optional_proc_name, fp_list, // optional_method_modificators { CurrentSemanticValue.td = new constructor(null,ValueStack[ValueStack.Depth-2].stn as formal_parameters,ValueStack[ValueStack.Depth-1].stn as procedure_attributes_list,ValueStack[ValueStack.Depth-3].stn as method_name,false,false,null,null,CurrentLocationSpan); } break; - case 369: // constr_destr_header -> class_or_static, tkConstructor, optional_proc_name, + case 374: // constr_destr_header -> class_or_static, tkConstructor, optional_proc_name, // fp_list, optional_method_modificators { CurrentSemanticValue.td = new constructor(null,ValueStack[ValueStack.Depth-2].stn as formal_parameters,ValueStack[ValueStack.Depth-1].stn as procedure_attributes_list,ValueStack[ValueStack.Depth-3].stn as method_name,false,true,null,null,CurrentLocationSpan); } break; - case 370: // constr_destr_header -> tkDestructor, optional_proc_name, fp_list, + case 375: // constr_destr_header -> tkDestructor, optional_proc_name, fp_list, // optional_method_modificators { CurrentSemanticValue.td = new destructor(null,ValueStack[ValueStack.Depth-2].stn as formal_parameters,ValueStack[ValueStack.Depth-1].stn as procedure_attributes_list,ValueStack[ValueStack.Depth-3].stn as method_name, false,false,null,null,CurrentLocationSpan); } break; - case 371: // optional_proc_name -> proc_name + case 376: // optional_proc_name -> proc_name { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 372: // optional_proc_name -> /* empty */ + case 377: // optional_proc_name -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 373: // qualified_identifier -> identifier + case 378: // qualified_identifier -> identifier { CurrentSemanticValue.stn = new method_name(null,null,ValueStack[ValueStack.Depth-1].id,null,CurrentLocationSpan); } break; - case 374: // qualified_identifier -> visibility_specifier + case 379: // qualified_identifier -> visibility_specifier { CurrentSemanticValue.stn = new method_name(null,null,ValueStack[ValueStack.Depth-1].id,null,CurrentLocationSpan); } break; - case 375: // qualified_identifier -> qualified_identifier, tkPoint, identifier + case 380: // qualified_identifier -> qualified_identifier, tkPoint, identifier { CurrentSemanticValue.stn = NewQualifiedIdentifier(ValueStack[ValueStack.Depth-3].stn as method_name, ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 376: // qualified_identifier -> qualified_identifier, tkPoint, visibility_specifier + case 381: // qualified_identifier -> qualified_identifier, tkPoint, visibility_specifier { CurrentSemanticValue.stn = NewQualifiedIdentifier(ValueStack[ValueStack.Depth-3].stn as method_name, ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 377: // property_definition -> attribute_declarations, simple_property_definition + case 382: // property_definition -> attribute_declarations, simple_property_definition { CurrentSemanticValue.stn = NewPropertyDefinition(ValueStack[ValueStack.Depth-2].stn as attribute_list, ValueStack[ValueStack.Depth-1].stn as declaration, LocationStack[LocationStack.Depth-1]); } break; - case 378: // simple_property_definition -> tkProperty, qualified_identifier, + case 383: // simple_property_definition -> tkProperty, qualified_identifier, // property_interface, property_specifiers, // tkSemiColon, array_defaultproperty { CurrentSemanticValue.stn = NewSimplePropertyDefinition(ValueStack[ValueStack.Depth-5].stn as method_name, ValueStack[ValueStack.Depth-4].stn as property_interface, ValueStack[ValueStack.Depth-3].stn as property_accessors, proc_attribute.attr_none, ValueStack[ValueStack.Depth-1].stn as property_array_default, CurrentLocationSpan); } break; - case 379: // simple_property_definition -> tkProperty, qualified_identifier, + case 384: // simple_property_definition -> tkProperty, qualified_identifier, // property_interface, property_specifiers, // tkSemiColon, property_modificator, tkSemiColon, // array_defaultproperty @@ -4525,7 +4579,7 @@ public partial class GPPGParser: ShiftReduceParser class_or_static, tkProperty, qualified_identifier, + case 385: // simple_property_definition -> class_or_static, tkProperty, qualified_identifier, // property_interface, property_specifiers, // tkSemiColon, array_defaultproperty { @@ -4533,7 +4587,7 @@ public partial class GPPGParser: ShiftReduceParser class_or_static, tkProperty, qualified_identifier, + case 386: // simple_property_definition -> class_or_static, tkProperty, qualified_identifier, // property_interface, property_specifiers, // tkSemiColon, property_modificator, tkSemiColon, // array_defaultproperty @@ -4541,7 +4595,7 @@ public partial class GPPGParser: ShiftReduceParser tkAuto, tkProperty, qualified_identifier, + case 387: // simple_property_definition -> tkAuto, tkProperty, qualified_identifier, // property_interface, // optional_property_initialization, tkSemiColon { @@ -4550,7 +4604,7 @@ public partial class GPPGParser: ShiftReduceParser class_or_static, tkAuto, tkProperty, + case 388: // simple_property_definition -> class_or_static, tkAuto, tkProperty, // qualified_identifier, property_interface, // optional_property_initialization, tkSemiColon { @@ -4560,54 +4614,54 @@ public partial class GPPGParser: ShiftReduceParser tkAssign, expr + case 389: // optional_property_initialization -> tkAssign, expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 385: // optional_property_initialization -> /* empty */ + case 390: // optional_property_initialization -> /* empty */ { CurrentSemanticValue.ex = null; } break; - case 386: // array_defaultproperty -> /* empty */ + case 391: // array_defaultproperty -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 387: // array_defaultproperty -> tkDefault, tkSemiColon + case 392: // array_defaultproperty -> tkDefault, tkSemiColon { CurrentSemanticValue.stn = new property_array_default(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 388: // property_interface -> property_parameter_list, tkColon, fptype + case 393: // property_interface -> property_parameter_list, tkColon, fptype { CurrentSemanticValue.stn = new property_interface(ValueStack[ValueStack.Depth-3].stn as property_parameter_list, ValueStack[ValueStack.Depth-1].td, null, CurrentLocationSpan); } break; - case 389: // property_parameter_list -> /* empty */ + case 394: // property_parameter_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 390: // property_parameter_list -> tkSquareOpen, parameter_decl_list, tkSquareClose + case 395: // property_parameter_list -> tkSquareOpen, parameter_decl_list, tkSquareClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 391: // parameter_decl_list -> parameter_decl + case 396: // parameter_decl_list -> parameter_decl { CurrentSemanticValue.stn = new property_parameter_list(ValueStack[ValueStack.Depth-1].stn as property_parameter, CurrentLocationSpan); } break; - case 392: // parameter_decl_list -> parameter_decl_list, tkSemiColon, parameter_decl + case 397: // parameter_decl_list -> parameter_decl_list, tkSemiColon, parameter_decl { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as property_parameter_list).Add(ValueStack[ValueStack.Depth-1].stn as property_parameter, CurrentLocationSpan); } break; - case 393: // parameter_decl -> ident_list, tkColon, fptype + case 398: // parameter_decl -> ident_list, tkColon, fptype { CurrentSemanticValue.stn = new property_parameter(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 394: // optional_read_expr -> expr_with_func_decl_lambda + case 399: // optional_read_expr -> expr_with_func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 395: // optional_read_expr -> /* empty */ + case 400: // optional_read_expr -> /* empty */ { CurrentSemanticValue.ex = null; } break; - case 397: // property_specifiers -> tkRead, optional_read_expr, write_property_specifiers + case 402: // property_specifiers -> tkRead, optional_read_expr, write_property_specifiers { if (ValueStack[ValueStack.Depth-2].ex == null || ValueStack[ValueStack.Depth-2].ex is ident) // ����������� �������� { @@ -4623,7 +4677,7 @@ public partial class GPPGParser: ShiftReduceParser tkWrite, unlabelled_stmt, read_property_specifiers + case 403: // property_specifiers -> tkWrite, unlabelled_stmt, read_property_specifiers { if (ValueStack[ValueStack.Depth-2].stn is empty_statement) { @@ -4647,7 +4701,7 @@ public partial class GPPGParser: ShiftReduceParser tkWrite, unlabelled_stmt + case 405: // write_property_specifiers -> tkWrite, unlabelled_stmt { if (ValueStack[ValueStack.Depth-1].stn is empty_statement) { @@ -4670,7 +4724,7 @@ public partial class GPPGParser: ShiftReduceParser tkRead, optional_read_expr + case 407: // read_property_specifiers -> tkRead, optional_read_expr { if (ValueStack[ValueStack.Depth-1].ex == null || ValueStack[ValueStack.Depth-1].ex is ident) { @@ -4686,29 +4740,29 @@ public partial class GPPGParser: ShiftReduceParser var_decl_part, tkSemiColon + case 408: // var_decl -> var_decl_part, tkSemiColon { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 406: // var_decl_part -> ident_list, tkColon, type_ref + case 411: // var_decl_part -> ident_list, tkColon, type_ref { CurrentSemanticValue.stn = new var_def_statement(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, null, definition_attribute.None, false, CurrentLocationSpan); } break; - case 407: // var_decl_part -> ident_list, tkAssign, expr_with_func_decl_lambda + case 412: // var_decl_part -> ident_list, tkAssign, expr_with_func_decl_lambda { CurrentSemanticValue.stn = new var_def_statement(ValueStack[ValueStack.Depth-3].stn as ident_list, null, ValueStack[ValueStack.Depth-1].ex, definition_attribute.None, false, CurrentLocationSpan); } break; - case 408: // var_decl_part -> ident_list, tkColon, type_ref, tkAssignOrEqual, + case 413: // var_decl_part -> ident_list, tkColon, type_ref, tkAssignOrEqual, // typed_var_init_expression { CurrentSemanticValue.stn = new var_def_statement(ValueStack[ValueStack.Depth-5].stn as ident_list, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].ex, definition_attribute.None, false, CurrentLocationSpan); } break; - case 409: // typed_var_init_expression -> typed_const_plus + case 414: // typed_var_init_expression -> typed_const_plus { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 410: // typed_var_init_expression -> const_simple_expr, tkDotDot, const_term + case 415: // typed_var_init_expression -> const_simple_expr, tkDotDot, const_term { if (parsertools.build_tree_for_formatter) CurrentSemanticValue.ex = new diapason_expr(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); @@ -4716,23 +4770,23 @@ public partial class GPPGParser: ShiftReduceParser expl_func_decl_lambda + case 416: // typed_var_init_expression -> expl_func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 412: // typed_var_init_expression -> identifier, tkArrow, lambda_function_body + case 417: // typed_var_init_expression -> identifier, tkArrow, lambda_function_body { var idList = new ident_list(ValueStack[ValueStack.Depth-3].id, LocationStack[LocationStack.Depth-3]); var formalPars = new formal_parameters(new typed_parameters(idList, new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), LocationStack[LocationStack.Depth-3]), parametr_kind.none, null, LocationStack[LocationStack.Depth-3]), LocationStack[LocationStack.Depth-3]); CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), formalPars, new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), LocationStack[LocationStack.Depth-3]), ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 413: // typed_var_init_expression -> tkRoundOpen, tkRoundClose, lambda_type_ref, + case 418: // typed_var_init_expression -> tkRoundOpen, tkRoundClose, lambda_type_ref, // tkArrow, lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, CurrentLocationSpan); } break; - case 414: // typed_var_init_expression -> tkRoundOpen, typed_const_list, tkRoundClose, + case 419: // typed_var_init_expression -> tkRoundOpen, typed_const_list, tkRoundClose, // tkArrow, lambda_function_body { var el = ValueStack[ValueStack.Depth-4].stn as expression_list; @@ -4754,18 +4808,18 @@ public partial class GPPGParser: ShiftReduceParser typed_const + case 420: // typed_const_plus -> typed_const { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 416: // typed_const_plus -> default_expr + case 421: // typed_const_plus -> default_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 417: // constr_destr_decl -> constr_destr_header, block + case 422: // constr_destr_decl -> constr_destr_header, block { CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-2].td as procedure_header, ValueStack[ValueStack.Depth-1].stn as block, CurrentLocationSpan); } break; - case 418: // constr_destr_decl -> tkConstructor, optional_proc_name, fp_list, tkAssign, + case 423: // constr_destr_decl -> tkConstructor, optional_proc_name, fp_list, tkAssign, // unlabelled_stmt, tkSemiColon { if (ValueStack[ValueStack.Depth-2].stn is empty_statement) @@ -4776,7 +4830,7 @@ public partial class GPPGParser: ShiftReduceParser class_or_static, tkConstructor, optional_proc_name, + case 424: // constr_destr_decl -> class_or_static, tkConstructor, optional_proc_name, // fp_list, tkAssign, unlabelled_stmt, tkSemiColon { if (ValueStack[ValueStack.Depth-2].stn is empty_statement) @@ -4787,12 +4841,12 @@ public partial class GPPGParser: ShiftReduceParser constr_destr_header, inclass_block + case 425: // inclass_constr_destr_decl -> constr_destr_header, inclass_block { CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-2].td as procedure_header, ValueStack[ValueStack.Depth-1].stn as block, CurrentLocationSpan); } break; - case 421: // inclass_constr_destr_decl -> tkConstructor, optional_proc_name, fp_list, + case 426: // inclass_constr_destr_decl -> tkConstructor, optional_proc_name, fp_list, // tkAssign, unlabelled_stmt, tkSemiColon { if (ValueStack[ValueStack.Depth-2].stn is empty_statement) @@ -4803,7 +4857,7 @@ public partial class GPPGParser: ShiftReduceParser class_or_static, tkConstructor, optional_proc_name, + case 427: // inclass_constr_destr_decl -> class_or_static, tkConstructor, optional_proc_name, // fp_list, tkAssign, unlabelled_stmt, tkSemiColon { if (ValueStack[ValueStack.Depth-2].stn is empty_statement) @@ -4814,28 +4868,28 @@ public partial class GPPGParser: ShiftReduceParser proc_func_decl_noclass + case 428: // proc_func_decl -> proc_func_decl_noclass { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 424: // proc_func_decl -> class_or_static, proc_func_decl_noclass + case 429: // proc_func_decl -> class_or_static, proc_func_decl_noclass { (ValueStack[ValueStack.Depth-1].stn as procedure_definition).proc_header.class_keyword = true; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 425: // proc_func_decl_noclass -> proc_func_header, proc_func_external_block + case 430: // proc_func_decl_noclass -> proc_func_header, proc_func_external_block { CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-2].td as procedure_header, ValueStack[ValueStack.Depth-1].stn as proc_block, CurrentLocationSpan); } break; - case 426: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, fptype, + case 431: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, fptype, // optional_method_modificators1, tkAssign, expr_l1, // tkSemiColon { CurrentSemanticValue.stn = SyntaxTreeBuilder.BuildShortFuncDefinition(ValueStack[ValueStack.Depth-7].stn as formal_parameters, ValueStack[ValueStack.Depth-4].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-8].stn as method_name, ValueStack[ValueStack.Depth-5].td as type_definition, ValueStack[ValueStack.Depth-2].ex, LocationStack[LocationStack.Depth-9].Merge(LocationStack[LocationStack.Depth-4])); } break; - case 427: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, + case 432: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, // optional_method_modificators1, tkAssign, expr_l1, // tkSemiColon { @@ -4845,21 +4899,21 @@ public partial class GPPGParser: ShiftReduceParser tkFunction, func_name, fp_list, tkColon, fptype, + case 433: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, fptype, // optional_method_modificators1, tkAssign, // func_decl_lambda, tkSemiColon { CurrentSemanticValue.stn = SyntaxTreeBuilder.BuildShortFuncDefinition(ValueStack[ValueStack.Depth-7].stn as formal_parameters, ValueStack[ValueStack.Depth-4].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-8].stn as method_name, ValueStack[ValueStack.Depth-5].td as type_definition, ValueStack[ValueStack.Depth-2].ex, LocationStack[LocationStack.Depth-9].Merge(LocationStack[LocationStack.Depth-4])); } break; - case 429: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, + case 434: // proc_func_decl_noclass -> tkFunction, func_name, fp_list, // optional_method_modificators1, tkAssign, // func_decl_lambda, tkSemiColon { CurrentSemanticValue.stn = SyntaxTreeBuilder.BuildShortFuncDefinition(ValueStack[ValueStack.Depth-5].stn as formal_parameters, ValueStack[ValueStack.Depth-4].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-6].stn as method_name, null, ValueStack[ValueStack.Depth-2].ex, LocationStack[LocationStack.Depth-7].Merge(LocationStack[LocationStack.Depth-4])); } break; - case 430: // proc_func_decl_noclass -> tkProcedure, proc_name, fp_list, + case 435: // proc_func_decl_noclass -> tkProcedure, proc_name, fp_list, // optional_method_modificators1, tkAssign, // unlabelled_stmt, tkSemiColon { @@ -4868,30 +4922,30 @@ public partial class GPPGParser: ShiftReduceParser proc_func_header, tkForward, tkSemiColon + case 436: // proc_func_decl_noclass -> proc_func_header, tkForward, tkSemiColon { CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-3].td as procedure_header, null, CurrentLocationSpan); (CurrentSemanticValue.stn as procedure_definition).proc_header.proc_attributes.Add((procedure_attribute)ValueStack[ValueStack.Depth-2].id, ValueStack[ValueStack.Depth-2].id.source_context); } break; - case 432: // inclass_proc_func_decl -> inclass_proc_func_decl_noclass + case 437: // inclass_proc_func_decl -> inclass_proc_func_decl_noclass { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 433: // inclass_proc_func_decl -> class_or_static, inclass_proc_func_decl_noclass + case 438: // inclass_proc_func_decl -> class_or_static, inclass_proc_func_decl_noclass { if ((ValueStack[ValueStack.Depth-1].stn as procedure_definition).proc_header != null) (ValueStack[ValueStack.Depth-1].stn as procedure_definition).proc_header.class_keyword = true; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 434: // inclass_proc_func_decl_noclass -> proc_func_header, inclass_block + case 439: // inclass_proc_func_decl_noclass -> proc_func_header, inclass_block { CurrentSemanticValue.stn = new procedure_definition(ValueStack[ValueStack.Depth-2].td as procedure_header, ValueStack[ValueStack.Depth-1].stn as proc_block, CurrentLocationSpan); } break; - case 435: // inclass_proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, + case 440: // inclass_proc_func_decl_noclass -> tkFunction, func_name, fp_list, tkColon, // fptype, optional_method_modificators1, // tkAssign, expr_l1_func_decl_lambda, // tkSemiColon @@ -4901,7 +4955,7 @@ public partial class GPPGParser: ShiftReduceParser tkFunction, func_name, fp_list, + case 441: // inclass_proc_func_decl_noclass -> tkFunction, func_name, fp_list, // optional_method_modificators1, tkAssign, // expr_l1_func_decl_lambda, tkSemiColon { @@ -4910,7 +4964,7 @@ public partial class GPPGParser: ShiftReduceParser tkProcedure, proc_name, fp_list, + case 442: // inclass_proc_func_decl_noclass -> tkProcedure, proc_name, fp_list, // optional_method_modificators1, tkAssign, // unlabelled_stmt, tkSemiColon { @@ -4919,21 +4973,21 @@ public partial class GPPGParser: ShiftReduceParser block + case 443: // proc_func_external_block -> block { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 439: // proc_func_external_block -> external_block + case 444: // proc_func_external_block -> external_block { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 440: // proc_name -> func_name + case 445: // proc_name -> func_name { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 441: // func_name -> func_meth_name_ident + case 446: // func_name -> func_meth_name_ident { CurrentSemanticValue.stn = new method_name(null,null, ValueStack[ValueStack.Depth-1].id, null, CurrentLocationSpan); } break; - case 442: // func_name -> func_class_name_ident_list, tkPoint, func_meth_name_ident + case 447: // func_name -> func_class_name_ident_list, tkPoint, func_meth_name_ident { var ln = ValueStack[ValueStack.Depth-3].ob as List; var cnt = ln.Count; @@ -4943,290 +4997,290 @@ public partial class GPPGParser: ShiftReduceParser func_name_with_template_args + case 448: // func_class_name_ident -> func_name_with_template_args { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 444: // func_class_name_ident_list -> func_class_name_ident + case 449: // func_class_name_ident_list -> func_class_name_ident { CurrentSemanticValue.ob = new List(); (CurrentSemanticValue.ob as List).Add(ValueStack[ValueStack.Depth-1].id); } break; - case 445: // func_class_name_ident_list -> func_class_name_ident_list, tkPoint, + case 450: // func_class_name_ident_list -> func_class_name_ident_list, tkPoint, // func_class_name_ident { (ValueStack[ValueStack.Depth-3].ob as List).Add(ValueStack[ValueStack.Depth-1].id); CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-3].ob; } break; - case 446: // func_meth_name_ident -> func_name_with_template_args + case 451: // func_meth_name_ident -> func_name_with_template_args { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 447: // func_meth_name_ident -> operator_name_ident + case 452: // func_meth_name_ident -> operator_name_ident { CurrentSemanticValue.id = (ident)ValueStack[ValueStack.Depth-1].ex; } break; - case 448: // func_meth_name_ident -> operator_name_ident, template_arguments + case 453: // func_meth_name_ident -> operator_name_ident, template_arguments { CurrentSemanticValue.id = new template_operator_name(null, ValueStack[ValueStack.Depth-1].stn as ident_list, ValueStack[ValueStack.Depth-2].ex as operator_name_ident, CurrentLocationSpan); } break; - case 449: // func_name_with_template_args -> func_name_ident + case 454: // func_name_with_template_args -> func_name_ident { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 450: // func_name_with_template_args -> func_name_ident, template_arguments + case 455: // func_name_with_template_args -> func_name_ident, template_arguments { CurrentSemanticValue.id = new template_type_name(ValueStack[ValueStack.Depth-2].id.name, ValueStack[ValueStack.Depth-1].stn as ident_list, CurrentLocationSpan); } break; - case 451: // func_name_ident -> identifier + case 456: // func_name_ident -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 452: // proc_header -> tkProcedure, proc_name, fp_list, optional_method_modificators, + case 457: // proc_header -> tkProcedure, proc_name, fp_list, optional_method_modificators, // optional_where_section { CurrentSemanticValue.td = new procedure_header(ValueStack[ValueStack.Depth-3].stn as formal_parameters, ValueStack[ValueStack.Depth-2].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-4].stn as method_name, ValueStack[ValueStack.Depth-1].stn as where_definition_list, CurrentLocationSpan); } break; - case 453: // func_header -> tkFunction, func_name, fp_list, optional_method_modificators, + case 458: // func_header -> tkFunction, func_name, fp_list, optional_method_modificators, // optional_where_section { CurrentSemanticValue.td = new function_header(ValueStack[ValueStack.Depth-3].stn as formal_parameters, ValueStack[ValueStack.Depth-2].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-4].stn as method_name, ValueStack[ValueStack.Depth-1].stn as where_definition_list, null, CurrentLocationSpan); } break; - case 454: // func_header -> tkFunction, func_name, fp_list, tkColon, fptype, + case 459: // func_header -> tkFunction, func_name, fp_list, tkColon, fptype, // optional_method_modificators, optional_where_section { CurrentSemanticValue.td = new function_header(ValueStack[ValueStack.Depth-5].stn as formal_parameters, ValueStack[ValueStack.Depth-2].stn as procedure_attributes_list, ValueStack[ValueStack.Depth-6].stn as method_name, ValueStack[ValueStack.Depth-1].stn as where_definition_list, ValueStack[ValueStack.Depth-3].td as type_definition, CurrentLocationSpan); } break; - case 455: // external_block -> tkExternal, external_directive_ident, tkName, + case 460: // external_block -> tkExternal, external_directive_ident, tkName, // external_directive_ident, tkSemiColon { CurrentSemanticValue.stn = new external_directive(ValueStack[ValueStack.Depth-4].ex, ValueStack[ValueStack.Depth-2].ex, CurrentLocationSpan); } break; - case 456: // external_block -> tkExternal, external_directive_ident, tkSemiColon + case 461: // external_block -> tkExternal, external_directive_ident, tkSemiColon { CurrentSemanticValue.stn = new external_directive(ValueStack[ValueStack.Depth-2].ex, null, CurrentLocationSpan); } break; - case 457: // external_block -> tkExternal, tkSemiColon + case 462: // external_block -> tkExternal, tkSemiColon { CurrentSemanticValue.stn = new external_directive(null, null, CurrentLocationSpan); } break; - case 458: // external_directive_ident -> identifier + case 463: // external_directive_ident -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 459: // external_directive_ident -> literal + case 464: // external_directive_ident -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 460: // block -> decl_sect_list, compound_stmt, tkSemiColon + case 465: // block -> decl_sect_list, compound_stmt, tkSemiColon { CurrentSemanticValue.stn = new block(ValueStack[ValueStack.Depth-3].stn as declarations, ValueStack[ValueStack.Depth-2].stn as statement_list, CurrentLocationSpan); } break; - case 461: // inclass_block -> inclass_decl_sect_list, compound_stmt, tkSemiColon + case 466: // inclass_block -> inclass_decl_sect_list, compound_stmt, tkSemiColon { CurrentSemanticValue.stn = new block(ValueStack[ValueStack.Depth-3].stn as declarations, ValueStack[ValueStack.Depth-2].stn as statement_list, CurrentLocationSpan); } break; - case 462: // inclass_block -> external_block + case 467: // inclass_block -> external_block { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 463: // fp_list -> /* empty */ + case 468: // fp_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 464: // fp_list -> tkRoundOpen, tkRoundClose + case 469: // fp_list -> tkRoundOpen, tkRoundClose { CurrentSemanticValue.stn = null; } break; - case 465: // fp_list -> tkRoundOpen, fp_sect_list, tkRoundClose + case 470: // fp_list -> tkRoundOpen, fp_sect_list, tkRoundClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; if (CurrentSemanticValue.stn != null) CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 466: // fp_sect_list -> fp_sect + case 471: // fp_sect_list -> fp_sect { CurrentSemanticValue.stn = new formal_parameters(ValueStack[ValueStack.Depth-1].stn as typed_parameters, CurrentLocationSpan); } break; - case 467: // fp_sect_list -> fp_sect_list, tkSemiColon, fp_sect + case 472: // fp_sect_list -> fp_sect_list, tkSemiColon, fp_sect { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as formal_parameters).Add(ValueStack[ValueStack.Depth-1].stn as typed_parameters, CurrentLocationSpan); } break; - case 468: // fp_sect -> attribute_declarations, simple_fp_sect + case 473: // fp_sect -> attribute_declarations, simple_fp_sect { (ValueStack[ValueStack.Depth-1].stn as declaration).attributes = ValueStack[ValueStack.Depth-2].stn as attribute_list; CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 469: // simple_fp_sect -> param_name_list, tkColon, fptype + case 474: // simple_fp_sect -> param_name_list, tkColon, fptype { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, parametr_kind.none, null, CurrentLocationSpan); } break; - case 470: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype + case 475: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, parametr_kind.var_parametr, null, CurrentLocationSpan); } break; - case 471: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype + case 476: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td, parametr_kind.const_parametr, null, CurrentLocationSpan); } break; - case 472: // simple_fp_sect -> tkParams, param_name_list, tkColon, fptype + case 477: // simple_fp_sect -> tkParams, param_name_list, tkColon, fptype { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-3].stn as ident_list, ValueStack[ValueStack.Depth-1].td,parametr_kind.params_parametr,null, CurrentLocationSpan); } break; - case 473: // simple_fp_sect -> param_name_list, tkColon, fptype, tkAssign, expr + case 478: // simple_fp_sect -> param_name_list, tkColon, fptype, tkAssign, expr { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-5].stn as ident_list, ValueStack[ValueStack.Depth-3].td, parametr_kind.none, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 474: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype, tkAssign, expr + case 479: // simple_fp_sect -> tkVar, param_name_list, tkColon, fptype, tkAssign, expr { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-5].stn as ident_list, ValueStack[ValueStack.Depth-3].td, parametr_kind.var_parametr, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 475: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype, tkAssign, expr + case 480: // simple_fp_sect -> tkConst, param_name_list, tkColon, fptype, tkAssign, expr { CurrentSemanticValue.stn = new typed_parameters(ValueStack[ValueStack.Depth-5].stn as ident_list, ValueStack[ValueStack.Depth-3].td, parametr_kind.const_parametr, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 476: // param_name_list -> param_name + case 481: // param_name_list -> param_name { CurrentSemanticValue.stn = new ident_list(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 477: // param_name_list -> param_name_list, tkComma, param_name + case 482: // param_name_list -> param_name_list, tkComma, param_name { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as ident_list).Add(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 478: // param_name -> identifier + case 483: // param_name -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 479: // fptype -> type_ref + case 484: // fptype -> type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 480: // fptype_noproctype -> simple_type + case 485: // fptype_noproctype -> simple_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 481: // fptype_noproctype -> string_type + case 486: // fptype_noproctype -> string_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 482: // fptype_noproctype -> pointer_type + case 487: // fptype_noproctype -> pointer_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 483: // fptype_noproctype -> structured_type + case 488: // fptype_noproctype -> structured_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 484: // fptype_noproctype -> template_type + case 489: // fptype_noproctype -> template_type { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 485: // stmt -> unlabelled_stmt + case 490: // stmt -> unlabelled_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 486: // stmt -> label_name, tkColon, stmt + case 491: // stmt -> label_name, tkColon, stmt { CurrentSemanticValue.stn = new labeled_statement(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 487: // unlabelled_stmt -> /* empty */ + case 492: // unlabelled_stmt -> /* empty */ { CurrentSemanticValue.stn = new empty_statement(); CurrentSemanticValue.stn.source_context = null; } break; - case 488: // unlabelled_stmt -> assignment + case 493: // unlabelled_stmt -> assignment { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 489: // unlabelled_stmt -> proc_call + case 494: // unlabelled_stmt -> proc_call { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 490: // unlabelled_stmt -> goto_stmt + case 495: // unlabelled_stmt -> goto_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 491: // unlabelled_stmt -> compound_stmt + case 496: // unlabelled_stmt -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 492: // unlabelled_stmt -> if_stmt + case 497: // unlabelled_stmt -> if_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 493: // unlabelled_stmt -> case_stmt + case 498: // unlabelled_stmt -> case_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 494: // unlabelled_stmt -> repeat_stmt + case 499: // unlabelled_stmt -> repeat_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 495: // unlabelled_stmt -> while_stmt + case 500: // unlabelled_stmt -> while_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 496: // unlabelled_stmt -> for_stmt + case 501: // unlabelled_stmt -> for_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 497: // unlabelled_stmt -> with_stmt + case 502: // unlabelled_stmt -> with_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 498: // unlabelled_stmt -> inherited_message + case 503: // unlabelled_stmt -> inherited_message { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 499: // unlabelled_stmt -> try_stmt + case 504: // unlabelled_stmt -> try_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 500: // unlabelled_stmt -> raise_stmt + case 505: // unlabelled_stmt -> raise_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 501: // unlabelled_stmt -> foreach_stmt + case 506: // unlabelled_stmt -> foreach_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 502: // unlabelled_stmt -> var_stmt + case 507: // unlabelled_stmt -> var_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 503: // unlabelled_stmt -> expr_as_stmt + case 508: // unlabelled_stmt -> expr_as_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 504: // unlabelled_stmt -> lock_stmt + case 509: // unlabelled_stmt -> lock_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 505: // unlabelled_stmt -> yield_stmt + case 510: // unlabelled_stmt -> yield_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 506: // unlabelled_stmt -> yield_sequence_stmt + case 511: // unlabelled_stmt -> yield_sequence_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 507: // unlabelled_stmt -> loop_stmt + case 512: // unlabelled_stmt -> loop_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 508: // unlabelled_stmt -> match_with + case 513: // unlabelled_stmt -> match_with { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 509: // loop_stmt -> tkLoop, expr_l1, tkDo, unlabelled_stmt + case 514: // loop_stmt -> tkLoop, expr_l1, tkDo, unlabelled_stmt { CurrentSemanticValue.stn = new loop_stmt(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].stn as statement,CurrentLocationSpan); } break; - case 510: // yield_stmt -> tkYield, expr_l1_func_decl_lambda + case 515: // yield_stmt -> tkYield, expr_l1_func_decl_lambda { CurrentSemanticValue.stn = new yield_node(ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); } break; - case 511: // yield_sequence_stmt -> tkYield, tkSequence, expr_l1_func_decl_lambda + case 516: // yield_sequence_stmt -> tkYield, tkSequence, expr_l1_func_decl_lambda { CurrentSemanticValue.stn = new yield_sequence_node(ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); } break; - case 512: // var_stmt -> tkVar, var_decl_part + case 517: // var_stmt -> tkVar, var_decl_part { CurrentSemanticValue.stn = new var_statement(ValueStack[ValueStack.Depth-1].stn as var_def_statement, CurrentLocationSpan); } break; - case 513: // var_stmt -> tkRoundOpen, tkVar, identifier, tkComma, var_ident_list, + case 518: // var_stmt -> tkRoundOpen, tkVar, identifier, tkComma, var_ident_list, // tkRoundClose, tkAssign, expr { (ValueStack[ValueStack.Depth-4].ob as ident_list).Insert(0,ValueStack[ValueStack.Depth-6].id); @@ -5234,7 +5288,7 @@ public partial class GPPGParser: ShiftReduceParser tkVar, tkRoundOpen, identifier, tkComma, ident_list, tkRoundClose, + case 519: // var_stmt -> tkVar, tkRoundOpen, identifier, tkComma, ident_list, tkRoundClose, // tkAssign, expr { (ValueStack[ValueStack.Depth-4].stn as ident_list).Insert(0,ValueStack[ValueStack.Depth-6].id); @@ -5242,12 +5296,12 @@ public partial class GPPGParser: ShiftReduceParser var_reference, assign_operator, expr_with_func_decl_lambda + case 520: // assignment -> var_reference, assign_operator, expr_with_func_decl_lambda { CurrentSemanticValue.stn = new assign(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 516: // assignment -> tkRoundOpen, variable, tkComma, variable_list, tkRoundClose, + case 521: // assignment -> tkRoundOpen, variable, tkComma, variable_list, tkRoundClose, // assign_operator, expr { if (ValueStack[ValueStack.Depth-2].op.type != Operators.Assignment) @@ -5257,7 +5311,7 @@ public partial class GPPGParser: ShiftReduceParser variable, tkQuestionSquareOpen, format_expr, tkSquareClose, + case 522: // assignment -> variable, tkQuestionSquareOpen, format_expr, tkSquareClose, // assign_operator, expr { var fe = ValueStack[ValueStack.Depth-4].ex as format_expr; @@ -5272,41 +5326,41 @@ public partial class GPPGParser: ShiftReduceParser variable + case 523: // variable_list -> variable { CurrentSemanticValue.ob = new addressed_value_list(ValueStack[ValueStack.Depth-1].ex as addressed_value,LocationStack[LocationStack.Depth-1]); } break; - case 519: // variable_list -> variable_list, tkComma, variable + case 524: // variable_list -> variable_list, tkComma, variable { (ValueStack[ValueStack.Depth-3].ob as addressed_value_list).Add(ValueStack[ValueStack.Depth-1].ex as addressed_value); (ValueStack[ValueStack.Depth-3].ob as syntax_tree_node).source_context = LexLocation.MergeAll(LocationStack[LocationStack.Depth-3],LocationStack[LocationStack.Depth-2],LocationStack[LocationStack.Depth-1]); CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-3].ob; } break; - case 520: // var_ident_list -> tkVar, identifier + case 525: // var_ident_list -> tkVar, identifier { CurrentSemanticValue.ob = new ident_list(ValueStack[ValueStack.Depth-1].id,CurrentLocationSpan); } break; - case 521: // var_ident_list -> var_ident_list, tkComma, tkVar, identifier + case 526: // var_ident_list -> var_ident_list, tkComma, tkVar, identifier { (ValueStack[ValueStack.Depth-4].ob as ident_list).Add(ValueStack[ValueStack.Depth-1].id); (ValueStack[ValueStack.Depth-4].ob as ident_list).source_context = LexLocation.MergeAll(LocationStack[LocationStack.Depth-4],LocationStack[LocationStack.Depth-3],LocationStack[LocationStack.Depth-2],LocationStack[LocationStack.Depth-1]); CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-4].ob; } break; - case 522: // proc_call -> var_reference + case 527: // proc_call -> var_reference { CurrentSemanticValue.stn = new procedure_call(ValueStack[ValueStack.Depth-1].ex as addressed_value, ValueStack[ValueStack.Depth-1].ex is ident, CurrentLocationSpan); } break; - case 523: // goto_stmt -> tkGoto, label_name + case 528: // goto_stmt -> tkGoto, label_name { CurrentSemanticValue.stn = new goto_statement(ValueStack[ValueStack.Depth-1].id, CurrentLocationSpan); } break; - case 524: // compound_stmt -> tkBegin, stmt_list, tkEnd + case 529: // 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; @@ -5314,124 +5368,124 @@ public partial class GPPGParser: ShiftReduceParser stmt + case 530: // stmt_list -> stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, LocationStack[LocationStack.Depth-1]); } break; - case 526: // stmt_list -> stmt_list, tkSemiColon, stmt + case 531: // 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 527: // if_stmt -> tkIf, expr_l1, tkThen, unlabelled_stmt + case 532: // 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 528: // if_stmt -> tkIf, expr_l1, tkThen, unlabelled_stmt, tkElse, unlabelled_stmt + case 533: // 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 529: // match_with -> tkMatch, expr_l1, tkWith, pattern_cases, else_case, tkEnd + case 534: // match_with -> tkMatch, expr_l1, tkWith, pattern_cases, else_case, tkEnd { CurrentSemanticValue.stn = new match_with(ValueStack[ValueStack.Depth-5].ex, ValueStack[ValueStack.Depth-3].stn as pattern_cases, ValueStack[ValueStack.Depth-2].stn as statement, CurrentLocationSpan); } break; - case 530: // match_with -> tkMatch, expr_l1, tkWith, pattern_cases, tkSemiColon, else_case, + case 535: // match_with -> tkMatch, expr_l1, tkWith, pattern_cases, tkSemiColon, else_case, // tkEnd { CurrentSemanticValue.stn = new match_with(ValueStack[ValueStack.Depth-6].ex, ValueStack[ValueStack.Depth-4].stn as pattern_cases, ValueStack[ValueStack.Depth-2].stn as statement, CurrentLocationSpan); } break; - case 531: // pattern_cases -> pattern_case + case 536: // pattern_cases -> pattern_case { CurrentSemanticValue.stn = new pattern_cases(ValueStack[ValueStack.Depth-1].stn as pattern_case); } break; - case 532: // pattern_cases -> pattern_cases, tkSemiColon, pattern_case + case 537: // pattern_cases -> pattern_cases, tkSemiColon, pattern_case { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as pattern_cases).Add(ValueStack[ValueStack.Depth-1].stn as pattern_case); } break; - case 533: // pattern_case -> pattern_optional_var, tkWhen, expr_l1, tkColon, unlabelled_stmt + case 538: // pattern_case -> pattern_optional_var, tkWhen, expr_l1, tkColon, unlabelled_stmt { CurrentSemanticValue.stn = new pattern_case(ValueStack[ValueStack.Depth-5].stn as pattern_node, ValueStack[ValueStack.Depth-1].stn as statement, ValueStack[ValueStack.Depth-3].ex, CurrentLocationSpan); } break; - case 534: // pattern_case -> deconstruction_or_const_pattern, tkColon, unlabelled_stmt + case 539: // pattern_case -> deconstruction_or_const_pattern, tkColon, unlabelled_stmt { CurrentSemanticValue.stn = new pattern_case(ValueStack[ValueStack.Depth-3].stn as pattern_node, ValueStack[ValueStack.Depth-1].stn as statement, null, CurrentLocationSpan); } break; - case 535: // pattern_case -> collection_pattern, tkColon, unlabelled_stmt + case 540: // pattern_case -> collection_pattern, tkColon, unlabelled_stmt { CurrentSemanticValue.stn = new pattern_case(ValueStack[ValueStack.Depth-3].stn as pattern_node, ValueStack[ValueStack.Depth-1].stn as statement, null, CurrentLocationSpan); } break; - case 536: // pattern_case -> tuple_pattern, tkWhen, expr_l1, tkColon, unlabelled_stmt + case 541: // pattern_case -> tuple_pattern, tkWhen, expr_l1, tkColon, unlabelled_stmt { CurrentSemanticValue.stn = new pattern_case(ValueStack[ValueStack.Depth-5].stn as pattern_node, ValueStack[ValueStack.Depth-1].stn as statement, ValueStack[ValueStack.Depth-3].ex, CurrentLocationSpan); } break; - case 537: // pattern_case -> tuple_pattern, tkColon, unlabelled_stmt + case 542: // pattern_case -> tuple_pattern, tkColon, unlabelled_stmt { CurrentSemanticValue.stn = new pattern_case(ValueStack[ValueStack.Depth-3].stn as pattern_node, ValueStack[ValueStack.Depth-1].stn as statement, null, CurrentLocationSpan); } break; - case 538: // case_stmt -> tkCase, expr_l1, tkOf, case_list, else_case, tkEnd + case 543: // 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 539: // case_stmt -> tkCase, expr_l1, tkOf, case_list, tkSemiColon, else_case, tkEnd + case 544: // case_stmt -> tkCase, expr_l1, tkOf, case_list, tkSemiColon, else_case, tkEnd { CurrentSemanticValue.stn = new case_node(ValueStack[ValueStack.Depth-6].ex, ValueStack[ValueStack.Depth-4].stn as case_variants, ValueStack[ValueStack.Depth-2].stn as statement, CurrentLocationSpan); } break; - case 540: // case_stmt -> tkCase, expr_l1, tkOf, else_case, tkEnd + case 545: // case_stmt -> tkCase, expr_l1, tkOf, else_case, tkEnd { CurrentSemanticValue.stn = new case_node(ValueStack[ValueStack.Depth-4].ex, NewCaseItem(new empty_statement(), null), ValueStack[ValueStack.Depth-2].stn as statement, CurrentLocationSpan); } break; - case 541: // case_list -> case_item + case 546: // 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 542: // case_list -> case_list, tkSemiColon, case_item + case 547: // 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 543: // case_item -> case_label_list, tkColon, unlabelled_stmt + case 548: // 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 544: // case_label_list -> case_label + case 549: // case_label_list -> case_label { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 545: // case_label_list -> case_label_list, tkComma, case_label + case 550: // 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 546: // case_label -> const_elem + case 551: // case_label -> const_elem { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 547: // else_case -> /* empty */ + case 552: // else_case -> /* empty */ { CurrentSemanticValue.stn = null;} break; - case 548: // else_case -> tkElse, stmt_list + case 553: // else_case -> tkElse, stmt_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 549: // repeat_stmt -> tkRepeat, stmt_list, tkUntil, expr + case 554: // 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; @@ -5439,23 +5493,23 @@ public partial class GPPGParser: ShiftReduceParser tkWhile, expr_l1, optional_tk_do, unlabelled_stmt + case 555: // 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 551: // optional_tk_do -> tkDo + case 556: // optional_tk_do -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 552: // optional_tk_do -> /* empty */ + case 557: // optional_tk_do -> /* empty */ { CurrentSemanticValue.ti = null; } break; - case 553: // lock_stmt -> tkLock, expr_l1, tkDo, unlabelled_stmt + case 558: // 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 554: // foreach_stmt -> tkForeach, identifier, foreach_stmt_ident_dype_opt, tkIn, + case 559: // 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); @@ -5463,19 +5517,19 @@ public partial class GPPGParser: ShiftReduceParser tkForeach, tkVar, identifier, tkColon, type_ref, tkIn, expr_l1, + case 560: // 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 556: // foreach_stmt -> tkForeach, tkVar, identifier, tkIn, expr_l1, tkDo, + case 561: // 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 557: // foreach_stmt -> tkForeach, tkVar, tkRoundOpen, ident_list, tkRoundClose, tkIn, + case 562: // foreach_stmt -> tkForeach, tkVar, tkRoundOpen, ident_list, tkRoundClose, tkIn, // expr_l1, tkDo, unlabelled_stmt { if (parsertools.build_tree_for_formatter) @@ -5499,56 +5553,56 @@ public partial class GPPGParser: ShiftReduceParser tkColon, type_ref + case 563: // foreach_stmt_ident_dype_opt -> tkColon, type_ref { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 560: // for_stmt -> tkFor, optional_var, identifier, for_stmt_decl_or_assign, expr_l1, + case 565: // 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 561: // optional_var -> tkVar + case 566: // optional_var -> tkVar { CurrentSemanticValue.ob = true; } break; - case 562: // optional_var -> /* empty */ + case 567: // optional_var -> /* empty */ { CurrentSemanticValue.ob = false; } break; - case 564: // for_stmt_decl_or_assign -> tkColon, simple_type_identifier, tkAssign + case 569: // for_stmt_decl_or_assign -> tkColon, simple_type_identifier, tkAssign { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-2].td; } break; - case 565: // for_cycle_type -> tkTo + case 570: // for_cycle_type -> tkTo { CurrentSemanticValue.ob = for_cycle_type.to; } break; - case 566: // for_cycle_type -> tkDownto + case 571: // for_cycle_type -> tkDownto { CurrentSemanticValue.ob = for_cycle_type.downto; } break; - case 567: // with_stmt -> tkWith, expr_list, tkDo, unlabelled_stmt + case 572: // 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 568: // inherited_message -> tkInherited + case 573: // inherited_message -> tkInherited { CurrentSemanticValue.stn = new inherited_message(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 569: // try_stmt -> tkTry, stmt_list, try_handler + case 574: // 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 570: // try_handler -> tkFinally, stmt_list, tkEnd + case 575: // 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 571: // try_handler -> tkExcept, exception_block, tkEnd + case 576: // 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) @@ -5558,163 +5612,163 @@ public partial class GPPGParser: ShiftReduceParser exception_handler_list, exception_block_else_branch + case 577: // 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 573: // exception_block -> exception_handler_list, tkSemiColon, + case 578: // 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 574: // exception_block -> stmt_list + case 579: // 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 575: // exception_handler_list -> exception_handler + case 580: // exception_handler_list -> exception_handler { CurrentSemanticValue.stn = new exception_handler_list(ValueStack[ValueStack.Depth-1].stn as exception_handler, CurrentLocationSpan); } break; - case 576: // exception_handler_list -> exception_handler_list, tkSemiColon, + case 581: // 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 577: // exception_block_else_branch -> /* empty */ + case 582: // exception_block_else_branch -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 578: // exception_block_else_branch -> tkElse, stmt_list + case 583: // exception_block_else_branch -> tkElse, stmt_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 579: // exception_handler -> tkOn, exception_identifier, tkDo, unlabelled_stmt + case 584: // 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 580: // exception_identifier -> exception_class_type_identifier + case 585: // exception_identifier -> exception_class_type_identifier { CurrentSemanticValue.stn = new exception_ident(null, (named_type_reference)ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 581: // exception_identifier -> exception_variable, tkColon, + case 586: // 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 582: // exception_class_type_identifier -> simple_type_identifier + case 587: // exception_class_type_identifier -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 583: // exception_variable -> identifier + case 588: // exception_variable -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 584: // raise_stmt -> tkRaise + case 589: // raise_stmt -> tkRaise { CurrentSemanticValue.stn = new raise_stmt(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 585: // raise_stmt -> tkRaise, expr + case 590: // raise_stmt -> tkRaise, expr { CurrentSemanticValue.stn = new raise_stmt(ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 586: // expr_list -> expr_with_func_decl_lambda + case 591: // expr_list -> expr_with_func_decl_lambda { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 587: // expr_list -> expr_list, tkComma, expr_with_func_decl_lambda + case 592: // 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 588: // expr_as_stmt -> allowable_expr_as_stmt + case 593: // expr_as_stmt -> allowable_expr_as_stmt { CurrentSemanticValue.stn = new expression_as_statement(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 589: // allowable_expr_as_stmt -> new_expr + case 594: // allowable_expr_as_stmt -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 590: // expr_with_func_decl_lambda -> expr + case 595: // expr_with_func_decl_lambda -> expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 591: // expr_with_func_decl_lambda -> func_decl_lambda + case 596: // expr_with_func_decl_lambda -> func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 592: // expr -> expr_l1 + case 597: // expr -> expr_l1 { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 593: // expr -> format_expr + case 598: // expr -> format_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 594: // expr_l1 -> expr_dq + case 599: // expr_l1 -> expr_dq { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 595: // expr_l1 -> question_expr + case 600: // expr_l1 -> question_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 596: // expr_l1 -> new_question_expr + case 601: // expr_l1 -> new_question_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 597: // expr_l1_for_question_expr -> expr_dq + case 602: // expr_l1_for_question_expr -> expr_dq { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 598: // expr_l1_for_question_expr -> question_expr + case 603: // expr_l1_for_question_expr -> question_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 599: // expr_l1_for_new_question_expr -> expr_dq + case 604: // expr_l1_for_new_question_expr -> expr_dq { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 600: // expr_l1_for_new_question_expr -> new_question_expr + case 605: // expr_l1_for_new_question_expr -> new_question_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 601: // expr_l1_func_decl_lambda -> expr_l1 + case 606: // expr_l1_func_decl_lambda -> expr_l1 { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 602: // expr_l1_func_decl_lambda -> func_decl_lambda + case 607: // expr_l1_func_decl_lambda -> func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 603: // expr_l1_for_lambda -> expr_dq + case 608: // expr_l1_for_lambda -> expr_dq { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 604: // expr_l1_for_lambda -> question_expr + case 609: // expr_l1_for_lambda -> question_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 605: // expr_l1_for_lambda -> func_decl_lambda + case 610: // expr_l1_for_lambda -> func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 606: // expr_dq -> relop_expr + case 611: // expr_dq -> relop_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 607: // expr_dq -> expr_dq, tkDoubleQuestion, relop_expr + case 612: // expr_dq -> expr_dq, tkDoubleQuestion, relop_expr { CurrentSemanticValue.ex = new double_question_node(ValueStack[ValueStack.Depth-3].ex as expression, ValueStack[ValueStack.Depth-1].ex as expression, CurrentLocationSpan);} break; - case 608: // sizeof_expr -> tkSizeOf, tkRoundOpen, simple_or_template_type_reference, + case 613: // 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 609: // typeof_expr -> tkTypeOf, tkRoundOpen, simple_or_template_type_reference, + case 614: // 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 610: // typeof_expr -> tkTypeOf, tkRoundOpen, empty_template_type_reference, + case 615: // typeof_expr -> tkTypeOf, tkRoundOpen, empty_template_type_reference, // tkRoundClose { CurrentSemanticValue.ex = new typeof_operator((named_type_reference)ValueStack[ValueStack.Depth-2].td, CurrentLocationSpan); } break; - case 611: // question_expr -> expr_l1_for_question_expr, tkQuestion, + case 616: // question_expr -> expr_l1_for_question_expr, tkQuestion, // expr_l1_for_question_expr, tkColon, // expr_l1_for_question_expr { @@ -5723,7 +5777,7 @@ public partial class GPPGParser: ShiftReduceParser tkIf, expr_l1_for_new_question_expr, tkThen, + case 617: // new_question_expr -> tkIf, expr_l1_for_new_question_expr, tkThen, // expr_l1_for_new_question_expr, tkElse, // expr_l1_for_new_question_expr { @@ -5739,47 +5793,47 @@ public partial class GPPGParser: ShiftReduceParser simple_type_identifier, + case 618: // empty_template_type_reference -> simple_type_identifier, // template_type_empty_params { CurrentSemanticValue.td = new template_type_reference((named_type_reference)ValueStack[ValueStack.Depth-2].td, (template_param_list)ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 614: // empty_template_type_reference -> simple_type_identifier, tkAmpersend, + case 619: // empty_template_type_reference -> simple_type_identifier, tkAmpersend, // template_type_empty_params { CurrentSemanticValue.td = new template_type_reference((named_type_reference)ValueStack[ValueStack.Depth-3].td, (template_param_list)ValueStack[ValueStack.Depth-1].stn, CurrentLocationSpan); } break; - case 615: // simple_or_template_type_reference -> simple_type_identifier + case 620: // simple_or_template_type_reference -> simple_type_identifier { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 616: // simple_or_template_type_reference -> simple_type_identifier, + case 621: // 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 617: // simple_or_template_type_reference -> simple_type_identifier, tkAmpersend, + case 622: // 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 618: // optional_array_initializer -> tkRoundOpen, typed_const_list, tkRoundClose + case 623: // optional_array_initializer -> tkRoundOpen, typed_const_list, tkRoundClose { CurrentSemanticValue.stn = new array_const((expression_list)ValueStack[ValueStack.Depth-2].stn, CurrentLocationSpan); } break; - case 620: // new_expr -> tkNew, simple_or_template_type_reference, + case 625: // 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 621: // new_expr -> tkNew, simple_or_template_type_reference, tkSquareOpen, + case 626: // new_expr -> tkNew, simple_or_template_type_reference, tkSquareOpen, // optional_expr_list, tkSquareClose, optional_array_initializer { var el = ValueStack[ValueStack.Depth-3].stn as expression_list; @@ -5795,7 +5849,7 @@ public partial class GPPGParser: ShiftReduceParser tkNew, tkClass, tkRoundOpen, list_fields_in_unnamed_object, + case 627: // new_expr -> tkNew, tkClass, tkRoundOpen, list_fields_in_unnamed_object, // tkRoundClose { // sugared node @@ -5810,14 +5864,14 @@ public partial class GPPGParser: ShiftReduceParser identifier, tkAssign, relop_expr + case 628: // field_in_unnamed_object -> identifier, tkAssign, relop_expr { if (ValueStack[ValueStack.Depth-1].ex is nil_const) parsertools.AddErrorFromResource("NIL_IN_UNNAMED_OBJECT",CurrentLocationSpan); CurrentSemanticValue.ob = new name_assign_expr(ValueStack[ValueStack.Depth-3].id,ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); } break; - case 624: // field_in_unnamed_object -> relop_expr + case 629: // field_in_unnamed_object -> relop_expr { ident name = null; var id = ValueStack[ValueStack.Depth-1].ex as ident; @@ -5837,13 +5891,13 @@ public partial class GPPGParser: ShiftReduceParser field_in_unnamed_object + case 630: // 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 626: // list_fields_in_unnamed_object -> list_fields_in_unnamed_object, tkComma, + case 631: // 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; @@ -5854,46 +5908,46 @@ public partial class GPPGParser: ShiftReduceParser /* empty */ + case 632: // optional_expr_list_with_bracket -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 628: // optional_expr_list_with_bracket -> tkRoundOpen, optional_expr_list, + case 633: // optional_expr_list_with_bracket -> tkRoundOpen, optional_expr_list, // tkRoundClose { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-2].stn; } break; - case 629: // relop_expr -> simple_expr + case 634: // relop_expr -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 630: // relop_expr -> relop_expr, relop, simple_expr + case 635: // 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 631: // relop_expr -> relop_expr, relop, new_question_expr + case 636: // relop_expr -> relop_expr, relop, new_question_expr { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 632: // relop_expr -> is_type_expr, tkRoundOpen, pattern_out_param_list, tkRoundClose + case 637: // relop_expr -> is_type_expr, tkRoundOpen, pattern_out_param_list, tkRoundClose { var isTypeCheck = ValueStack[ValueStack.Depth-4].ex as typecast_node; var deconstructorPattern = new deconstructor_pattern(ValueStack[ValueStack.Depth-2].ob as List, isTypeCheck.type_def, null, CurrentLocationSpan); CurrentSemanticValue.ex = new is_pattern_expr(isTypeCheck.expr, deconstructorPattern, CurrentLocationSpan); } break; - case 633: // pattern -> simple_or_template_type_reference, tkRoundOpen, + case 638: // pattern -> simple_or_template_type_reference, tkRoundOpen, // pattern_out_param_list, tkRoundClose { CurrentSemanticValue.stn = new deconstructor_pattern(ValueStack[ValueStack.Depth-2].ob as List, ValueStack[ValueStack.Depth-4].td, null, CurrentLocationSpan); } break; - case 634: // pattern_optional_var -> simple_or_template_type_reference, tkRoundOpen, + case 639: // pattern_optional_var -> simple_or_template_type_reference, tkRoundOpen, // pattern_out_param_list_optional_var, tkRoundClose { CurrentSemanticValue.stn = new deconstructor_pattern(ValueStack[ValueStack.Depth-2].ob as List, ValueStack[ValueStack.Depth-4].td, null, CurrentLocationSpan); } break; - case 635: // deconstruction_or_const_pattern -> simple_or_template_type_reference, + case 640: // deconstruction_or_const_pattern -> simple_or_template_type_reference, // tkRoundOpen, // pattern_out_param_list_optional_var, // tkRoundClose @@ -5901,18 +5955,18 @@ public partial class GPPGParser: ShiftReduceParser, ValueStack[ValueStack.Depth-4].td, null, CurrentLocationSpan); } break; - case 636: // deconstruction_or_const_pattern -> const_pattern_expr_list + case 641: // deconstruction_or_const_pattern -> const_pattern_expr_list { CurrentSemanticValue.stn = new const_pattern(ValueStack[ValueStack.Depth-1].ob as List, CurrentLocationSpan); } break; - case 637: // const_pattern_expr_list -> const_pattern_expression + case 642: // const_pattern_expr_list -> const_pattern_expression { CurrentSemanticValue.ob = new List(); (CurrentSemanticValue.ob as List).Add(ValueStack[ValueStack.Depth-1].stn); } break; - case 638: // const_pattern_expr_list -> const_pattern_expr_list, tkComma, + case 643: // const_pattern_expr_list -> const_pattern_expr_list, tkComma, // const_pattern_expression { var list = ValueStack[ValueStack.Depth-3].ob as List; @@ -5920,36 +5974,36 @@ public partial class GPPGParser: ShiftReduceParser literal_or_number + case 644: // const_pattern_expression -> literal_or_number { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].ex; } break; - case 640: // const_pattern_expression -> simple_or_template_type_reference + case 645: // const_pattern_expression -> simple_or_template_type_reference { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].td; } break; - case 641: // const_pattern_expression -> tkNil + case 646: // const_pattern_expression -> tkNil { CurrentSemanticValue.stn = new nil_const(); CurrentSemanticValue.stn.source_context = CurrentLocationSpan; } break; - case 642: // const_pattern_expression -> sizeof_expr + case 647: // const_pattern_expression -> sizeof_expr { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].ex; } break; - case 643: // const_pattern_expression -> typeof_expr + case 648: // const_pattern_expression -> typeof_expr { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].ex; } break; - case 644: // collection_pattern -> tkSquareOpen, collection_pattern_expr_list, tkSquareClose + case 649: // collection_pattern -> tkSquareOpen, collection_pattern_expr_list, tkSquareClose { CurrentSemanticValue.stn = new collection_pattern(ValueStack[ValueStack.Depth-2].ob as List, CurrentLocationSpan); } break; - case 645: // collection_pattern_expr_list -> collection_pattern_list_item + case 650: // collection_pattern_expr_list -> collection_pattern_list_item { CurrentSemanticValue.ob = new List(); (CurrentSemanticValue.ob as List).Add(ValueStack[ValueStack.Depth-1].stn as pattern_parameter); } break; - case 646: // collection_pattern_expr_list -> collection_pattern_expr_list, tkComma, + case 651: // collection_pattern_expr_list -> collection_pattern_expr_list, tkComma, // collection_pattern_list_item { var list = ValueStack[ValueStack.Depth-3].ob as List; @@ -5957,108 +6011,108 @@ public partial class GPPGParser: ShiftReduceParser literal_or_number + case 652: // collection_pattern_list_item -> literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 648: // collection_pattern_list_item -> collection_pattern_var_item + case 653: // collection_pattern_list_item -> collection_pattern_var_item { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 649: // collection_pattern_list_item -> tkUnderscore + case 654: // collection_pattern_list_item -> tkUnderscore { CurrentSemanticValue.stn = new collection_pattern_wild_card(CurrentLocationSpan); } break; - case 650: // collection_pattern_list_item -> pattern_optional_var + case 655: // collection_pattern_list_item -> pattern_optional_var { CurrentSemanticValue.stn = new recursive_deconstructor_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 651: // collection_pattern_list_item -> collection_pattern + case 656: // collection_pattern_list_item -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 652: // collection_pattern_list_item -> tuple_pattern + case 657: // collection_pattern_list_item -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 653: // collection_pattern_list_item -> tkDotDot + case 658: // collection_pattern_list_item -> tkDotDot { CurrentSemanticValue.stn = new collection_pattern_gap_parameter(CurrentLocationSpan); } break; - case 654: // collection_pattern_var_item -> tkVar, identifier + case 659: // collection_pattern_var_item -> tkVar, identifier { CurrentSemanticValue.stn = new collection_pattern_var_parameter(ValueStack[ValueStack.Depth-1].id, null, CurrentLocationSpan); } break; - case 655: // tuple_pattern -> tkRoundOpen, tuple_pattern_item_list, tkRoundClose + case 660: // tuple_pattern -> tkRoundOpen, tuple_pattern_item_list, tkRoundClose { if ((ValueStack[ValueStack.Depth-2].ob as List).Count>6) parsertools.AddErrorFromResource("TUPLE_ELEMENTS_COUNT_MUST_BE_LESSEQUAL_7",CurrentLocationSpan); CurrentSemanticValue.stn = new tuple_pattern(ValueStack[ValueStack.Depth-2].ob as List, CurrentLocationSpan); } break; - case 656: // tuple_pattern_item -> tkUnderscore + case 661: // tuple_pattern_item -> tkUnderscore { CurrentSemanticValue.stn = new tuple_pattern_wild_card(CurrentLocationSpan); } break; - case 657: // tuple_pattern_item -> literal_or_number + case 662: // tuple_pattern_item -> literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 658: // tuple_pattern_item -> sign, literal_or_number + case 663: // tuple_pattern_item -> sign, literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan), CurrentLocationSpan); } break; - case 659: // tuple_pattern_item -> tkVar, identifier + case 664: // tuple_pattern_item -> tkVar, identifier { CurrentSemanticValue.stn = new tuple_pattern_var_parameter(ValueStack[ValueStack.Depth-1].id, null, CurrentLocationSpan); } break; - case 660: // tuple_pattern_item -> pattern_optional_var + case 665: // tuple_pattern_item -> pattern_optional_var { CurrentSemanticValue.stn = new recursive_deconstructor_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 661: // tuple_pattern_item -> collection_pattern + case 666: // tuple_pattern_item -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 662: // tuple_pattern_item -> tuple_pattern + case 667: // tuple_pattern_item -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 663: // tuple_pattern_item_list -> tuple_pattern_item + case 668: // tuple_pattern_item_list -> tuple_pattern_item { CurrentSemanticValue.ob = new List(); (CurrentSemanticValue.ob as List).Add(ValueStack[ValueStack.Depth-1].stn as pattern_parameter); } break; - case 664: // tuple_pattern_item_list -> tuple_pattern_item_list, tkComma, tuple_pattern_item + case 669: // tuple_pattern_item_list -> tuple_pattern_item_list, tkComma, tuple_pattern_item { var list = ValueStack[ValueStack.Depth-3].ob as List; list.Add(ValueStack[ValueStack.Depth-1].stn as pattern_parameter); CurrentSemanticValue.ob = list; } break; - case 665: // pattern_out_param_list_optional_var -> pattern_out_param_optional_var + case 670: // pattern_out_param_list_optional_var -> pattern_out_param_optional_var { CurrentSemanticValue.ob = new List(); (CurrentSemanticValue.ob as List).Add(ValueStack[ValueStack.Depth-1].stn as pattern_parameter); } break; - case 666: // pattern_out_param_list_optional_var -> pattern_out_param_list_optional_var, + case 671: // pattern_out_param_list_optional_var -> pattern_out_param_list_optional_var, // tkSemiColon, // pattern_out_param_optional_var { @@ -6067,7 +6121,7 @@ public partial class GPPGParser: ShiftReduceParser pattern_out_param_list_optional_var, + case 672: // pattern_out_param_list_optional_var -> pattern_out_param_list_optional_var, // tkComma, // pattern_out_param_optional_var { @@ -6076,13 +6130,13 @@ public partial class GPPGParser: ShiftReduceParser pattern_out_param + case 673: // pattern_out_param_list -> pattern_out_param { CurrentSemanticValue.ob = new List(); (CurrentSemanticValue.ob as List).Add(ValueStack[ValueStack.Depth-1].stn as pattern_parameter); } break; - case 669: // pattern_out_param_list -> pattern_out_param_list, tkSemiColon, + case 674: // pattern_out_param_list -> pattern_out_param_list, tkSemiColon, // pattern_out_param { var list = ValueStack[ValueStack.Depth-3].ob as List; @@ -6090,185 +6144,185 @@ public partial class GPPGParser: ShiftReduceParser pattern_out_param_list, tkComma, pattern_out_param + case 675: // pattern_out_param_list -> pattern_out_param_list, tkComma, pattern_out_param { var list = ValueStack[ValueStack.Depth-3].ob as List; list.Add(ValueStack[ValueStack.Depth-1].stn as pattern_parameter); CurrentSemanticValue.ob = list; } break; - case 671: // pattern_out_param -> tkUnderscore + case 676: // pattern_out_param -> tkUnderscore { CurrentSemanticValue.stn = new wild_card_deconstructor_parameter(CurrentLocationSpan); } break; - case 672: // pattern_out_param -> literal_or_number + case 677: // pattern_out_param -> literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 673: // pattern_out_param -> tkVar, identifier, tkColon, type_ref + case 678: // pattern_out_param -> tkVar, identifier, tkColon, type_ref { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-1].td, true, CurrentLocationSpan); } break; - case 674: // pattern_out_param -> tkVar, identifier + case 679: // pattern_out_param -> tkVar, identifier { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-1].id, null, true, CurrentLocationSpan); } break; - case 675: // pattern_out_param -> pattern + case 680: // pattern_out_param -> pattern { CurrentSemanticValue.stn = new recursive_deconstructor_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 676: // pattern_out_param -> collection_pattern + case 681: // pattern_out_param -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 677: // pattern_out_param -> tuple_pattern + case 682: // pattern_out_param -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 678: // pattern_out_param_optional_var -> tkUnderscore + case 683: // pattern_out_param_optional_var -> tkUnderscore { CurrentSemanticValue.stn = new wild_card_deconstructor_parameter(CurrentLocationSpan); } break; - case 679: // pattern_out_param_optional_var -> literal_or_number + case 684: // pattern_out_param_optional_var -> literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 680: // pattern_out_param_optional_var -> sign, literal_or_number + case 685: // pattern_out_param_optional_var -> sign, literal_or_number { CurrentSemanticValue.stn = new const_pattern_parameter(new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan), CurrentLocationSpan); } break; - case 681: // pattern_out_param_optional_var -> identifier, tkColon, type_ref + case 686: // pattern_out_param_optional_var -> identifier, tkColon, type_ref { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-1].td, false, CurrentLocationSpan); } break; - case 682: // pattern_out_param_optional_var -> identifier + case 687: // pattern_out_param_optional_var -> identifier { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-1].id, null, false, CurrentLocationSpan); } break; - case 683: // pattern_out_param_optional_var -> tkVar, identifier, tkColon, type_ref + case 688: // pattern_out_param_optional_var -> tkVar, identifier, tkColon, type_ref { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-3].id, ValueStack[ValueStack.Depth-1].td, true, CurrentLocationSpan); } break; - case 684: // pattern_out_param_optional_var -> tkVar, identifier + case 689: // pattern_out_param_optional_var -> tkVar, identifier { CurrentSemanticValue.stn = new var_deconstructor_parameter(ValueStack[ValueStack.Depth-1].id, null, true, CurrentLocationSpan); } break; - case 685: // pattern_out_param_optional_var -> pattern_optional_var + case 690: // pattern_out_param_optional_var -> pattern_optional_var { CurrentSemanticValue.stn = new recursive_deconstructor_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 686: // pattern_out_param_optional_var -> collection_pattern + case 691: // pattern_out_param_optional_var -> collection_pattern { CurrentSemanticValue.stn = new recursive_collection_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 687: // pattern_out_param_optional_var -> tuple_pattern + case 692: // pattern_out_param_optional_var -> tuple_pattern { CurrentSemanticValue.stn = new recursive_tuple_parameter(ValueStack[ValueStack.Depth-1].stn as pattern_node, CurrentLocationSpan); } break; - case 688: // simple_expr_or_nothing -> simple_expr + case 693: // simple_expr_or_nothing -> simple_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 689: // simple_expr_or_nothing -> /* empty */ + case 694: // simple_expr_or_nothing -> /* empty */ { CurrentSemanticValue.ex = null; } break; - case 690: // const_expr_or_nothing -> const_expr + case 695: // const_expr_or_nothing -> const_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 691: // const_expr_or_nothing -> /* empty */ + case 696: // const_expr_or_nothing -> /* empty */ { CurrentSemanticValue.ex = null; } break; - case 692: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing + case 697: // 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 693: // format_expr -> tkColon, simple_expr_or_nothing + case 698: // format_expr -> tkColon, simple_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 694: // format_expr -> simple_expr, tkColon, simple_expr_or_nothing, tkColon, + case 699: // 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 695: // format_expr -> tkColon, simple_expr_or_nothing, tkColon, simple_expr + case 700: // format_expr -> tkColon, simple_expr_or_nothing, tkColon, simple_expr { CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 696: // format_const_expr -> const_expr, tkColon, const_expr_or_nothing + case 701: // format_const_expr -> const_expr, tkColon, const_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 697: // format_const_expr -> tkColon, const_expr_or_nothing + case 702: // format_const_expr -> tkColon, const_expr_or_nothing { CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-1].ex, null, CurrentLocationSpan); } break; - case 698: // format_const_expr -> const_expr, tkColon, const_expr_or_nothing, tkColon, + case 703: // format_const_expr -> const_expr, tkColon, const_expr_or_nothing, tkColon, // const_expr { CurrentSemanticValue.ex = new format_expr(ValueStack[ValueStack.Depth-5].ex, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 699: // format_const_expr -> tkColon, const_expr_or_nothing, tkColon, const_expr + case 704: // format_const_expr -> tkColon, const_expr_or_nothing, tkColon, const_expr { CurrentSemanticValue.ex = new format_expr(null, ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 700: // relop -> tkEqual + case 705: // relop -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 701: // relop -> tkNotEqual + case 706: // relop -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 702: // relop -> tkLower + case 707: // relop -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 703: // relop -> tkGreater + case 708: // relop -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 704: // relop -> tkLowerEqual + case 709: // relop -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 705: // relop -> tkGreaterEqual + case 710: // relop -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 706: // relop -> tkIn + case 711: // relop -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 707: // simple_expr -> term1 + case 712: // simple_expr -> term1 { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 708: // simple_expr -> simple_expr, tkDotDot, term1 + case 713: // simple_expr -> simple_expr, tkDotDot, term1 { if (parsertools.build_tree_for_formatter) CurrentSemanticValue.ex = new diapason_expr(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); @@ -6276,128 +6330,128 @@ public partial class GPPGParser: ShiftReduceParser term + case 714: // term1 -> term { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 710: // term1 -> term1, addop, term + case 715: // term1 -> term1, addop, term { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 711: // term1 -> term1, addop, new_question_expr + case 716: // term1 -> term1, addop, new_question_expr { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 712: // addop -> tkPlus + case 717: // addop -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 713: // addop -> tkMinus + case 718: // addop -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 714: // addop -> tkOr + case 719: // addop -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 715: // addop -> tkXor + case 720: // addop -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 716: // addop -> tkCSharpStyleOr + case 721: // addop -> tkCSharpStyleOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 717: // typecast_op -> tkAs + case 722: // typecast_op -> tkAs { CurrentSemanticValue.ob = op_typecast.as_op; } break; - case 718: // typecast_op -> tkIs + case 723: // typecast_op -> tkIs { CurrentSemanticValue.ob = op_typecast.is_op; } break; - case 719: // as_is_expr -> is_type_expr + case 724: // as_is_expr -> is_type_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 720: // as_is_expr -> as_expr + case 725: // as_is_expr -> as_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 721: // as_expr -> term, tkAs, simple_or_template_type_reference + case 726: // as_expr -> term, tkAs, simple_or_template_type_reference { CurrentSemanticValue.ex = NewAsIsExpr(ValueStack[ValueStack.Depth-3].ex, op_typecast.as_op, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 722: // as_expr -> term, tkAs, array_type + case 727: // as_expr -> term, tkAs, array_type { CurrentSemanticValue.ex = NewAsIsExpr(ValueStack[ValueStack.Depth-3].ex, op_typecast.as_op, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 723: // is_type_expr -> term, tkIs, simple_or_template_type_reference + case 728: // is_type_expr -> term, tkIs, simple_or_template_type_reference { CurrentSemanticValue.ex = NewAsIsExpr(ValueStack[ValueStack.Depth-3].ex, op_typecast.is_op, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 724: // is_type_expr -> term, tkIs, array_type + case 729: // is_type_expr -> term, tkIs, array_type { CurrentSemanticValue.ex = NewAsIsExpr(ValueStack[ValueStack.Depth-3].ex, op_typecast.as_op, ValueStack[ValueStack.Depth-1].td, CurrentLocationSpan); } break; - case 725: // power_expr -> factor_without_unary_op, tkStarStar, factor + case 730: // power_expr -> factor_without_unary_op, tkStarStar, factor { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].ex,(ValueStack[ValueStack.Depth-2].op).type, CurrentLocationSpan); } break; - case 726: // power_expr -> factor_without_unary_op, tkStarStar, power_expr + case 731: // power_expr -> factor_without_unary_op, tkStarStar, power_expr { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].ex,(ValueStack[ValueStack.Depth-2].op).type, CurrentLocationSpan); } break; - case 727: // power_expr -> sign, power_expr + case 732: // power_expr -> sign, power_expr { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 728: // term -> factor + case 733: // term -> factor { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 729: // term -> new_expr + case 734: // term -> new_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 730: // term -> power_expr + case 735: // term -> power_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 731: // term -> term, mulop, factor + case 736: // 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 732: // term -> term, mulop, power_expr + case 737: // term -> term, mulop, power_expr { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].ex,(ValueStack[ValueStack.Depth-2].op).type, CurrentLocationSpan); } break; - case 733: // term -> term, mulop, new_question_expr + case 738: // term -> term, mulop, new_question_expr { CurrentSemanticValue.ex = new bin_expr(ValueStack[ValueStack.Depth-3].ex,ValueStack[ValueStack.Depth-1].ex,(ValueStack[ValueStack.Depth-2].op).type, CurrentLocationSpan); } break; - case 734: // term -> as_is_expr + case 739: // term -> as_is_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 735: // mulop -> tkStar + case 740: // mulop -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 736: // mulop -> tkSlash + case 741: // mulop -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 737: // mulop -> tkDiv + case 742: // mulop -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 738: // mulop -> tkMod + case 743: // mulop -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 739: // mulop -> tkShl + case 744: // mulop -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 740: // mulop -> tkShr + case 745: // mulop -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 741: // mulop -> tkAnd + case 746: // mulop -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 742: // default_expr -> tkDefault, tkRoundOpen, simple_or_template_type_reference, + case 747: // 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 743: // tuple -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, lambda_type_ref, + case 748: // tuple -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, lambda_type_ref, // optional_full_lambda_fp_list, tkRoundClose { /*if ($5 != null) @@ -6411,35 +6465,35 @@ public partial class GPPGParser: ShiftReduceParser literal_or_number + case 749: // factor_without_unary_op -> literal_or_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 745: // factor_without_unary_op -> var_reference + case 750: // factor_without_unary_op -> var_reference { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 746: // factor -> tkNil + case 751: // factor -> tkNil { CurrentSemanticValue.ex = new nil_const(); CurrentSemanticValue.ex.source_context = CurrentLocationSpan; } break; - case 747: // factor -> literal_or_number + case 752: // factor -> literal_or_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 748: // factor -> default_expr + case 753: // factor -> default_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 749: // factor -> tkSquareOpen, elem_list, tkSquareClose + case 754: // factor -> tkSquareOpen, elem_list, tkSquareClose { CurrentSemanticValue.ex = new pascal_set_constant(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 750: // factor -> tkNot, factor + case 755: // factor -> tkNot, factor { CurrentSemanticValue.ex = new un_expr(ValueStack[ValueStack.Depth-1].ex, ValueStack[ValueStack.Depth-2].op.type, CurrentLocationSpan); } break; - case 751: // factor -> sign, factor + case 756: // factor -> sign, factor { if (ValueStack[ValueStack.Depth-2].op.type == Operators.Minus) { @@ -6465,96 +6519,96 @@ public partial class GPPGParser: ShiftReduceParser tkDeref, factor + case 757: // factor -> tkDeref, factor { CurrentSemanticValue.ex = new index(ValueStack[ValueStack.Depth-1].ex, true, CurrentLocationSpan); } break; - case 753: // factor -> var_reference + case 758: // factor -> var_reference { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 754: // factor -> tuple + case 759: // factor -> tuple { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 755: // literal_or_number -> literal + case 760: // literal_or_number -> literal { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 756: // literal_or_number -> unsigned_number + case 761: // literal_or_number -> unsigned_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 757: // var_question_point -> variable, tkQuestionPoint, variable + case 762: // 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 758: // var_question_point -> variable, tkQuestionPoint, var_question_point + case 763: // 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 759: // var_reference -> var_address, variable + case 764: // 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 760: // var_reference -> variable + case 765: // var_reference -> variable { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 761: // var_reference -> var_question_point + case 766: // var_reference -> var_question_point { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 762: // var_address -> tkAddressOf + case 767: // var_address -> tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(CurrentLocationSpan); } break; - case 763: // var_address -> var_address, tkAddressOf + case 768: // var_address -> var_address, tkAddressOf { CurrentSemanticValue.stn = NewVarAddress(ValueStack[ValueStack.Depth-2].stn as get_address, CurrentLocationSpan); } break; - case 764: // attribute_variable -> simple_type_identifier, optional_expr_list_with_bracket + case 769: // 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 765: // attribute_variable -> template_type, optional_expr_list_with_bracket + case 770: // attribute_variable -> template_type, optional_expr_list_with_bracket { CurrentSemanticValue.stn = new attribute(null, ValueStack[ValueStack.Depth-2].td as named_type_reference, ValueStack[ValueStack.Depth-1].stn as expression_list, CurrentLocationSpan); } break; - case 766: // dotted_identifier -> identifier + case 771: // dotted_identifier -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 767: // dotted_identifier -> dotted_identifier, tkPoint, identifier_or_keyword + case 772: // 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 768: // variable_as_type -> dotted_identifier + case 773: // variable_as_type -> dotted_identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex;} break; - case 769: // variable_as_type -> dotted_identifier, template_type_params + case 774: // 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 770: // variable_or_literal_or_number -> variable + case 775: // variable_or_literal_or_number -> variable { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 771: // variable_or_literal_or_number -> literal_or_number + case 776: // variable_or_literal_or_number -> literal_or_number { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 772: // variable -> identifier + case 777: // variable -> identifier { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].id; } break; - case 773: // variable -> operator_name_ident + case 778: // variable -> operator_name_ident { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 774: // variable -> tkInherited, identifier + case 779: // variable -> tkInherited, identifier { CurrentSemanticValue.ex = new inherited_ident(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 775: // variable -> tkRoundOpen, expr, tkRoundClose + case 780: // variable -> tkRoundOpen, expr, tkRoundClose { if (!parsertools.build_tree_for_formatter) { @@ -6564,18 +6618,18 @@ public partial class GPPGParser: ShiftReduceParser sizeof_expr + case 781: // variable -> sizeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 777: // variable -> typeof_expr + case 782: // variable -> typeof_expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 778: // variable -> literal_or_number, tkPoint, identifier_or_keyword + case 783: // 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 779: // variable -> variable_or_literal_or_number, tkSquareOpen, expr_list, + case 784: // variable -> variable_or_literal_or_number, tkSquareOpen, expr_list, // tkSquareClose { var el = ValueStack[ValueStack.Depth-2].stn as expression_list; // SSM 10/03/16 @@ -6619,7 +6673,7 @@ public partial class GPPGParser: ShiftReduceParser variable_or_literal_or_number, tkQuestionSquareOpen, format_expr, + case 785: // variable -> variable_or_literal_or_number, tkQuestionSquareOpen, format_expr, // tkSquareClose { var fe = ValueStack[ValueStack.Depth-2].ex as format_expr; // SSM 9/01/17 @@ -6633,76 +6687,76 @@ public partial class GPPGParser: ShiftReduceParser tkVertParen, elem_list, tkVertParen + case 786: // variable -> tkVertParen, elem_list, tkVertParen { CurrentSemanticValue.ex = new array_const_new(ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); } break; - case 782: // variable -> variable, tkRoundOpen, optional_expr_list, tkRoundClose + case 787: // 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 783: // variable -> variable, tkPoint, identifier_keyword_operatorname + case 788: // 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 784: // variable -> tuple, tkPoint, identifier_keyword_operatorname + case 789: // 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 785: // variable -> variable, tkDeref + case 790: // variable -> variable, tkDeref { CurrentSemanticValue.ex = new roof_dereference(ValueStack[ValueStack.Depth-2].ex as addressed_value,CurrentLocationSpan); } break; - case 786: // variable -> variable, tkAmpersend, template_type_params + case 791: // 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 787: // optional_expr_list -> expr_list + case 792: // optional_expr_list -> expr_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 788: // optional_expr_list -> /* empty */ + case 793: // optional_expr_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 789: // elem_list -> elem_list1 + case 794: // elem_list -> elem_list1 { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 790: // elem_list -> /* empty */ + case 795: // elem_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 791: // elem_list1 -> elem + case 796: // elem_list1 -> elem { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 792: // elem_list1 -> elem_list1, tkComma, elem + case 797: // 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 793: // elem -> expr + case 798: // elem -> expr { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 794: // elem -> expr, tkDotDot, expr + case 799: // elem -> expr, tkDotDot, expr { CurrentSemanticValue.ex = new diapason_expr(ValueStack[ValueStack.Depth-3].ex, ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 795: // one_literal -> tkStringLiteral + case 800: // one_literal -> tkStringLiteral { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 796: // one_literal -> tkAsciiChar + case 801: // one_literal -> tkAsciiChar { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].stn as literal; } break; - case 797: // literal -> literal_list + case 802: // literal -> literal_list { CurrentSemanticValue.ex = NewLiteral(ValueStack[ValueStack.Depth-1].stn as literal_const_line); } break; - case 798: // literal -> tkFormatStringLiteral + case 803: // literal -> tkFormatStringLiteral { if (parsertools.build_tree_for_formatter) { @@ -6714,12 +6768,12 @@ public partial class GPPGParser: ShiftReduceParser one_literal + case 804: // literal_list -> one_literal { CurrentSemanticValue.stn = new literal_const_line(ValueStack[ValueStack.Depth-1].ex as literal, CurrentLocationSpan); } break; - case 800: // literal_list -> literal_list, one_literal + case 805: // literal_list -> literal_list, one_literal { var line = ValueStack[ValueStack.Depth-2].stn as literal_const_line; if (line.literals.Last() is string_const && ValueStack[ValueStack.Depth-1].ex is string_const) @@ -6727,475 +6781,475 @@ public partial class GPPGParser: ShiftReduceParser tkOperator, overload_operator + case 806: // 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 802: // optional_method_modificators -> tkSemiColon + case 807: // optional_method_modificators -> tkSemiColon { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 803: // optional_method_modificators -> tkSemiColon, meth_modificators, tkSemiColon + case 808: // 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 804: // optional_method_modificators1 -> /* empty */ + case 809: // optional_method_modificators1 -> /* empty */ { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 805: // optional_method_modificators1 -> tkSemiColon, meth_modificators + case 810: // 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 806: // meth_modificators -> meth_modificator + case 811: // meth_modificators -> meth_modificator { CurrentSemanticValue.stn = new procedure_attributes_list(ValueStack[ValueStack.Depth-1].id as procedure_attribute, CurrentLocationSpan); } break; - case 807: // meth_modificators -> meth_modificators, tkSemiColon, meth_modificator + case 812: // 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 808: // identifier -> tkIdentifier + case 813: // identifier -> tkIdentifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 809: // identifier -> property_specifier_directives + case 814: // identifier -> property_specifier_directives { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 810: // identifier -> non_reserved + case 815: // identifier -> non_reserved { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 811: // identifier_or_keyword -> identifier + case 816: // identifier_or_keyword -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 812: // identifier_or_keyword -> keyword + case 817: // identifier_or_keyword -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 813: // identifier_or_keyword -> reserved_keyword + case 818: // identifier_or_keyword -> reserved_keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 814: // identifier_keyword_operatorname -> identifier + case 819: // identifier_keyword_operatorname -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 815: // identifier_keyword_operatorname -> keyword + case 820: // identifier_keyword_operatorname -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 816: // identifier_keyword_operatorname -> operator_name_ident + case 821: // identifier_keyword_operatorname -> operator_name_ident { CurrentSemanticValue.id = (ident)ValueStack[ValueStack.Depth-1].ex; } break; - case 817: // meth_modificator -> tkAbstract + case 822: // meth_modificator -> tkAbstract { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 818: // meth_modificator -> tkOverload + case 823: // 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 819: // meth_modificator -> tkReintroduce + case 824: // meth_modificator -> tkReintroduce { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 820: // meth_modificator -> tkOverride + case 825: // meth_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 821: // meth_modificator -> tkExtensionMethod + case 826: // meth_modificator -> tkExtensionMethod { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 822: // meth_modificator -> tkVirtual + case 827: // meth_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 823: // property_modificator -> tkVirtual + case 828: // property_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 824: // property_modificator -> tkOverride + case 829: // property_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 825: // property_modificator -> tkAbstract + case 830: // property_modificator -> tkAbstract { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 826: // property_modificator -> tkReintroduce + case 831: // property_modificator -> tkReintroduce { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 827: // property_specifier_directives -> tkRead + case 832: // property_specifier_directives -> tkRead { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 828: // property_specifier_directives -> tkWrite + case 833: // property_specifier_directives -> tkWrite { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 829: // non_reserved -> tkName + case 834: // non_reserved -> tkName { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 830: // non_reserved -> tkNew + case 835: // non_reserved -> tkNew { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 831: // visibility_specifier -> tkInternal + case 836: // visibility_specifier -> tkInternal { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 832: // visibility_specifier -> tkPublic + case 837: // visibility_specifier -> tkPublic { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 833: // visibility_specifier -> tkProtected + case 838: // visibility_specifier -> tkProtected { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 834: // visibility_specifier -> tkPrivate + case 839: // visibility_specifier -> tkPrivate { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 835: // keyword -> visibility_specifier + case 840: // keyword -> visibility_specifier { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 836: // keyword -> tkSealed + case 841: // keyword -> tkSealed { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 837: // keyword -> tkTemplate + case 842: // keyword -> tkTemplate { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 838: // keyword -> tkOr + case 843: // keyword -> tkOr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 839: // keyword -> tkTypeOf + case 844: // keyword -> tkTypeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 840: // keyword -> tkSizeOf + case 845: // keyword -> tkSizeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 841: // keyword -> tkDefault + case 846: // keyword -> tkDefault { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 842: // keyword -> tkWhere + case 847: // keyword -> tkWhere { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 843: // keyword -> tkXor + case 848: // keyword -> tkXor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 844: // keyword -> tkAnd + case 849: // keyword -> tkAnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 845: // keyword -> tkDiv + case 850: // keyword -> tkDiv { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 846: // keyword -> tkMod + case 851: // keyword -> tkMod { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 847: // keyword -> tkShl + case 852: // keyword -> tkShl { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 848: // keyword -> tkShr + case 853: // keyword -> tkShr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 849: // keyword -> tkNot + case 854: // keyword -> tkNot { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 850: // keyword -> tkAs + case 855: // keyword -> tkAs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 851: // keyword -> tkIn + case 856: // keyword -> tkIn { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 852: // keyword -> tkIs + case 857: // keyword -> tkIs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 853: // keyword -> tkArray + case 858: // keyword -> tkArray { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 854: // keyword -> tkSequence + case 859: // keyword -> tkSequence { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 855: // keyword -> tkBegin + case 860: // keyword -> tkBegin { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 856: // keyword -> tkCase + case 861: // keyword -> tkCase { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 857: // keyword -> tkClass + case 862: // keyword -> tkClass { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 858: // keyword -> tkConst + case 863: // keyword -> tkConst { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 859: // keyword -> tkConstructor + case 864: // keyword -> tkConstructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 860: // keyword -> tkDestructor + case 865: // keyword -> tkDestructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 861: // keyword -> tkDownto + case 866: // keyword -> tkDownto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 862: // keyword -> tkDo + case 867: // keyword -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 863: // keyword -> tkElse + case 868: // keyword -> tkElse { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 864: // keyword -> tkEnd + case 869: // keyword -> tkEnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 865: // keyword -> tkExcept + case 870: // keyword -> tkExcept { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 866: // keyword -> tkFile + case 871: // keyword -> tkFile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 867: // keyword -> tkAuto + case 872: // keyword -> tkAuto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 868: // keyword -> tkFinalization + case 873: // keyword -> tkFinalization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 869: // keyword -> tkFinally + case 874: // keyword -> tkFinally { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 870: // keyword -> tkFor + case 875: // keyword -> tkFor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 871: // keyword -> tkForeach + case 876: // keyword -> tkForeach { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 872: // keyword -> tkFunction + case 877: // keyword -> tkFunction { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 873: // keyword -> tkIf + case 878: // keyword -> tkIf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 874: // keyword -> tkImplementation + case 879: // keyword -> tkImplementation { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 875: // keyword -> tkInherited + case 880: // keyword -> tkInherited { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 876: // keyword -> tkInitialization + case 881: // keyword -> tkInitialization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 877: // keyword -> tkInterface + case 882: // keyword -> tkInterface { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 878: // keyword -> tkProcedure + case 883: // keyword -> tkProcedure { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 879: // keyword -> tkProperty + case 884: // keyword -> tkProperty { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 880: // keyword -> tkRaise + case 885: // keyword -> tkRaise { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 881: // keyword -> tkRecord + case 886: // keyword -> tkRecord { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 882: // keyword -> tkRepeat + case 887: // keyword -> tkRepeat { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 883: // keyword -> tkSet + case 888: // keyword -> tkSet { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 884: // keyword -> tkTry + case 889: // keyword -> tkTry { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 885: // keyword -> tkType + case 890: // keyword -> tkType { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 886: // keyword -> tkStatic + case 891: // keyword -> tkStatic { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 887: // keyword -> tkThen + case 892: // keyword -> tkThen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 888: // keyword -> tkTo + case 893: // keyword -> tkTo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 889: // keyword -> tkUntil + case 894: // keyword -> tkUntil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 890: // keyword -> tkUses + case 895: // keyword -> tkUses { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 891: // keyword -> tkVar + case 896: // keyword -> tkVar { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 892: // keyword -> tkWhile + case 897: // keyword -> tkWhile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 893: // keyword -> tkWith + case 898: // keyword -> tkWith { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 894: // keyword -> tkNil + case 899: // keyword -> tkNil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 895: // keyword -> tkGoto + case 900: // keyword -> tkGoto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 896: // keyword -> tkOf + case 901: // keyword -> tkOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 897: // keyword -> tkLabel + case 902: // keyword -> tkLabel { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 898: // keyword -> tkProgram + case 903: // keyword -> tkProgram { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 899: // keyword -> tkUnit + case 904: // keyword -> tkUnit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 900: // keyword -> tkLibrary + case 905: // keyword -> tkLibrary { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 901: // keyword -> tkNamespace + case 906: // keyword -> tkNamespace { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 902: // keyword -> tkExternal + case 907: // keyword -> tkExternal { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 903: // keyword -> tkParams + case 908: // keyword -> tkParams { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 904: // keyword -> tkEvent + case 909: // keyword -> tkEvent { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 905: // keyword -> tkYield + case 910: // keyword -> tkYield { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 906: // keyword -> tkMatch + case 911: // keyword -> tkMatch { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 907: // keyword -> tkWhen + case 912: // keyword -> tkWhen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 908: // keyword -> tkPartial + case 913: // keyword -> tkPartial { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 909: // keyword -> tkAbstract + case 914: // keyword -> tkAbstract { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 910: // keyword -> tkLock + case 915: // keyword -> tkLock { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 911: // keyword -> tkImplicit + case 916: // keyword -> tkImplicit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 912: // keyword -> tkExplicit + case 917: // keyword -> tkExplicit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 913: // keyword -> tkOn + case 918: // keyword -> tkOn { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 914: // keyword -> tkVirtual + case 919: // keyword -> tkVirtual { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 915: // keyword -> tkOverride + case 920: // keyword -> tkOverride { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 916: // keyword -> tkLoop + case 921: // keyword -> tkLoop { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 917: // keyword -> tkExtensionMethod + case 922: // keyword -> tkExtensionMethod { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 918: // keyword -> tkOverload + case 923: // keyword -> tkOverload { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 919: // keyword -> tkReintroduce + case 924: // keyword -> tkReintroduce { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 920: // keyword -> tkForward + case 925: // keyword -> tkForward { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 921: // reserved_keyword -> tkOperator + case 926: // reserved_keyword -> tkOperator { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 922: // overload_operator -> tkMinus + case 927: // overload_operator -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 923: // overload_operator -> tkPlus + case 928: // overload_operator -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 924: // overload_operator -> tkSlash + case 929: // overload_operator -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 925: // overload_operator -> tkStar + case 930: // overload_operator -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 926: // overload_operator -> tkEqual + case 931: // overload_operator -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 927: // overload_operator -> tkGreater + case 932: // overload_operator -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 928: // overload_operator -> tkGreaterEqual + case 933: // overload_operator -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 929: // overload_operator -> tkLower + case 934: // overload_operator -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 930: // overload_operator -> tkLowerEqual + case 935: // overload_operator -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 931: // overload_operator -> tkNotEqual + case 936: // overload_operator -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 932: // overload_operator -> tkOr + case 937: // overload_operator -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 933: // overload_operator -> tkXor + case 938: // overload_operator -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 934: // overload_operator -> tkAnd + case 939: // overload_operator -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 935: // overload_operator -> tkDiv + case 940: // overload_operator -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 936: // overload_operator -> tkMod + case 941: // overload_operator -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 937: // overload_operator -> tkShl + case 942: // overload_operator -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 938: // overload_operator -> tkShr + case 943: // overload_operator -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 939: // overload_operator -> tkNot + case 944: // overload_operator -> tkNot { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 940: // overload_operator -> tkIn + case 945: // overload_operator -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 941: // overload_operator -> tkImplicit + case 946: // overload_operator -> tkImplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 942: // overload_operator -> tkExplicit + case 947: // overload_operator -> tkExplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 943: // overload_operator -> assign_operator + case 948: // overload_operator -> assign_operator { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 944: // overload_operator -> tkStarStar + case 949: // overload_operator -> tkStarStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 945: // assign_operator -> tkAssign + case 950: // assign_operator -> tkAssign { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 946: // assign_operator -> tkPlusEqual + case 951: // assign_operator -> tkPlusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 947: // assign_operator -> tkMinusEqual + case 952: // assign_operator -> tkMinusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 948: // assign_operator -> tkMultEqual + case 953: // assign_operator -> tkMultEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 949: // assign_operator -> tkDivEqual + case 954: // assign_operator -> tkDivEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 950: // func_decl_lambda -> identifier, tkArrow, lambda_function_body + case 955: // func_decl_lambda -> identifier, tkArrow, lambda_function_body { var idList = new ident_list(ValueStack[ValueStack.Depth-3].id, LocationStack[LocationStack.Depth-3]); var formalPars = new formal_parameters(new typed_parameters(idList, new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), LocationStack[LocationStack.Depth-3]), parametr_kind.none, null, LocationStack[LocationStack.Depth-3]), LocationStack[LocationStack.Depth-3]); @@ -7206,7 +7260,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, + case 956: // func_decl_lambda -> tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, // tkArrow, lambda_function_body { // ����� ���� ������������� �� ���� � ���� ��������� lambda_inferred_type, ���� ������ ��� null! @@ -7216,7 +7270,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkColon, fptype, tkRoundClose, + case 957: // 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]); @@ -7228,7 +7282,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, + case 958: // func_decl_lambda -> tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, // tkRoundClose, lambda_type_ref_noproctype, tkArrow, // lambda_function_body { @@ -7242,7 +7296,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, + case 959: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, // full_lambda_fp_list, tkRoundClose, // lambda_type_ref_noproctype, tkArrow, lambda_function_body { @@ -7257,7 +7311,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, expr_l1, tkComma, expr_l1_list, + case 960: // func_decl_lambda -> tkRoundOpen, expr_l1, tkComma, expr_l1_list, // lambda_type_ref, optional_full_lambda_fp_list, // tkRoundClose, rem_lambda { @@ -7326,62 +7380,62 @@ public partial class GPPGParser: ShiftReduceParser expl_func_decl_lambda + case 961: // func_decl_lambda -> expl_func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 957: // optional_full_lambda_fp_list -> /* empty */ + case 962: // optional_full_lambda_fp_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 958: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list + case 963: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 959: // rem_lambda -> lambda_type_ref_noproctype, tkArrow, lambda_function_body + case 964: // 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 960: // expl_func_decl_lambda -> tkFunction, lambda_type_ref_noproctype, tkArrow, + case 965: // expl_func_decl_lambda -> tkFunction, lambda_type_ref_noproctype, tkArrow, // lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, 1, CurrentLocationSpan); } break; - case 961: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, tkRoundClose, + case 966: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, tkRoundClose, // lambda_type_ref_noproctype, tkArrow, // lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), null, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, 1, CurrentLocationSpan); } break; - case 962: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, + case 967: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, // tkRoundClose, lambda_type_ref_noproctype, tkArrow, // lambda_function_body { CurrentSemanticValue.ex = new function_lambda_definition(lambdaHelper.CreateLambdaName(), ValueStack[ValueStack.Depth-5].stn as formal_parameters, ValueStack[ValueStack.Depth-3].td, ValueStack[ValueStack.Depth-1].stn as statement_list, 1, CurrentLocationSpan); } break; - case 963: // expl_func_decl_lambda -> tkProcedure, tkArrow, lambda_procedure_body + case 968: // 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 964: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, tkRoundClose, tkArrow, + case 969: // 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 965: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, full_lambda_fp_list, + case 970: // 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 966: // full_lambda_fp_list -> lambda_simple_fp_sect + case 971: // 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) @@ -7401,97 +7455,97 @@ public partial class GPPGParser: ShiftReduceParser full_lambda_fp_list, tkSemiColon, lambda_simple_fp_sect + case 972: // 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 968: // lambda_simple_fp_sect -> ident_list, lambda_type_ref + case 973: // 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 969: // lambda_type_ref -> /* empty */ + case 974: // lambda_type_ref -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 970: // lambda_type_ref -> tkColon, fptype + case 975: // lambda_type_ref -> tkColon, fptype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 971: // lambda_type_ref_noproctype -> /* empty */ + case 976: // lambda_type_ref_noproctype -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new PascalABCCompiler.TreeRealization.lambda_any_type_node(), null); } break; - case 972: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype + case 977: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 973: // common_lambda_body -> compound_stmt + case 978: // common_lambda_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 974: // common_lambda_body -> if_stmt + case 979: // common_lambda_body -> if_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 975: // common_lambda_body -> while_stmt + case 980: // common_lambda_body -> while_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 976: // common_lambda_body -> repeat_stmt + case 981: // common_lambda_body -> repeat_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 977: // common_lambda_body -> for_stmt + case 982: // common_lambda_body -> for_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 978: // common_lambda_body -> foreach_stmt + case 983: // common_lambda_body -> foreach_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 979: // common_lambda_body -> loop_stmt + case 984: // common_lambda_body -> loop_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 980: // common_lambda_body -> case_stmt + case 985: // common_lambda_body -> case_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 981: // common_lambda_body -> try_stmt + case 986: // common_lambda_body -> try_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 982: // common_lambda_body -> lock_stmt + case 987: // common_lambda_body -> lock_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 983: // common_lambda_body -> raise_stmt + case 988: // common_lambda_body -> raise_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 984: // common_lambda_body -> yield_stmt + case 989: // common_lambda_body -> yield_stmt { parsertools.AddErrorFromResource("YIELD_STATEMENT_CANNOT_BE_USED_IN_LAMBDA_BODY", CurrentLocationSpan); } break; - case 985: // lambda_function_body -> expr_l1_for_lambda + case 990: // lambda_function_body -> expr_l1_for_lambda { var id = SyntaxVisitors.HasNameVisitor.HasName(ValueStack[ValueStack.Depth-1].ex, "Result"); if (id != null) @@ -7503,22 +7557,22 @@ public partial class GPPGParser: ShiftReduceParser common_lambda_body + case 991: // lambda_function_body -> common_lambda_body { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 987: // lambda_procedure_body -> proc_call + case 992: // lambda_procedure_body -> proc_call { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 988: // lambda_procedure_body -> assignment + case 993: // lambda_procedure_body -> assignment { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 989: // lambda_procedure_body -> common_lambda_body + case 994: // lambda_procedure_body -> common_lambda_body { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } diff --git a/Parsers/PascalABCParserNewSaushkin/PABC.tags b/Parsers/PascalABCParserNewSaushkin/PABC.tags index 5b37ea645..bf0f5894e 100644 --- a/Parsers/PascalABCParserNewSaushkin/PABC.tags +++ b/Parsers/PascalABCParserNewSaushkin/PABC.tags @@ -232,7 +232,6 @@ - diff --git a/Parsers/PascalABCParserNewSaushkin/PABC.ymc b/Parsers/PascalABCParserNewSaushkin/PABC.ymc index db2aa7dfe..7d8c2138a 100644 --- a/Parsers/PascalABCParserNewSaushkin/PABC.ymc +++ b/Parsers/PascalABCParserNewSaushkin/PABC.ymc @@ -313,6 +313,8 @@ script= + + diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index a81ad1f91..8043d75f4 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.7.2.2830 +3.7.2.2838 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index fb9007626..f57ce29a6 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.7.2.2830' +!define VERSION '3.7.2.2838' diff --git a/SyntaxVisitors/SugarVisitors/SliceDesugarVisitor.cs b/SyntaxVisitors/SugarVisitors/SliceDesugarVisitor.cs index e030a7371..7a6cf20dc 100644 --- a/SyntaxVisitors/SugarVisitors/SliceDesugarVisitor.cs +++ b/SyntaxVisitors/SugarVisitors/SliceDesugarVisitor.cs @@ -32,10 +32,12 @@ namespace SyntaxVisitors.SugarVisitors eel.Add(sl1); IndexVisitor.New.ProcessNode(sl1); // индексный визитор сам не вызывается поскольку в многомерных срезах хранится List кортежей троек expression, который сам не обходится var sl2 = slice.Item2; - eel.Add(slice.Item2); + eel.Add(sl2); IndexVisitor.New.ProcessNode(sl2); + var sl3 = slice.Item3; // и step тоже надо обходить!!! + eel.Add(sl3); + IndexVisitor.New.ProcessNode(sl3); - eel.Add(slice.Item3); var mc = new method_call(tup, eel, sc); // sc - не очень хорошо - ошибка будет в общем месте el.Add(mc); // по идее все параметры готовы. Надо только проверить, что они целые diff --git a/TestSuite/CompilationSamples/PABCSystem.pas b/TestSuite/CompilationSamples/PABCSystem.pas index 9705c7561..ad6481f89 100644 --- a/TestSuite/CompilationSamples/PABCSystem.pas +++ b/TestSuite/CompilationSamples/PABCSystem.pas @@ -10026,7 +10026,7 @@ begin Result := Self.Reverse.Skip(count).Reverse; end; -/// Декартово произведение последовательностей +/// Возвращает декартово произведение последовательностей в виде последовательности пар function Cartesian(Self: sequence of T; b: sequence of T1): sequence of (T, T1); extensionmethod; begin if b = nil then @@ -10037,7 +10037,7 @@ begin yield (x, y) end; -/// Декартово произведение последовательностей +/// Возвращает декартово произведение последовательностей, проектируя каждую пару на значение function Cartesian(Self: sequence of T; b: sequence of T1; func: (T,T1)->T2): sequence of T2; extensionmethod; begin if b = nil then diff --git a/TestSuite/CompilationSamples/SF.pas b/TestSuite/CompilationSamples/SF.pas index 495bbd2a5..1d2ebfa1a 100644 --- a/TestSuite/CompilationSamples/SF.pas +++ b/TestSuite/CompilationSamples/SF.pas @@ -24,6 +24,7 @@ type ProcI = int -> (); ProcR = real -> (); ProcS = string -> (); + HS = HashSet; procedure Pr(params a: array of object) := Print(a); procedure Pr(o: object) := Print(o); @@ -216,6 +217,10 @@ function Agr(Self: sequence of T; seed: TAcc; func: (TAcc,T)->TAcc): TAc /// Фильтрует последовательность по условию cond function Wh(Self: sequence of T; cond: T->boolean): sequence of T; extensionmethod := Self.Where(cond); +/// Группирует элементы последовательности в соответствии с заданной функцией проекции на ключ группы +function GrBy(Self: sequence of T; selector: T->TKey): sequence of System.Linq.IGrouping; extensionmethod := Self.GroupBy(selector); + + /// Преобразует последовательность в массив function ToA(Self: sequence of T): array of T; extensionmethod := Self.ToArray; @@ -227,10 +232,6 @@ function ToHS(Self: sequence of T): HashSet; extensionmethod := Self.ToHas /// Преобразует последовательность в SortedSet function ToSS(Self: sequence of T): SortedSet; extensionmethod := Self.ToSortedSet; -/// Преобразует последовательность в HashSet -function HS(s: sequence of T): HashSet := s.ToHashSet; -/// Преобразует последовательность в SortedSet -function SS(s: sequence of T): SortedSet := s.ToSortedSet; /// Инвертирует последовательность procedure Rev(a: array of T) := Reverse(a); @@ -280,6 +281,15 @@ function Cart(Self: array of T; n: integer): sequence of array of T; extensio /// Возвращает n-тую декартову степень множества элементов, заданного массивом function Cart(Self: sequence of T; n: integer): sequence of array of T; extensionmethod := Self.Cartesian(n); +/// Возвращает декартово произведение последовательностей в виде последовательности пар +function Cart(Self: sequence of T; b: sequence of T1): sequence of (T, T1); extensionmethod := Self.Cartesian(b); + +/// Возвращает декартово произведение последовательностей, проектируя каждую пару на значение +function Cart(Self: sequence of T; b: sequence of T1; func: (T,T1)->T2): sequence of T2; extensionmethod := Self.Cartesian(b,func); + +/// Возвращает исходную последовательность или одноэлементную последовательность если исходная последовательность пуста +function DefIfE(Self: sequence of T; def: T): sequence of T; extensionmethod := Self.DefaultIfEmpty(def); + /// Возвращает все сочетания по m элементов function Cmb(Self: array of T; m: integer): sequence of array of T; extensionmethod := Self.Combinations(m); diff --git a/TestSuite/TestMultiSlices_1.pas b/TestSuite/TestMultiSlices_1.pas index f2041985f..97269c609 100644 --- a/TestSuite/TestMultiSlices_1.pas +++ b/TestSuite/TestMultiSlices_1.pas @@ -26,5 +26,5 @@ begin AssertEq(m[1,:],|5,6,7,8|); AssertEq(m[^1,:],|9,10,11,12|); AssertEq(m[:,^1],|4,8,12|); - Print(m[:,^1]); + //Print(m[:,^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 cdb0ddb25..e8b7b5571 100644 --- a/TreeConverter/TreeConversion/semantic_checks_for_sugar.cs +++ b/TreeConverter/TreeConversion/semantic_checks_for_sugar.cs @@ -74,14 +74,37 @@ namespace PascalABCCompiler.TreeConverter } } + void CheckInteger(expression ex) + { + if (ex == null) + return; + var semex = convert_strong(ex); + var b = convertion_data_and_alghoritms.can_convert_type(semex, SystemLibrary.SystemLibrary.integer_type); + if (!b) + AddError(get_location(ex), "INTEGER_VALUE_EXPECTED"); + } + + void CheckIntegerOrIndex(expression ex) + { + var semex = convert_strong(ex); + var b = convertion_data_and_alghoritms.can_convert_type(semex, SystemLibrary.SystemLibrary.integer_type); + var toIsIndex = (semex is common_constructor_call toCall) && + toCall.common_type.comprehensive_namespace.namespace_full_name.Equals("PABCSystem") && + toCall.common_type.PrintableName.Equals("SystemIndex"); + + var toIsIndex1 = (semex is compiled_constructor_call toCall1) && + toCall1.compiled_type.compiled_type.FullName.Equals("PABCSystem.SystemIndex"); + + if (!b && !toIsIndex && !toIsIndex1) + { + AddError(get_location(ex), "INTEGER_VALUE_EXPECTED" + semex); + } + } + void semantic_check_method_call_as_slice_expr(SyntaxTree.method_call mc) // нельзя проверять сахарный узел, т.к.могут быть вложенные сахарные expression!! { var v = (mc.dereferencing_value as dot_node).left; - var from = mc.parameters.expressions[1] as expression; - var to = mc.parameters.expressions[2] as expression; - expression step = mc.parameters.expressions.Count > 3 ? mc.parameters.expressions[3] : null; - var semvar = convert_strong(v); if (semvar is typed_expression) semvar = convert_typed_expression_to_function_call(semvar as typed_expression); @@ -108,38 +131,49 @@ namespace PascalABCCompiler.TreeConverter if (IsSlicedType == 0) AddError(get_location(v), "BAD_SLICE_OBJECT"); - var semfrom = convert_strong(from); - var b = convertion_data_and_alghoritms.can_convert_type(semfrom, SystemLibrary.SystemLibrary.integer_type); - var fromIsIndex = (semfrom is common_constructor_call fromCall) && - fromCall.common_type.comprehensive_namespace.namespace_full_name.Equals("PABCSystem") && - fromCall.common_type.PrintableName.Equals("SystemIndex"); - if (!b && !fromIsIndex) - AddError(get_location(from), "INTEGER_VALUE_EXPECTED"); - - // semantic tree - type special kind - // staticSystemLib посмотреть. - // SystemIndex - переименовать. - var semto = convert_strong(to); - b = convertion_data_and_alghoritms.can_convert_type(semto, SystemLibrary.SystemLibrary.integer_type); - var toIsIndex = (semto is common_constructor_call toCall) && - toCall.common_type.comprehensive_namespace.namespace_full_name.Equals("PABCSystem") && - toCall.common_type.PrintableName.Equals("SystemIndex"); - if (!b && !toIsIndex) - AddError(get_location(to), "INTEGER_VALUE_EXPECTED"); - - if (step != null) - { - var semstep = convert_strong(step); - b = convertion_data_and_alghoritms.can_convert_type(semstep, SystemLibrary.SystemLibrary.integer_type); - if (!b) - AddError(get_location(step), "INTEGER_VALUE_EXPECTED"); - } + var from = mc.parameters.expressions[1]; + var to = mc.parameters.expressions[2]; + expression step = mc.parameters.expressions.Count > 3 ? mc.parameters.expressions[3] : null; + CheckIntegerOrIndex(from); + CheckIntegerOrIndex(to); + CheckInteger(step); } void semantic_check_method_call_as_slice_expr_multi(SyntaxTree.method_call mc) { + var v = (mc.dereferencing_value as dot_node).left; + var semvar = convert_strong(v); + if (semvar is typed_expression) + semvar = convert_typed_expression_to_function_call(semvar as typed_expression); + + if (semvar.type.type_special_kind != SemanticTree.type_special_kind.array_kind) + AddError(semvar.location, "SLICES_MULTI_DIMENSIONAL_ARRAY_EXPECTED"); + + // Теперь с размерностями разберёмся + int rank = 0; + if (semvar.type is compiled_type_node) + rank = (semvar.type as compiled_type_node).rank; + else if (semvar.type is common_type_node) + rank = (semvar.type as common_type_node).rank; + if (rank != mc.parameters.Count) + AddError(semvar.location, "NUMBER_OF_SLICES_IN_MULTIDIMENSIONAL_ARRAY_SHOULD_BE_EQUAL_TO_ARRAY_RANK"); + + foreach (var param in mc.parameters.expressions) + { + var p = param as method_call; // Tuple.Create + if (p == null) + AddError(semvar.location, "_Compiler_error_param_must_be_Tuple"); + + var from = p.parameters.expressions[0]; + var to = p.parameters.expressions[1]; + var step = p.parameters.expressions[2]; + + CheckIntegerOrIndex(from); + CheckIntegerOrIndex(to); + CheckInteger(step); + } } /*void semantic_check_tuple(SyntaxTree.tuple_node tup) diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index 9705c7561..ad6481f89 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -10026,7 +10026,7 @@ begin Result := Self.Reverse.Skip(count).Reverse; end; -/// Декартово произведение последовательностей +/// Возвращает декартово произведение последовательностей в виде последовательности пар function Cartesian(Self: sequence of T; b: sequence of T1): sequence of (T, T1); extensionmethod; begin if b = nil then @@ -10037,7 +10037,7 @@ begin yield (x, y) end; -/// Декартово произведение последовательностей +/// Возвращает декартово произведение последовательностей, проектируя каждую пару на значение function Cartesian(Self: sequence of T; b: sequence of T1; func: (T,T1)->T2): sequence of T2; extensionmethod; begin if b = nil then diff --git a/bin/Lib/SF.pas b/bin/Lib/SF.pas index 495bbd2a5..1d2ebfa1a 100644 --- a/bin/Lib/SF.pas +++ b/bin/Lib/SF.pas @@ -24,6 +24,7 @@ type ProcI = int -> (); ProcR = real -> (); ProcS = string -> (); + HS = HashSet; procedure Pr(params a: array of object) := Print(a); procedure Pr(o: object) := Print(o); @@ -216,6 +217,10 @@ function Agr(Self: sequence of T; seed: TAcc; func: (TAcc,T)->TAcc): TAc /// Фильтрует последовательность по условию cond function Wh(Self: sequence of T; cond: T->boolean): sequence of T; extensionmethod := Self.Where(cond); +/// Группирует элементы последовательности в соответствии с заданной функцией проекции на ключ группы +function GrBy(Self: sequence of T; selector: T->TKey): sequence of System.Linq.IGrouping; extensionmethod := Self.GroupBy(selector); + + /// Преобразует последовательность в массив function ToA(Self: sequence of T): array of T; extensionmethod := Self.ToArray; @@ -227,10 +232,6 @@ function ToHS(Self: sequence of T): HashSet; extensionmethod := Self.ToHas /// Преобразует последовательность в SortedSet function ToSS(Self: sequence of T): SortedSet; extensionmethod := Self.ToSortedSet; -/// Преобразует последовательность в HashSet -function HS(s: sequence of T): HashSet := s.ToHashSet; -/// Преобразует последовательность в SortedSet -function SS(s: sequence of T): SortedSet := s.ToSortedSet; /// Инвертирует последовательность procedure Rev(a: array of T) := Reverse(a); @@ -280,6 +281,15 @@ function Cart(Self: array of T; n: integer): sequence of array of T; extensio /// Возвращает n-тую декартову степень множества элементов, заданного массивом function Cart(Self: sequence of T; n: integer): sequence of array of T; extensionmethod := Self.Cartesian(n); +/// Возвращает декартово произведение последовательностей в виде последовательности пар +function Cart(Self: sequence of T; b: sequence of T1): sequence of (T, T1); extensionmethod := Self.Cartesian(b); + +/// Возвращает декартово произведение последовательностей, проектируя каждую пару на значение +function Cart(Self: sequence of T; b: sequence of T1; func: (T,T1)->T2): sequence of T2; extensionmethod := Self.Cartesian(b,func); + +/// Возвращает исходную последовательность или одноэлементную последовательность если исходная последовательность пуста +function DefIfE(Self: sequence of T; def: T): sequence of T; extensionmethod := Self.DefaultIfEmpty(def); + /// Возвращает все сочетания по m элементов function Cmb(Self: array of T; m: integer): sequence of array of T; extensionmethod := Self.Combinations(m); diff --git a/bin/Lng/Eng/SemanticErrors_ms.dat b/bin/Lng/Eng/SemanticErrors_ms.dat index ccd30faa2..5a15f127f 100644 --- a/bin/Lng/Eng/SemanticErrors_ms.dat +++ b/bin/Lng/Eng/SemanticErrors_ms.dat @@ -46,4 +46,6 @@ STATIC_CLASS_CANNOT_HAVE_PREDEFINITION=Static class cannot be predefined OPERATIONS_CANNOT_BE_CALLED_USING_THIS_SYNTAX=Operations cannot be called using this syntax MEMBER_{0}_OF_TYPE_{1}_CANNOT_BE_FOUND_IN_THE_CONTEEXT_OF_FUNCTION_WITH_YIELD=Name {0} cannot be found in type {1} in the context of function with yield statement UNCOMPARABLE_TYPES_IN_ARRAY_CONST=Uncomparable types in array initializers -IMPOSSIBLE_TO_CONVERT_ARRAY_CONST_TO_{0}=It is impossible to convert array initializer to type {0} \ No newline at end of file +IMPOSSIBLE_TO_CONVERT_ARRAY_CONST_TO_{0}=It is impossible to convert array initializer to type {0} +SLICES_MULTI_DIMENSIONAL_ARRAY_EXPECTED=Multidimensional slices are allowed for multidimensional arrays only +NUMBER_OF_SLICES_IN_MULTIDIMENSIONAL_ARRAY_SHOULD_BE_EQUAL_TO_ARRAY_RANK=Number of slices in multidimensional array should be equal to the array rank \ No newline at end of file diff --git a/bin/Lng/Rus/SemanticErrors_ms.dat b/bin/Lng/Rus/SemanticErrors_ms.dat index 79ae7b6c0..c880dac14 100644 --- a/bin/Lng/Rus/SemanticErrors_ms.dat +++ b/bin/Lng/Rus/SemanticErrors_ms.dat @@ -46,4 +46,6 @@ STATIC_CLASS_CANNOT_HAVE_PREDEFINITION=Статический класс не м OPERATIONS_CANNOT_BE_CALLED_USING_THIS_SYNTAX=Операции нельзя вызывать, используя данный синтаксис MEMBER_{0}_OF_TYPE_{1}_CANNOT_BE_FOUND_IN_THE_CONTEEXT_OF_FUNCTION_WITH_YIELD=Имя {0} не удаётся найти в типе {1} в контексте функции с оператором yield UNCOMPARABLE_TYPES_IN_ARRAY_CONST=Несовместимые типы при задании массива -IMPOSSIBLE_TO_CONVERT_ARRAY_CONST_TO_{0}=Невозможно преобразовать инициализатор массива к типу {0} \ No newline at end of file +IMPOSSIBLE_TO_CONVERT_ARRAY_CONST_TO_{0}=Невозможно преобразовать инициализатор массива к типу {0} +SLICES_MULTI_DIMENSIONAL_ARRAY_EXPECTED=Многмерные срезы доступны только для многомерных массивов +NUMBER_OF_SLICES_IN_MULTIDIMENSIONAL_ARRAY_SHOULD_BE_EQUAL_TO_ARRAY_RANK=Количество срезов или индексов многомерного массива должно совпадать с количеством размерностей этого массива \ No newline at end of file