From c66bfa7d922ebb44c35eabbae79ce5861ec82f0d Mon Sep 17 00:00:00 2001 From: Mikhalkovich Stanislav Date: Thu, 21 Mar 2024 21:21:59 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=BD=D0=BE=D0=B3=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D1=80=D0=BE=D1=87=D0=BD=D1=8B=D0=B5=20=D1=81=D1=82=D1=80=D0=BE?= =?UTF-8?q?=D0=BA=D0=BE=D0=B2=D1=8B=D0=B5=20=D0=BB=D0=B8=D1=82=D0=B5=D1=80?= =?UTF-8?q?=D0=B0=D0=BB=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CodeCompletion/CodeFormatter.cs | 15 +- Configuration/GlobalAssemblyInfo.cs | 2 +- Configuration/Version.defs | 4 +- .../PascalABCParserNewSaushkin/ABCPascal.cs | 333 +- .../PascalABCParserNewSaushkin/ABCPascal.lex | 8 + .../PascalABCParserNewSaushkin/ABCPascal.y | 15 +- .../ABCPascalParserTools.cs | 51 + .../ABCPascalYacc.cs | 4110 +++++++++-------- Parsers/PascalABCParserNewSaushkin/PABC.ymc | 1 + Release/pabcversion.txt | 2 +- ReleaseGenerators/PascalABCNET_version.nsh | 2 +- SyntaxTree/tree/TreeHelper.cs | 1 + SyntaxTree/tree/tree.xml | 1 + TestSuite/CompilationSamples/WPF.pas | 1 + bin/Lib/WPF.pas | 1 + 15 files changed, 2332 insertions(+), 2215 deletions(-) diff --git a/CodeCompletion/CodeFormatter.cs b/CodeCompletion/CodeFormatter.cs index a82595034..57875a057 100644 --- a/CodeCompletion/CodeFormatter.cs +++ b/CodeCompletion/CodeFormatter.cs @@ -1135,9 +1135,18 @@ namespace CodeFormatters int pos = GetPosition(_string_const.source_context.begin_position.line_num, _string_const.source_context.begin_position.column_num); if (Text[pos] == '$') sb.Append('$'); - sb.Append("'"); - sb.Append(_string_const.Value.Replace("'","''")); - sb.Append("'"); + if (_string_const.IsMultiline) + { + //sb.Append("'''"); + sb.Append(_string_const.Value); + //sb.Append("'''"); + } + else + { + sb.Append("'"); + sb.Append(_string_const.Value.Replace("'", "''")); + sb.Append("'"); + } } public override void visit(expression_list _expression_list) diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 48e379a9f..6e6c4c3d1 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 = "9"; public const string Build = "0"; - public const string Revision = "3438"; + public const string Revision = "3439"; 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 7ecffb331..f1981612a 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%COREVERSION%=0 -%REVISION%=3438 %MINOR%=9 +%REVISION%=3439 +%COREVERSION%=0 %MAJOR%=3 diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs index a95e56b9c..7c3463024 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.cs @@ -1,9 +1,9 @@ // // This CSharp output file generated by Gardens Point LEX // Version: 1.1.3.301 -// Machine: DESKTOP-2BJCJ7I -// DateTime: 21.02.2024 20:44:02 -// UserName: ibond +// Machine: DESKTOP-G8V08V4 +// DateTime: 21.03.2024 20:00:51 +// UserName: ????????? // GPLEX input file // GPLEX frame file // @@ -124,8 +124,8 @@ namespace GPPGParserScanner enum Result {accept, noMatch, contextFound}; - const int maxAccept = 72; - const int initial = 73; + const int maxAccept = 74; + const int initial = 75; const int eofNum = 0; const int goStart = -1; const int INITIAL = 0; @@ -177,19 +177,19 @@ public PT parsertools; } }; - static int[] startState = new int[] {73, 110, 111, 112, 112, 113, + static int[] startState = new int[] {75, 117, 118, 119, 119, 120, 0}; #region TwoLevelCharacterMap // - // There are 51 equivalence classes + // There are 52 equivalence classes // There are 256 character sequence regions // There are 47 tables, 12032 entries // static sbyte[] mLo0 = new sbyte[256] { /* '\0' */ 5, 43, 5, 5, 5, 5, 5, 5, 5, 12, 0, 5, 5, 6, 5, 5, /* '\x10' */ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, -/* '\x20' */ 12, 5, 5, 11, 4, 5, 13, 50, 7, 9, 8, 24, 14, 25, 16, 1, +/* '\x20' */ 51, 5, 5, 11, 4, 5, 13, 50, 7, 9, 8, 24, 14, 25, 16, 1, /* '0' */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 15, 17, 27, 23, 26, 20, /* '@' */ 22, 48, 46, 48, 48, 49, 48, 44, 44, 47, 44, 44, 44, 44, 44, 44, /* 'P' */ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 18, 29, 19, 28, 21, @@ -1008,7 +1008,7 @@ public PT parsertools; #region CompressedCharacterMap // - // There are 51 equivalence classes + // There are 52 equivalence classes // There are 21 character sequence regions // There are 6 tables, 1255 entries // There are 15 runs, 0 singletons @@ -1177,64 +1177,64 @@ public PT parsertools; return MapC(code); } - static Table[] NxS = new Table[115] { + static Table[] NxS = new Table[122] { /* NxS[ 0] */ new Table(0, 0, 0, null), -/* NxS[ 1] */ new Table(1, 23, -1, new sbyte[] {61, -1, -1, -1, -1, -1, +/* NxS[ 1] */ new Table(1, 23, -1, new sbyte[] {63, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 62}), + 64}), /* NxS[ 2] */ new Table(0, 0, -1, null), -/* NxS[ 3] */ new Table(4, 1, -1, new sbyte[] {109}), -/* NxS[ 4] */ new Table(31, 20, -1, new sbyte[] {58, -1, -1, -1, -1, -1, - -1, -1, -1, 58, -1, -1, -1, -1, 58, 58, -1, 58, 58, 108}), -/* NxS[ 5] */ new Table(8, 1, -1, new sbyte[] {57}), -/* NxS[ 6] */ new Table(8, 16, -1, new sbyte[] {55, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 56}), +/* NxS[ 3] */ new Table(4, 1, -1, new sbyte[] {116}), +/* NxS[ 4] */ new Table(31, 20, -1, new sbyte[] {60, -1, -1, -1, -1, -1, + -1, -1, -1, 60, -1, -1, -1, -1, 60, 60, -1, 60, 60, 115}), +/* NxS[ 5] */ new Table(8, 1, -1, new sbyte[] {59}), +/* NxS[ 6] */ new Table(8, 16, -1, new sbyte[] {57, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 58}), /* NxS[ 7] */ new Table(0, 0, -1, null), /* NxS[ 8] */ new Table(0, 0, -1, null), -/* NxS[ 9] */ new Table(43, 39, 51, new sbyte[] {-1, 51, 52, 51, 51, 51, - 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 106, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 51, -1, -1, -1, -1, -1, -1, -1, -1, - -1}), +/* NxS[ 9] */ new Table(11, 39, -1, new sbyte[] {113, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, 53, + 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, -1, 53, 54, 53, 53, 53, + 53}), /* NxS[ 10] */ new Table(21, 29, -1, new sbyte[] {28, -1, -1, -1, -1, -1, -1, -1, -1, -1, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -1, 28, -1, 28, 28, 28, 28}), /* NxS[ 11] */ new Table(0, 0, -1, null), -/* NxS[ 12] */ new Table(23, 1, -1, new sbyte[] {50}), -/* NxS[ 13] */ new Table(16, 1, -1, new sbyte[] {49}), +/* NxS[ 12] */ new Table(23, 1, -1, new sbyte[] {52}), +/* NxS[ 13] */ new Table(16, 1, -1, new sbyte[] {51}), /* NxS[ 14] */ new Table(0, 0, -1, null), /* NxS[ 15] */ new Table(0, 0, -1, null), /* NxS[ 16] */ new Table(0, 0, -1, null), -/* NxS[ 17] */ new Table(16, 5, -1, new sbyte[] {46, -1, 47, -1, 48}), +/* NxS[ 17] */ new Table(16, 5, -1, new sbyte[] {48, -1, 49, -1, 50}), /* NxS[ 18] */ new Table(21, 29, -1, new sbyte[] {28, -1, -1, -1, -1, -1, -1, -1, -1, -1, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -1, 28, 28, 28, 28, 28, 28}), /* NxS[ 19] */ new Table(0, 0, -1, null), /* NxS[ 20] */ new Table(0, 0, -1, null), -/* NxS[ 21] */ new Table(23, 1, -1, new sbyte[] {45}), -/* NxS[ 22] */ new Table(23, 4, -1, new sbyte[] {43, -1, -1, 44}), -/* NxS[ 23] */ new Table(23, 1, -1, new sbyte[] {42}), -/* NxS[ 24] */ new Table(23, 5, -1, new sbyte[] {37, -1, -1, 38, 79}), +/* NxS[ 21] */ new Table(23, 1, -1, new sbyte[] {47}), +/* NxS[ 22] */ new Table(23, 4, -1, new sbyte[] {45, -1, -1, 46}), +/* NxS[ 23] */ new Table(23, 1, -1, new sbyte[] {44}), +/* NxS[ 24] */ new Table(23, 5, -1, new sbyte[] {39, -1, -1, 40, 86}), /* NxS[ 25] */ new Table(0, 0, -1, null), -/* NxS[ 26] */ new Table(7, 1, -1, new sbyte[] {36}), +/* NxS[ 26] */ new Table(7, 1, -1, new sbyte[] {38}), /* NxS[ 27] */ new Table(0, 0, -1, null), /* NxS[ 28] */ new Table(21, 29, -1, new sbyte[] {28, -1, -1, -1, -1, -1, -1, -1, -1, -1, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -1, 28, 28, 28, 28, 28, 28}), /* NxS[ 29] */ new Table(0, 0, -1, null), -/* NxS[ 30] */ new Table(16, 34, -1, new sbyte[] {75, -1, -1, -1, -1, 30, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 76, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 30, 77, -1, -1, 76}), -/* NxS[ 31] */ new Table(50, 2, 74, new sbyte[] {32, -1}), -/* NxS[ 32] */ new Table(50, 1, -1, new sbyte[] {74}), -/* NxS[ 33] */ new Table(0, 0, -1, null), -/* NxS[ 34] */ new Table(21, 25, -1, new sbyte[] {34, -1, -1, -1, -1, -1, +/* NxS[ 30] */ new Table(16, 34, -1, new sbyte[] {82, -1, -1, -1, -1, 30, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 83, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 30, 84, -1, -1, 83}), +/* NxS[ 31] */ new Table(50, 3, 76, new sbyte[] {32, 76, -1}), +/* NxS[ 32] */ new Table(50, 1, -1, new sbyte[] {77}), +/* NxS[ 33] */ new Table(50, 1, -1, new sbyte[] {76}), +/* NxS[ 34] */ new Table(0, 0, -1, null), +/* NxS[ 35] */ new Table(0, 0, -1, null), +/* NxS[ 36] */ new Table(21, 25, -1, new sbyte[] {36, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 34}), -/* NxS[ 35] */ new Table(21, 29, -1, new sbyte[] {35, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 76, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 35, -1, -1, -1, 76}), -/* NxS[ 36] */ new Table(0, 0, -1, null), -/* NxS[ 37] */ new Table(0, 0, -1, null), + -1, -1, 36}), +/* NxS[ 37] */ new Table(21, 29, -1, new sbyte[] {37, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 83, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 37, -1, -1, -1, 83}), /* NxS[ 38] */ new Table(0, 0, -1, null), /* NxS[ 39] */ new Table(0, 0, -1, null), /* NxS[ 40] */ new Table(0, 0, -1, null), @@ -1248,87 +1248,95 @@ public PT parsertools; /* NxS[ 48] */ new Table(0, 0, -1, null), /* NxS[ 49] */ new Table(0, 0, -1, null), /* NxS[ 50] */ new Table(0, 0, -1, null), -/* NxS[ 51] */ new Table(21, 29, -1, new sbyte[] {51, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, - -1, 51, 51, 51, 51, 51, 51}), -/* NxS[ 52] */ new Table(45, 1, -1, new sbyte[] {52}), -/* NxS[ 53] */ new Table(0, 13, -1, new sbyte[] {53, -1, -1, -1, -1, -1, - 53, -1, -1, -1, -1, -1, 53}), -/* NxS[ 54] */ new Table(0, 13, -1, new sbyte[] {54, -1, -1, -1, -1, -1, - 54, -1, -1, -1, -1, -1, 54}), -/* NxS[ 55] */ new Table(0, 0, -1, null), -/* NxS[ 56] */ new Table(0, 0, -1, null), +/* NxS[ 51] */ new Table(0, 0, -1, null), +/* NxS[ 52] */ new Table(0, 0, -1, null), +/* NxS[ 53] */ new Table(21, 29, -1, new sbyte[] {53, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, + -1, 53, 53, 53, 53, 53, 53}), +/* NxS[ 54] */ new Table(45, 1, -1, new sbyte[] {54}), +/* NxS[ 55] */ new Table(51, 14, -1, new sbyte[] {55, 55, -1, -1, -1, -1, + -1, 55, -1, -1, -1, -1, -1, 55}), +/* NxS[ 56] */ new Table(51, 14, -1, new sbyte[] {56, 56, -1, -1, -1, -1, + -1, 56, -1, -1, -1, -1, -1, 56}), /* NxS[ 57] */ new Table(0, 0, -1, null), -/* NxS[ 58] */ new Table(21, 29, -1, new sbyte[] {58, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 58, -1, -1, -1, -1, -1, -1, -1, -1, 58, -1, -1, - -1, -1, 58, 58, -1, 58, 58}), -/* NxS[ 59] */ new Table(50, 1, -1, new sbyte[] {108}), -/* NxS[ 60] */ new Table(0, 0, -1, null), -/* NxS[ 61] */ new Table(0, 7, 61, new sbyte[] {-1, 61, 61, 61, 61, 61, - -1}), +/* NxS[ 58] */ new Table(0, 0, -1, null), +/* NxS[ 59] */ new Table(0, 0, -1, null), +/* NxS[ 60] */ new Table(21, 29, -1, new sbyte[] {60, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 60, -1, -1, -1, -1, -1, -1, -1, -1, 60, -1, -1, + -1, -1, 60, 60, -1, 60, 60}), +/* NxS[ 61] */ new Table(50, 1, -1, new sbyte[] {115}), /* NxS[ 62] */ new Table(0, 0, -1, null), -/* NxS[ 63] */ new Table(0, 0, -1, null), +/* NxS[ 63] */ new Table(0, 7, 63, new sbyte[] {-1, 63, 63, 63, 63, 63, + -1}), /* NxS[ 64] */ new Table(0, 0, -1, null), /* NxS[ 65] */ new Table(0, 0, -1, null), -/* NxS[ 66] */ new Table(9, 1, -1, new sbyte[] {67}), +/* NxS[ 66] */ new Table(0, 0, -1, null), /* NxS[ 67] */ new Table(0, 0, -1, null), -/* NxS[ 68] */ new Table(0, 0, -1, null), -/* NxS[ 69] */ new Table(1, 1, -1, new sbyte[] {72}), -/* NxS[ 70] */ new Table(4, 1, -1, new sbyte[] {114}), -/* NxS[ 71] */ new Table(0, 0, -1, null), -/* NxS[ 72] */ new Table(0, 7, 72, new sbyte[] {-1, 72, 72, 72, 72, 72, +/* NxS[ 68] */ new Table(9, 1, -1, new sbyte[] {69}), +/* NxS[ 69] */ new Table(0, 0, -1, null), +/* NxS[ 70] */ new Table(0, 0, -1, null), +/* NxS[ 71] */ new Table(1, 1, -1, new sbyte[] {74}), +/* NxS[ 72] */ new Table(4, 1, -1, new sbyte[] {121}), +/* NxS[ 73] */ new Table(0, 0, -1, null), +/* NxS[ 74] */ new Table(0, 7, 74, new sbyte[] {-1, 74, 74, 74, 74, 74, -1}), -/* NxS[ 73] */ new Table(43, 39, 28, new sbyte[] {29, 28, 30, 28, 28, 28, - 28, 31, -1, 1, 2, 3, 4, 2, -1, 5, 6, 7, 8, 9, -1, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27}), -/* NxS[ 74] */ new Table(50, 2, 74, new sbyte[] {32, -1}), -/* NxS[ 75] */ new Table(45, 1, -1, new sbyte[] {35}), -/* NxS[ 76] */ new Table(24, 22, -1, new sbyte[] {78, 78, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 34}), -/* NxS[ 77] */ new Table(36, 12, -1, new sbyte[] {33, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 33}), -/* NxS[ 78] */ new Table(45, 1, -1, new sbyte[] {34}), -/* NxS[ 79] */ new Table(31, 9, -1, new sbyte[] {80, -1, -1, -1, 81, -1, - -1, -1, 82}), -/* NxS[ 80] */ new Table(32, 1, -1, new sbyte[] {96}), -/* NxS[ 81] */ new Table(39, 1, -1, new sbyte[] {87}), -/* NxS[ 82] */ new Table(42, 1, -1, new sbyte[] {83}), -/* NxS[ 83] */ new Table(33, 1, -1, new sbyte[] {84}), -/* NxS[ 84] */ new Table(31, 1, -1, new sbyte[] {85}), -/* NxS[ 85] */ new Table(26, 1, -1, new sbyte[] {86}), -/* NxS[ 86] */ new Table(26, 1, -1, new sbyte[] {39}), -/* NxS[ 87] */ new Table(40, 1, -1, new sbyte[] {88}), -/* NxS[ 88] */ new Table(39, 1, -1, new sbyte[] {89}), -/* NxS[ 89] */ new Table(31, 1, -1, new sbyte[] {90}), -/* NxS[ 90] */ new Table(41, 1, -1, new sbyte[] {91}), +/* NxS[ 75] */ new Table(43, 40, 28, new sbyte[] {29, 28, 30, 28, 28, 28, + 28, 31, -1, -1, 1, 2, 3, 4, 2, -1, 5, 6, 7, 8, 9, -1, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27}), +/* NxS[ 76] */ new Table(50, 3, 76, new sbyte[] {33, 76, -1}), +/* NxS[ 77] */ new Table(50, 9, 76, new sbyte[] {33, 77, 78, 76, 76, 76, + 76, 76, 79}), +/* NxS[ 78] */ new Table(50, 1, 78, new sbyte[] {80}), +/* NxS[ 79] */ new Table(50, 3, 76, new sbyte[] {33, 76, 78}), +/* NxS[ 80] */ new Table(50, 1, 78, new sbyte[] {81}), +/* NxS[ 81] */ new Table(50, 1, 78, new sbyte[] {34}), +/* NxS[ 82] */ new Table(45, 1, -1, new sbyte[] {37}), +/* NxS[ 83] */ new Table(24, 22, -1, new sbyte[] {85, 85, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 36}), +/* NxS[ 84] */ new Table(36, 12, -1, new sbyte[] {35, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 35}), +/* NxS[ 85] */ new Table(45, 1, -1, new sbyte[] {36}), +/* NxS[ 86] */ new Table(31, 9, -1, new sbyte[] {87, -1, -1, -1, 88, -1, + -1, -1, 89}), +/* NxS[ 87] */ new Table(32, 1, -1, new sbyte[] {103}), +/* NxS[ 88] */ new Table(39, 1, -1, new sbyte[] {94}), +/* NxS[ 89] */ new Table(42, 1, -1, new sbyte[] {90}), +/* NxS[ 90] */ new Table(33, 1, -1, new sbyte[] {91}), /* NxS[ 91] */ new Table(31, 1, -1, new sbyte[] {92}), -/* NxS[ 92] */ new Table(38, 1, -1, new sbyte[] {93}), -/* NxS[ 93] */ new Table(39, 1, -1, new sbyte[] {94}), -/* NxS[ 94] */ new Table(26, 1, -1, new sbyte[] {95}), -/* NxS[ 95] */ new Table(26, 1, -1, new sbyte[] {40}), -/* NxS[ 96] */ new Table(33, 1, -1, new sbyte[] {97}), -/* NxS[ 97] */ new Table(34, 1, -1, new sbyte[] {98}), +/* NxS[ 92] */ new Table(26, 1, -1, new sbyte[] {93}), +/* NxS[ 93] */ new Table(26, 1, -1, new sbyte[] {41}), +/* NxS[ 94] */ new Table(40, 1, -1, new sbyte[] {95}), +/* NxS[ 95] */ new Table(39, 1, -1, new sbyte[] {96}), +/* NxS[ 96] */ new Table(31, 1, -1, new sbyte[] {97}), +/* NxS[ 97] */ new Table(41, 1, -1, new sbyte[] {98}), /* NxS[ 98] */ new Table(31, 1, -1, new sbyte[] {99}), -/* NxS[ 99] */ new Table(35, 1, -1, new sbyte[] {100}), -/* NxS[ 100] */ new Table(35, 1, -1, new sbyte[] {101}), -/* NxS[ 101] */ new Table(36, 1, -1, new sbyte[] {102}), -/* NxS[ 102] */ new Table(37, 1, -1, new sbyte[] {103}), -/* NxS[ 103] */ new Table(38, 1, -1, new sbyte[] {104}), -/* NxS[ 104] */ new Table(26, 1, -1, new sbyte[] {105}), -/* NxS[ 105] */ new Table(26, 1, -1, new sbyte[] {41}), -/* NxS[ 106] */ new Table(0, 13, -1, new sbyte[] {53, -1, -1, -1, -1, -1, - 53, -1, -1, -1, -1, 107, 53}), -/* NxS[ 107] */ new Table(0, 13, -1, new sbyte[] {54, -1, -1, -1, -1, -1, - 54, -1, -1, -1, -1, -1, 54}), -/* NxS[ 108] */ new Table(50, 2, 108, new sbyte[] {59, -1}), -/* NxS[ 109] */ new Table(0, 7, 109, new sbyte[] {-1, 109, 60, 109, 109, 109, +/* NxS[ 99] */ new Table(38, 1, -1, new sbyte[] {100}), +/* NxS[ 100] */ new Table(39, 1, -1, new sbyte[] {101}), +/* NxS[ 101] */ new Table(26, 1, -1, new sbyte[] {102}), +/* NxS[ 102] */ new Table(26, 1, -1, new sbyte[] {42}), +/* NxS[ 103] */ new Table(33, 1, -1, new sbyte[] {104}), +/* NxS[ 104] */ new Table(34, 1, -1, new sbyte[] {105}), +/* NxS[ 105] */ new Table(31, 1, -1, new sbyte[] {106}), +/* NxS[ 106] */ new Table(35, 1, -1, new sbyte[] {107}), +/* NxS[ 107] */ new Table(35, 1, -1, new sbyte[] {108}), +/* NxS[ 108] */ new Table(36, 1, -1, new sbyte[] {109}), +/* NxS[ 109] */ new Table(37, 1, -1, new sbyte[] {110}), +/* NxS[ 110] */ new Table(38, 1, -1, new sbyte[] {111}), +/* NxS[ 111] */ new Table(26, 1, -1, new sbyte[] {112}), +/* NxS[ 112] */ new Table(26, 1, -1, new sbyte[] {43}), +/* NxS[ 113] */ new Table(51, 14, -1, new sbyte[] {55, 55, -1, -1, -1, -1, + -1, 55, -1, -1, -1, -1, 114, 55}), +/* NxS[ 114] */ new Table(51, 14, -1, new sbyte[] {56, 56, -1, -1, -1, -1, + -1, 56, -1, -1, -1, -1, -1, 56}), +/* NxS[ 115] */ new Table(50, 3, 115, new sbyte[] {61, 115, -1}), +/* NxS[ 116] */ new Table(0, 7, 116, new sbyte[] {-1, 116, 62, 116, 116, 116, -1}), -/* NxS[ 110] */ new Table(2, 1, 63, new sbyte[] {64}), -/* NxS[ 111] */ new Table(8, 1, 65, new sbyte[] {66}), -/* NxS[ 112] */ new Table(0, 0, -1, null), -/* NxS[ 113] */ new Table(1, 3, 68, new sbyte[] {69, 68, 70}), -/* NxS[ 114] */ new Table(0, 7, 114, new sbyte[] {-1, 114, 71, 114, 114, 114, +/* NxS[ 117] */ new Table(2, 1, 65, new sbyte[] {66}), +/* NxS[ 118] */ new Table(8, 1, 67, new sbyte[] {68}), +/* NxS[ 119] */ new Table(0, 0, -1, null), +/* NxS[ 120] */ new Table(1, 3, 70, new sbyte[] {71, 70, 72}), +/* NxS[ 121] */ new Table(0, 7, 121, new sbyte[] {-1, 121, 73, 121, 121, 121, -1}), }; @@ -1339,7 +1347,7 @@ int NextState() { unchecked { int rslt; int idx = Map(code) - NxS[state].min; - if (idx < 0) idx += 51; + if (idx < 0) idx += 52; if ((uint)idx >= (uint)NxS[state].rng) rslt = NxS[state].dflt; else rslt = NxS[state].nxt[idx]; return rslt; @@ -2051,108 +2059,115 @@ yylval = new Union(); return (int)Tokens.tkInteger; break; case 32: + case 33: yylval = new Union(); currentLexLocation = CurrentLexLocation; yylval.stn = parsertools.create_string_const(yytext,currentLexLocation); return (int)Tokens.tkStringLiteral; break; - case 33: + case 34: +yylval = new Union(); + currentLexLocation = CurrentLexLocation; + yylval.stn = parsertools.create_multiline_string_const(yytext,currentLexLocation); + return (int)Tokens.tkMultilineStringLiteral; + break; + case 35: yylval = new Union(); currentLexLocation = CurrentLexLocation; yylval.ex = parsertools.create_bigint_const(yytext,currentLexLocation); return (int)Tokens.tkBigInteger; break; - case 34: - case 35: + case 36: + case 37: yylval = new Union(); currentLexLocation = CurrentLexLocation; yylval.ex = parsertools.create_double_const(yytext,currentLexLocation); return (int)Tokens.tkFloat; break; - case 36: + case 38: yylval = new Union(); yylval.ti = new token_info(yytext); return (int)Tokens.tkBackSlashRoundOpen; break; - case 37: + case 39: yylval = new Union(); yylval.op = new op_type_node(Operators.LessEqual); return (int)Tokens.tkLowerEqual; break; - case 38: + case 40: yylval = new Union(); yylval.op = new op_type_node(Operators.NotEqual); return (int)Tokens.tkNotEqual; break; - case 39: + case 41: return (int)Tokens.tkParseModeType; break; - case 40: + case 42: return (int)Tokens.tkParseModeStatement; break; - case 41: + case 43: return (int)Tokens.tkParseModeExpression; break; - case 42: + case 44: yylval = new Union(); yylval.op = new op_type_node(Operators.GreaterEqual); return (int)Tokens.tkGreaterEqual; break; - case 43: + case 45: yylval = new Union(); yylval.op = new op_type_node(Operators.AssignmentSubtraction); return (int)Tokens.tkMinusEqual; break; - case 44: + case 46: yylval = new Union(); yylval.ti = new token_info(yytext); return (int)Tokens.tkArrow; break; - case 45: + case 47: yylval = new Union(); yylval.op = new op_type_node(Operators.AssignmentAddition); return (int)Tokens.tkPlusEqual; break; - case 46: + case 48: return (int)Tokens.tkQuestionPoint; break; - case 47: + case 49: return (int)Tokens.tkQuestionSquareOpen; break; - case 48: + case 50: return (int)Tokens.tkDoubleQuestion; break; - case 49: + case 51: return (int)Tokens.tkDotDot; break; - case 50: + case 52: yylval = new Union(); yylval.op = new op_type_node(Operators.Assignment); return (int)Tokens.tkAssign; break; - case 51: + case 53: yylval = new Union(); yylval.id = new ident(yytext,CurrentLexLocation); return (int)Tokens.tkDirectiveName; break; - case 52: + case 54: yylval = new Union(); currentLexLocation = CurrentLexLocation; yylval.stn = parsertools.create_sharp_char_const(yytext,currentLexLocation); return (int)Tokens.tkAsciiChar; break; - case 53: + case 55: yylval = new Union(); yylval.ti = new token_info("##",CurrentLexLocation); return (int)Tokens.tkShortProgram; break; - case 54: + case 56: yylval = new Union(); yylval.ti = new token_info("###",CurrentLexLocation); return (int)Tokens.tkShortSFProgram; break; - case 55: + case 57: yylval = new Union(); yylval.op = new op_type_node(Operators.Power); return (int)Tokens.tkStarStar; break; - case 56: + case 58: yylval = new Union(); yylval.op = new op_type_node(Operators.AssignmentMultiplication); return (int)Tokens.tkMultEqual; break; - case 57: + case 59: BEGIN(COMMENT1); break; - case 58: + case 60: yylval = new Union(); currentLexLocation = CurrentLexLocation; yylval.ex = parsertools.create_hex_const(yytext,currentLexLocation); return (int)Tokens.tkHex; break; - case 59: + case 61: yylval = new Union(); currentLexLocation = CurrentLexLocation; yylval.stn = parsertools.create_format_string_const(yytext,currentLexLocation); return (int)Tokens.tkFormatStringLiteral; break; - case 60: + case 62: if (parsertools.build_tree_for_formatter) break; @@ -2208,36 +2223,36 @@ if (parsertools.build_tree_for_formatter) Defines.Remove(directiveparam); } break; - case 61: + case 63: { } break; - case 62: + case 64: yylval = new Union(); yylval.op = new op_type_node(Operators.AssignmentDivision); return (int)Tokens.tkDivEqual; break; - case 63: -{ -} - break; - case 64: -BEGIN(INITIAL); - break; case 65: - case 66: { } break; + case 66: +BEGIN(INITIAL); + break; case 67: -BEGIN(INITIAL); - break; case 68: - case 69: - case 70: { } break; + case 69: +BEGIN(INITIAL); + break; + case 70: case 71: + case 72: +{ +} + break; + case 73: parsertools.DivideDirectiveOn(yytext,out directivename,out directiveparam); parsertools.CheckDirectiveParams(directivename,directiveparam); // directivename in UPPERCASE! if (directivename == "IFDEF") @@ -2284,7 +2299,7 @@ parsertools.DivideDirectiveOn(yytext,out directivename,out directiveparam); parsertools.compilerDirectives.RemoveAt(ind_to_remove); } break; - case 72: + case 74: { } diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.lex b/Parsers/PascalABCParserNewSaushkin/ABCPascal.lex index 8ec16178f..d4f4dc125 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.lex +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.lex @@ -38,6 +38,7 @@ BIGINTNUM {INTNUM}[bB][iI] FLOATNUM {INTNUM}\.{INTNUM} EXPNUM ({INTNUM}\.)?{INTNUM}[eE][+\-]?{INTNUM} STRINGNUM \'([^\'\n]|\'\')*\' +MULTILINESTRINGNUM \'\'\'[ ]*\r?\n([^']|\'[^']|\'\'[^'])*\'\'\' FORMATSTRINGNUM \$\'([^\'\n]|\'\')*\' HEXNUM ${HexDigit}{HexDigit_}* SHARPCHARNUM #{Digit}+ @@ -491,6 +492,13 @@ UNICODEARROW \x890 return (int)Tokens.tkStringLiteral; } +{MULTILINESTRINGNUM} { + yylval = new Union(); + currentLexLocation = CurrentLexLocation; + yylval.stn = parsertools.create_multiline_string_const(yytext,currentLexLocation); + return (int)Tokens.tkMultilineStringLiteral; +} + {FORMATSTRINGNUM} { yylval = new Union(); currentLexLocation = CurrentLexLocation; diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y index 65a9ea284..033e866e8 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascal.y +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascal.y @@ -51,7 +51,7 @@ %token tkAssign tkPlusEqual tkMinusEqual tkMultEqual tkDivEqual tkMinus tkPlus tkSlash tkStar tkStarStar tkEqual tkGreater tkGreaterEqual tkLower tkLowerEqual %token tkNotEqual tkCSharpStyleOr tkArrow tkOr tkXor tkAnd tkDiv tkMod tkShl tkShr tkNot tkAs tkIn tkIs tkImplicit tkExplicit tkAddressOf tkDeref %token tkDirectiveName tkIdentifier -%token tkStringLiteral tkFormatStringLiteral tkAsciiChar +%token tkStringLiteral tkFormatStringLiteral tkMultilineStringLiteral tkAsciiChar %token tkAbstract tkForward tkOverload tkReintroduce tkOverride tkVirtual tkExtensionMethod %token tkInteger tkBigInteger tkFloat tkHex %token tkUnknown @@ -4502,6 +4502,19 @@ literal $$ = NewFormatString($1 as string_const); } } + | tkMultilineStringLiteral + { + if (parsertools.build_tree_for_formatter) + { + var sc = $1 as string_const; + sc.IsMultiline = true; + $$ = sc; + } + else + { + $$ = NewLiteral(new literal_const_line($1 as literal, @$)); + } + } ; literal_list diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalParserTools.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalParserTools.cs index eb6fbe7a4..3665d4d4f 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalParserTools.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalParserTools.cs @@ -7,6 +7,7 @@ using QUT.Gppg; using GPPGParserScanner; using System; using System.Linq; +using System.Text.RegularExpressions; namespace PascalABCSavParser { @@ -459,6 +460,56 @@ namespace PascalABCSavParser return lt; } + public literal create_multiline_string_const(string text, SourceContext sc) + { + if (build_tree_for_formatter) + { + literal lt1 = new string_const(text); + lt1.source_context = sc; + return lt1; + } + + var NewLine = System.Environment.NewLine; + // Многострочная строка должна содержать как минимум два перехода на новую строку + // разобьём её по символам перехода на новую строку + //var ss = text.Split('\n'); + text = text.Substring(3, text.Length - 6); + var ss = Regex.Split(text, System.Environment.NewLine); + // Если одна строка, то ошибка - MULTILINE_STRING_SHOULD_BE_PLACED_ON_SEVERAL_LINES + if (ss.Length == 1) + //this.AddErrorFromResource("MULTILINE_STRING_SHOULD_BE_PLACED_ON_SEVERAL_LINES", sc); + return create_string_const(text, sc); + + // Проверим первую строку + ss[0] = ss[0].Trim(); + if (ss[0].Length > 0) + // мы сюда точно не должны попасть. Это должна быть обычная строка! + this.AddErrorFromResource("IMPOSSIBLE_MULTILINE_ERROR", sc); + + // Количество лидирующих пробелов в последней строке + var numspaces = ss[ss.Length-1].TakeWhile(Char.IsWhiteSpace).Count(); + // Во всех строках от первой до предпоследней (если они есть) количество лидирующих пробелов должно быть не меньше чем в последней + // мультистрочная строка содержит несовместимые отступы + // MULTILINE_STRING_CONTAINS_INCONSISTENT_INDENTS + for (var i = 1; i < ss.Length - 1; i++) + if (ss[i].TakeWhile(Char.IsWhiteSpace).Count() < numspaces) + { + this.AddErrorFromResource("MULTILINE_STRING_CONTAINS_INCONSISTENT_INDENTS", sc); + break; + } + // Теперь удалить ровно такое количество пробелов в каждой строке с 1 по предпоследнюю + for (var i = 1; i < ss.Length - 1; i++) + ss[i] = ss[i].Remove(0, numspaces); + // Наконец, соберем text из всех строк с первой по предпоследнюю + var ll = ss.ToList(); + ll.RemoveAt(0); + ll.RemoveAt(ll.Count - 1); + text = string.Join(NewLine, ll.ToArray()); + literal lt = new string_const(text); + lt.source_context = sc; + return lt; + } + public literal create_format_string_const(string text, SourceContext sc) { literal lt; diff --git a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs index 3acbc3361..683a67207 100644 --- a/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs +++ b/Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs @@ -1,9 +1,9 @@ // (see accompanying GPPGcopyright.rtf) // GPPG version 1.3.6 -// Machine: DESKTOP-2BJCJ7I -// DateTime: 21.02.2024 20:44:03 -// UserName: ibond +// Machine: DESKTOP-G8V08V4 +// DateTime: 21.03.2024 20:00:52 +// UserName: ????????? // Input file // options: no-lines gplex @@ -47,9 +47,9 @@ public enum Tokens { tkArrow=127,tkOr=128,tkXor=129,tkAnd=130,tkDiv=131,tkMod=132, tkShl=133,tkShr=134,tkNot=135,tkAs=136,tkIn=137,tkIs=138, tkImplicit=139,tkExplicit=140,tkAddressOf=141,tkDeref=142,tkIdentifier=143,tkStringLiteral=144, - tkFormatStringLiteral=145,tkAsciiChar=146,tkAbstract=147,tkForward=148,tkOverload=149,tkReintroduce=150, - tkOverride=151,tkVirtual=152,tkExtensionMethod=153,tkInteger=154,tkBigInteger=155,tkFloat=156, - tkHex=157,tkUnknown=158,tkStep=159}; + tkFormatStringLiteral=145,tkMultilineStringLiteral=146,tkAsciiChar=147,tkAbstract=148,tkForward=149,tkOverload=150, + tkReintroduce=151,tkOverride=152,tkVirtual=153,tkExtensionMethod=154,tkInteger=155,tkBigInteger=156, + tkFloat=157,tkHex=158,tkUnknown=159,tkStep=160}; // Abstract base class for GPLEX scanners public abstract class ScanBase : AbstractScanner { @@ -77,8 +77,8 @@ public partial class GPPGParser: ShiftReduceParser aliasses; #pragma warning restore 649 - private static Rule[] rules = new Rule[1027]; - private static State[] states = new State[1703]; + private static Rule[] rules = new Rule[1028]; + private static State[] states = new State[1704]; 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", @@ -175,13 +175,13 @@ public partial class GPPGParser: ShiftReduceParser one_literal + case 823: // literal -> tkMultilineStringLiteral +{ + if (parsertools.build_tree_for_formatter) + { + var sc = ValueStack[ValueStack.Depth-1].stn as string_const; + sc.IsMultiline = true; + CurrentSemanticValue.ex = sc; + } + else + { + CurrentSemanticValue.ex = NewLiteral(new literal_const_line(ValueStack[ValueStack.Depth-1].stn as literal, CurrentLocationSpan)); + } + } + break; + case 824: // literal_list -> one_literal { CurrentSemanticValue.stn = new literal_const_line(ValueStack[ValueStack.Depth-1].ex as literal, CurrentLocationSpan); } break; - case 824: // literal_list -> literal_list, one_literal + case 825: // 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) @@ -7026,481 +7042,481 @@ public partial class GPPGParser: ShiftReduceParser tkOperator, overload_operator + case 826: // 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 826: // optional_method_modificators -> tkSemiColon + case 827: // optional_method_modificators -> tkSemiColon { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 827: // optional_method_modificators -> tkSemiColon, meth_modificators, tkSemiColon + case 828: // 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 828: // optional_method_modificators1 -> /* empty */ + case 829: // optional_method_modificators1 -> /* empty */ { CurrentSemanticValue.stn = new procedure_attributes_list(new List(),CurrentLocationSpan); } break; - case 829: // optional_method_modificators1 -> tkSemiColon, meth_modificators + case 830: // 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 830: // meth_modificators -> meth_modificator + case 831: // meth_modificators -> meth_modificator { CurrentSemanticValue.stn = new procedure_attributes_list(ValueStack[ValueStack.Depth-1].id as procedure_attribute, CurrentLocationSpan); } break; - case 831: // meth_modificators -> meth_modificators, tkSemiColon, meth_modificator + case 832: // 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 832: // identifier -> tkIdentifier + case 833: // identifier -> tkIdentifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 833: // identifier -> property_specifier_directives + case 834: // identifier -> property_specifier_directives { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 834: // identifier -> non_reserved + case 835: // identifier -> non_reserved { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 835: // identifier -> tkStep + case 836: // identifier -> tkStep { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 836: // identifier -> tkIndex + case 837: // identifier -> tkIndex { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 837: // identifier_or_keyword -> identifier + case 838: // identifier_or_keyword -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 838: // identifier_or_keyword -> keyword + case 839: // identifier_or_keyword -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 839: // identifier_or_keyword -> reserved_keyword + case 840: // identifier_or_keyword -> reserved_keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 840: // identifier_keyword_operatorname -> identifier + case 841: // identifier_keyword_operatorname -> identifier { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 841: // identifier_keyword_operatorname -> keyword + case 842: // identifier_keyword_operatorname -> keyword { CurrentSemanticValue.id = new ident(ValueStack[ValueStack.Depth-1].ti.text, CurrentLocationSpan); } break; - case 842: // identifier_keyword_operatorname -> operator_name_ident + case 843: // identifier_keyword_operatorname -> operator_name_ident { CurrentSemanticValue.id = (ident)ValueStack[ValueStack.Depth-1].ex; } break; - case 843: // meth_modificator -> tkAbstract + case 844: // meth_modificator -> tkAbstract { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 844: // meth_modificator -> tkOverload + case 845: // 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 845: // meth_modificator -> tkReintroduce + case 846: // meth_modificator -> tkReintroduce { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 846: // meth_modificator -> tkOverride + case 847: // meth_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 847: // meth_modificator -> tkExtensionMethod + case 848: // meth_modificator -> tkExtensionMethod { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 848: // meth_modificator -> tkVirtual + case 849: // meth_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 849: // property_modificator -> tkVirtual + case 850: // property_modificator -> tkVirtual { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 850: // property_modificator -> tkOverride + case 851: // property_modificator -> tkOverride { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 851: // property_modificator -> tkAbstract + case 852: // property_modificator -> tkAbstract { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 852: // property_modificator -> tkReintroduce + case 853: // property_modificator -> tkReintroduce { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 853: // property_specifier_directives -> tkRead + case 854: // property_specifier_directives -> tkRead { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 854: // property_specifier_directives -> tkWrite + case 855: // property_specifier_directives -> tkWrite { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 855: // non_reserved -> tkName + case 856: // non_reserved -> tkName { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 856: // non_reserved -> tkNew + case 857: // non_reserved -> tkNew { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 857: // visibility_specifier -> tkInternal + case 858: // visibility_specifier -> tkInternal { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 858: // visibility_specifier -> tkPublic + case 859: // visibility_specifier -> tkPublic { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 859: // visibility_specifier -> tkProtected + case 860: // visibility_specifier -> tkProtected { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 860: // visibility_specifier -> tkPrivate + case 861: // visibility_specifier -> tkPrivate { CurrentSemanticValue.id = ValueStack[ValueStack.Depth-1].id; } break; - case 861: // keyword -> visibility_specifier + case 862: // keyword -> visibility_specifier { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 862: // keyword -> tkSealed + case 863: // keyword -> tkSealed { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 863: // keyword -> tkTemplate + case 864: // keyword -> tkTemplate { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 864: // keyword -> tkOr + case 865: // keyword -> tkOr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 865: // keyword -> tkTypeOf + case 866: // keyword -> tkTypeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 866: // keyword -> tkSizeOf + case 867: // keyword -> tkSizeOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 867: // keyword -> tkDefault + case 868: // keyword -> tkDefault { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 868: // keyword -> tkWhere + case 869: // keyword -> tkWhere { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 869: // keyword -> tkXor + case 870: // keyword -> tkXor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 870: // keyword -> tkAnd + case 871: // keyword -> tkAnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 871: // keyword -> tkDiv + case 872: // keyword -> tkDiv { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 872: // keyword -> tkMod + case 873: // keyword -> tkMod { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 873: // keyword -> tkShl + case 874: // keyword -> tkShl { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 874: // keyword -> tkShr + case 875: // keyword -> tkShr { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 875: // keyword -> tkNot + case 876: // keyword -> tkNot { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 876: // keyword -> tkAs + case 877: // keyword -> tkAs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 877: // keyword -> tkIn + case 878: // keyword -> tkIn { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 878: // keyword -> tkIs + case 879: // keyword -> tkIs { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 879: // keyword -> tkArray + case 880: // keyword -> tkArray { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 880: // keyword -> tkSequence + case 881: // keyword -> tkSequence { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 881: // keyword -> tkBegin + case 882: // keyword -> tkBegin { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 882: // keyword -> tkCase + case 883: // keyword -> tkCase { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 883: // keyword -> tkClass + case 884: // keyword -> tkClass { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 884: // keyword -> tkConst + case 885: // keyword -> tkConst { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 885: // keyword -> tkConstructor + case 886: // keyword -> tkConstructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 886: // keyword -> tkDestructor + case 887: // keyword -> tkDestructor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 887: // keyword -> tkDownto + case 888: // keyword -> tkDownto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 888: // keyword -> tkDo + case 889: // keyword -> tkDo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 889: // keyword -> tkElse + case 890: // keyword -> tkElse { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 890: // keyword -> tkEnd + case 891: // keyword -> tkEnd { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 891: // keyword -> tkExcept + case 892: // keyword -> tkExcept { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 892: // keyword -> tkFile + case 893: // keyword -> tkFile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 893: // keyword -> tkAuto + case 894: // keyword -> tkAuto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 894: // keyword -> tkFinalization + case 895: // keyword -> tkFinalization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 895: // keyword -> tkFinally + case 896: // keyword -> tkFinally { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 896: // keyword -> tkFor + case 897: // keyword -> tkFor { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 897: // keyword -> tkForeach + case 898: // keyword -> tkForeach { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 898: // keyword -> tkFunction + case 899: // keyword -> tkFunction { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 899: // keyword -> tkIf + case 900: // keyword -> tkIf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 900: // keyword -> tkImplementation + case 901: // keyword -> tkImplementation { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 901: // keyword -> tkInherited + case 902: // keyword -> tkInherited { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 902: // keyword -> tkInitialization + case 903: // keyword -> tkInitialization { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 903: // keyword -> tkInterface + case 904: // keyword -> tkInterface { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 904: // keyword -> tkProcedure + case 905: // keyword -> tkProcedure { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 905: // keyword -> tkProperty + case 906: // keyword -> tkProperty { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 906: // keyword -> tkRaise + case 907: // keyword -> tkRaise { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 907: // keyword -> tkRecord + case 908: // keyword -> tkRecord { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 908: // keyword -> tkRepeat + case 909: // keyword -> tkRepeat { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 909: // keyword -> tkSet + case 910: // keyword -> tkSet { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 910: // keyword -> tkTry + case 911: // keyword -> tkTry { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 911: // keyword -> tkType + case 912: // keyword -> tkType { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 912: // keyword -> tkStatic + case 913: // keyword -> tkStatic { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 913: // keyword -> tkThen + case 914: // keyword -> tkThen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 914: // keyword -> tkTo + case 915: // keyword -> tkTo { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 915: // keyword -> tkUntil + case 916: // keyword -> tkUntil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 916: // keyword -> tkUses + case 917: // keyword -> tkUses { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 917: // keyword -> tkVar + case 918: // keyword -> tkVar { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 918: // keyword -> tkWhile + case 919: // keyword -> tkWhile { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 919: // keyword -> tkWith + case 920: // keyword -> tkWith { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 920: // keyword -> tkNil + case 921: // keyword -> tkNil { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 921: // keyword -> tkGoto + case 922: // keyword -> tkGoto { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 922: // keyword -> tkOf + case 923: // keyword -> tkOf { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 923: // keyword -> tkLabel + case 924: // keyword -> tkLabel { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 924: // keyword -> tkProgram + case 925: // keyword -> tkProgram { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 925: // keyword -> tkUnit + case 926: // keyword -> tkUnit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 926: // keyword -> tkLibrary + case 927: // keyword -> tkLibrary { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 927: // keyword -> tkNamespace + case 928: // keyword -> tkNamespace { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 928: // keyword -> tkExternal + case 929: // keyword -> tkExternal { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 929: // keyword -> tkParams + case 930: // keyword -> tkParams { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 930: // keyword -> tkEvent + case 931: // keyword -> tkEvent { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 931: // keyword -> tkYield + case 932: // keyword -> tkYield { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 932: // keyword -> tkMatch + case 933: // keyword -> tkMatch { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 933: // keyword -> tkWhen + case 934: // keyword -> tkWhen { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 934: // keyword -> tkPartial + case 935: // keyword -> tkPartial { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 935: // keyword -> tkAbstract + case 936: // keyword -> tkAbstract { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 936: // keyword -> tkLock + case 937: // keyword -> tkLock { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 937: // keyword -> tkImplicit + case 938: // keyword -> tkImplicit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 938: // keyword -> tkExplicit + case 939: // keyword -> tkExplicit { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].op; } break; - case 939: // keyword -> tkOn + case 940: // keyword -> tkOn { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 940: // keyword -> tkVirtual + case 941: // keyword -> tkVirtual { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 941: // keyword -> tkOverride + case 942: // keyword -> tkOverride { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 942: // keyword -> tkLoop + case 943: // keyword -> tkLoop { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 943: // keyword -> tkExtensionMethod + case 944: // keyword -> tkExtensionMethod { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 944: // keyword -> tkOverload + case 945: // keyword -> tkOverload { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 945: // keyword -> tkReintroduce + case 946: // keyword -> tkReintroduce { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 946: // keyword -> tkForward + case 947: // keyword -> tkForward { CurrentSemanticValue.ti = new token_info(ValueStack[ValueStack.Depth-1].id.name, CurrentLocationSpan); } break; - case 947: // reserved_keyword -> tkOperator + case 948: // reserved_keyword -> tkOperator { CurrentSemanticValue.ti = ValueStack[ValueStack.Depth-1].ti; } break; - case 948: // overload_operator -> tkMinus + case 949: // overload_operator -> tkMinus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 949: // overload_operator -> tkPlus + case 950: // overload_operator -> tkPlus { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 950: // overload_operator -> tkSlash + case 951: // overload_operator -> tkSlash { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 951: // overload_operator -> tkStar + case 952: // overload_operator -> tkStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 952: // overload_operator -> tkEqual + case 953: // overload_operator -> tkEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 953: // overload_operator -> tkGreater + case 954: // overload_operator -> tkGreater { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 954: // overload_operator -> tkGreaterEqual + case 955: // overload_operator -> tkGreaterEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 955: // overload_operator -> tkLower + case 956: // overload_operator -> tkLower { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 956: // overload_operator -> tkLowerEqual + case 957: // overload_operator -> tkLowerEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 957: // overload_operator -> tkNotEqual + case 958: // overload_operator -> tkNotEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 958: // overload_operator -> tkOr + case 959: // overload_operator -> tkOr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 959: // overload_operator -> tkXor + case 960: // overload_operator -> tkXor { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 960: // overload_operator -> tkAnd + case 961: // overload_operator -> tkAnd { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 961: // overload_operator -> tkDiv + case 962: // overload_operator -> tkDiv { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 962: // overload_operator -> tkMod + case 963: // overload_operator -> tkMod { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 963: // overload_operator -> tkShl + case 964: // overload_operator -> tkShl { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 964: // overload_operator -> tkShr + case 965: // overload_operator -> tkShr { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 965: // overload_operator -> tkNot + case 966: // overload_operator -> tkNot { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 966: // overload_operator -> tkIn + case 967: // overload_operator -> tkIn { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 967: // overload_operator -> tkImplicit + case 968: // overload_operator -> tkImplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 968: // overload_operator -> tkExplicit + case 969: // overload_operator -> tkExplicit { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 969: // overload_operator -> assign_operator + case 970: // overload_operator -> assign_operator { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 970: // overload_operator -> tkStarStar + case 971: // overload_operator -> tkStarStar { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 971: // assign_operator -> tkAssign + case 972: // assign_operator -> tkAssign { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 972: // assign_operator -> tkPlusEqual + case 973: // assign_operator -> tkPlusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 973: // assign_operator -> tkMinusEqual + case 974: // assign_operator -> tkMinusEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 974: // assign_operator -> tkMultEqual + case 975: // assign_operator -> tkMultEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 975: // assign_operator -> tkDivEqual + case 976: // assign_operator -> tkDivEqual { CurrentSemanticValue.op = ValueStack[ValueStack.Depth-1].op; } break; - case 976: // lambda_unpacked_params -> tkBackSlashRoundOpen, + case 977: // lambda_unpacked_params -> tkBackSlashRoundOpen, // lambda_list_of_unpacked_params_or_id, tkComma, // lambda_unpacked_params_or_id, tkRoundClose { @@ -7509,24 +7525,24 @@ public partial class GPPGParser: ShiftReduceParser lambda_unpacked_params + case 978: // lambda_unpacked_params_or_id -> lambda_unpacked_params { CurrentSemanticValue.ob = new ident_or_list(ValueStack[ValueStack.Depth-1].ex as unpacked_list_of_ident_or_list); } break; - case 978: // lambda_unpacked_params_or_id -> identifier + case 979: // lambda_unpacked_params_or_id -> identifier { CurrentSemanticValue.ob = new ident_or_list(ValueStack[ValueStack.Depth-1].id as ident); } break; - case 979: // lambda_list_of_unpacked_params_or_id -> lambda_unpacked_params_or_id + case 980: // lambda_list_of_unpacked_params_or_id -> lambda_unpacked_params_or_id { CurrentSemanticValue.ob = new unpacked_list_of_ident_or_list(); (CurrentSemanticValue.ob as unpacked_list_of_ident_or_list).Add(ValueStack[ValueStack.Depth-1].ob as ident_or_list); (CurrentSemanticValue.ob as unpacked_list_of_ident_or_list).source_context = LocationStack[LocationStack.Depth-1]; } break; - case 980: // lambda_list_of_unpacked_params_or_id -> lambda_list_of_unpacked_params_or_id, + case 981: // lambda_list_of_unpacked_params_or_id -> lambda_list_of_unpacked_params_or_id, // tkComma, lambda_unpacked_params_or_id { CurrentSemanticValue.ob = ValueStack[ValueStack.Depth-3].ob; @@ -7534,24 +7550,24 @@ public partial class GPPGParser: ShiftReduceParser expr_l1 + case 982: // expr_l1_or_unpacked -> expr_l1 { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 982: // expr_l1_or_unpacked -> lambda_unpacked_params + case 983: // expr_l1_or_unpacked -> lambda_unpacked_params { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 983: // expr_l1_or_unpacked_list -> expr_l1_or_unpacked + case 984: // expr_l1_or_unpacked_list -> expr_l1_or_unpacked { CurrentSemanticValue.stn = new expression_list(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 984: // expr_l1_or_unpacked_list -> expr_l1_or_unpacked_list, tkComma, + case 985: // expr_l1_or_unpacked_list -> expr_l1_or_unpacked_list, tkComma, // expr_l1_or_unpacked { CurrentSemanticValue.stn = (ValueStack[ValueStack.Depth-3].stn as expression_list).Add(ValueStack[ValueStack.Depth-1].ex, CurrentLocationSpan); } break; - case 985: // func_decl_lambda -> identifier, tkArrow, lambda_function_body + case 986: // 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 lambda_any_type_node_syntax(), LocationStack[LocationStack.Depth-3]), parametr_kind.none, null, LocationStack[LocationStack.Depth-3]), LocationStack[LocationStack.Depth-3]); @@ -7562,7 +7578,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, + case 987: // func_decl_lambda -> tkRoundOpen, tkRoundClose, lambda_type_ref_noproctype, // tkArrow, lambda_function_body { // �?дес�? надо анализи�?ова�?�? по �?ел�? и либо ос�?авля�?�? lambda_inferred_type, либо дела�?�? его null! @@ -7572,7 +7588,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkColon, fptype, tkRoundClose, + case 988: // 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]); @@ -7584,7 +7600,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, + case 989: // func_decl_lambda -> tkRoundOpen, identifier, tkSemiColon, full_lambda_fp_list, // tkRoundClose, lambda_type_ref_noproctype, tkArrow, // lambda_function_body { @@ -7598,7 +7614,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, + case 990: // func_decl_lambda -> tkRoundOpen, identifier, tkColon, fptype, tkSemiColon, // full_lambda_fp_list, tkRoundClose, // lambda_type_ref_noproctype, tkArrow, lambda_function_body { @@ -7613,7 +7629,7 @@ public partial class GPPGParser: ShiftReduceParser tkRoundOpen, expr_l1_or_unpacked, tkComma, + case 991: // func_decl_lambda -> tkRoundOpen, expr_l1_or_unpacked, tkComma, // expr_l1_or_unpacked_list, lambda_type_ref, // optional_full_lambda_fp_list, tkRoundClose, rem_lambda { @@ -7723,7 +7739,7 @@ public partial class GPPGParser: ShiftReduceParser lambda_unpacked_params, rem_lambda + case 992: // func_decl_lambda -> lambda_unpacked_params, rem_lambda { var pair = ValueStack[ValueStack.Depth-1].ob as pair_type_stlist; // пока �?о�?мал�?н�?е па�?аме�?�?�? - null. Раск�?оем и�? са�?а�?н�?м визи�?о�?ом @@ -7735,62 +7751,62 @@ public partial class GPPGParser: ShiftReduceParser expl_func_decl_lambda + case 993: // func_decl_lambda -> expl_func_decl_lambda { CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; } break; - case 993: // optional_full_lambda_fp_list -> /* empty */ + case 994: // optional_full_lambda_fp_list -> /* empty */ { CurrentSemanticValue.stn = null; } break; - case 994: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list + case 995: // optional_full_lambda_fp_list -> tkSemiColon, full_lambda_fp_list { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 995: // rem_lambda -> lambda_type_ref_noproctype, tkArrow, lambda_function_body + case 996: // 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 996: // expl_func_decl_lambda -> tkFunction, lambda_type_ref_noproctype, tkArrow, + case 997: // 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 997: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, tkRoundClose, + case 998: // 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 998: // expl_func_decl_lambda -> tkFunction, tkRoundOpen, full_lambda_fp_list, + case 999: // 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 999: // expl_func_decl_lambda -> tkProcedure, tkArrow, lambda_procedure_body + case 1000: // 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 1000: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, tkRoundClose, tkArrow, + case 1001: // 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 1001: // expl_func_decl_lambda -> tkProcedure, tkRoundOpen, full_lambda_fp_list, + case 1002: // 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 1002: // full_lambda_fp_list -> lambda_simple_fp_sect + case 1003: // 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) @@ -7810,102 +7826,102 @@ public partial class GPPGParser: ShiftReduceParser full_lambda_fp_list, tkSemiColon, lambda_simple_fp_sect + case 1004: // 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 1004: // lambda_simple_fp_sect -> ident_list, lambda_type_ref + case 1005: // 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 1005: // lambda_type_ref -> /* empty */ + case 1006: // lambda_type_ref -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new lambda_any_type_node_syntax(), null); } break; - case 1006: // lambda_type_ref -> tkColon, fptype + case 1007: // lambda_type_ref -> tkColon, fptype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 1007: // lambda_type_ref_noproctype -> /* empty */ + case 1008: // lambda_type_ref_noproctype -> /* empty */ { CurrentSemanticValue.td = new lambda_inferred_type(new lambda_any_type_node_syntax(), null); } break; - case 1008: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype + case 1009: // lambda_type_ref_noproctype -> tkColon, fptype_noproctype { CurrentSemanticValue.td = ValueStack[ValueStack.Depth-1].td; } break; - case 1009: // common_lambda_body -> compound_stmt + case 1010: // common_lambda_body -> compound_stmt { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 1010: // common_lambda_body -> if_stmt + case 1011: // common_lambda_body -> if_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1011: // common_lambda_body -> while_stmt + case 1012: // common_lambda_body -> while_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1012: // common_lambda_body -> repeat_stmt + case 1013: // common_lambda_body -> repeat_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1013: // common_lambda_body -> for_stmt + case 1014: // common_lambda_body -> for_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1014: // common_lambda_body -> foreach_stmt + case 1015: // common_lambda_body -> foreach_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1015: // common_lambda_body -> loop_stmt + case 1016: // common_lambda_body -> loop_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1016: // common_lambda_body -> case_stmt + case 1017: // common_lambda_body -> case_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1017: // common_lambda_body -> try_stmt + case 1018: // common_lambda_body -> try_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1018: // common_lambda_body -> lock_stmt + case 1019: // common_lambda_body -> lock_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1019: // common_lambda_body -> raise_stmt + case 1020: // common_lambda_body -> raise_stmt { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1020: // common_lambda_body -> yield_stmt + case 1021: // common_lambda_body -> yield_stmt { parsertools.AddErrorFromResource("YIELD_STATEMENT_CANNOT_BE_USED_IN_LAMBDA_BODY", CurrentLocationSpan); } break; - case 1021: // common_lambda_body -> tkRoundOpen, assignment, tkRoundClose + case 1022: // common_lambda_body -> tkRoundOpen, assignment, tkRoundClose { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-2].stn as statement, LocationStack[LocationStack.Depth-2]); } break; - case 1022: // lambda_function_body -> expr_l1_for_lambda + case 1023: // lambda_function_body -> expr_l1_for_lambda { var id = SyntaxVisitors.HasNameVisitor.HasName(ValueStack[ValueStack.Depth-1].ex, "Result"); if (id != null) @@ -7917,22 +7933,22 @@ public partial class GPPGParser: ShiftReduceParser common_lambda_body + case 1024: // lambda_function_body -> common_lambda_body { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } break; - case 1024: // lambda_procedure_body -> proc_call + case 1025: // lambda_procedure_body -> proc_call { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1025: // lambda_procedure_body -> assignment + case 1026: // lambda_procedure_body -> assignment { CurrentSemanticValue.stn = new statement_list(ValueStack[ValueStack.Depth-1].stn as statement, CurrentLocationSpan); } break; - case 1026: // lambda_procedure_body -> common_lambda_body + case 1027: // lambda_procedure_body -> common_lambda_body { CurrentSemanticValue.stn = ValueStack[ValueStack.Depth-1].stn; } diff --git a/Parsers/PascalABCParserNewSaushkin/PABC.ymc b/Parsers/PascalABCParserNewSaushkin/PABC.ymc index 4cfb7ede7..f006ff2b9 100644 --- a/Parsers/PascalABCParserNewSaushkin/PABC.ymc +++ b/Parsers/PascalABCParserNewSaushkin/PABC.ymc @@ -372,5 +372,6 @@ script= + diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index 35c65ef8f..9e5e71f47 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.9.0.3438 +3.9.0.3439 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 3c0fb953e..23766d841 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.9.0.3438' +!define VERSION '3.9.0.3439' diff --git a/SyntaxTree/tree/TreeHelper.cs b/SyntaxTree/tree/TreeHelper.cs index 5cbf2a74d..6dfd654ec 100644 --- a/SyntaxTree/tree/TreeHelper.cs +++ b/SyntaxTree/tree/TreeHelper.cs @@ -628,6 +628,7 @@ namespace PascalABCCompiler.SyntaxTree return "'" + Value + "'"; } public bool IsInterpolated = false; + public bool IsMultiline = false; } public partial class expression_list diff --git a/SyntaxTree/tree/tree.xml b/SyntaxTree/tree/tree.xml index c698642a5..d58c8bab5 100644 --- a/SyntaxTree/tree/tree.xml +++ b/SyntaxTree/tree/tree.xml @@ -4617,6 +4617,7 @@ + diff --git a/TestSuite/CompilationSamples/WPF.pas b/TestSuite/CompilationSamples/WPF.pas index f22ab18ce..640559e0d 100644 --- a/TestSuite/CompilationSamples/WPF.pas +++ b/TestSuite/CompilationSamples/WPF.pas @@ -40,6 +40,7 @@ type Slider = Slider; ComboBox = ComboBox; TextBlock = TextBlock; + Border = System.Windows.Controls.Border; Rectangle = Rectangle; DrawingVisual = DrawingVisual; diff --git a/bin/Lib/WPF.pas b/bin/Lib/WPF.pas index f22ab18ce..640559e0d 100644 --- a/bin/Lib/WPF.pas +++ b/bin/Lib/WPF.pas @@ -40,6 +40,7 @@ type Slider = Slider; ComboBox = ComboBox; TextBlock = TextBlock; + Border = System.Windows.Controls.Border; Rectangle = Rectangle; DrawingVisual = DrawingVisual;