This commit is contained in:
Mikhalkovich Stanislav 2022-01-29 18:30:35 +03:00
parent 79126d18ea
commit 2ecc622a3f
9 changed files with 25 additions and 19 deletions

View file

@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3"; public const string Major = "3";
public const string Minor = "8"; public const string Minor = "8";
public const string Build = "2"; public const string Build = "2";
public const string Revision = "3069"; public const string Revision = "3071";
public const string MainVersion = Major + "." + Minor; public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

View file

@ -1,4 +1,4 @@
%MINOR%=8 %MINOR%=8
%REVISION%=3069 %REVISION%=3071
%COREVERSION%=2 %COREVERSION%=2
%MAJOR%=3 %MAJOR%=3

View file

@ -2,7 +2,7 @@
// This CSharp output file generated by Gardens Point LEX // This CSharp output file generated by Gardens Point LEX
// Version: 1.1.3.301 // Version: 1.1.3.301
// Machine: DESKTOP-G8V08V4 // Machine: DESKTOP-G8V08V4
// DateTime: 28.12.2021 18:50:18 // DateTime: 29.01.2022 17:58:31
// UserName: ????????? // UserName: ?????????
// GPLEX input file <ABCPascal.lex> // GPLEX input file <ABCPascal.lex>
// GPLEX frame file <embedded resource> // GPLEX frame file <embedded resource>

View file

@ -3412,7 +3412,7 @@ new_expr
{ {
// sugared node // sugared node
var l = $4 as name_assign_expr_list; var l = $4 as name_assign_expr_list;
var exprs = l.name_expr.Select(x=>x.expr).ToList(); var exprs = l.name_expr.Select(x=>x.expr.Clone() as expression).ToList();
var typename = "AnonymousType#"+Guid(); var typename = "AnonymousType#"+Guid();
var type = new named_type_reference(typename,@1); var type = new named_type_reference(typename,@1);
@ -3424,13 +3424,13 @@ new_expr
; ;
field_in_unnamed_object field_in_unnamed_object
: identifier tkAssign relop_expr : identifier tkAssign expr_l1
{ {
if ($3 is nil_const) if ($3 is nil_const)
parsertools.AddErrorFromResource("NIL_IN_UNNAMED_OBJECT",@$); parsertools.AddErrorFromResource("NIL_IN_UNNAMED_OBJECT",@$);
$$ = new name_assign_expr($1,$3,@$); $$ = new name_assign_expr($1,$3,@$);
} }
| relop_expr | expr_l1
{ {
ident name = null; ident name = null;
var id = $1 as ident; var id = $1 as ident;

View file

@ -2,7 +2,7 @@
// GPPG version 1.3.6 // GPPG version 1.3.6
// Machine: DESKTOP-G8V08V4 // Machine: DESKTOP-G8V08V4
// DateTime: 28.12.2021 18:50:19 // DateTime: 29.01.2022 17:58:31
// UserName: ????????? // UserName: ?????????
// Input file <ABCPascal.y> // Input file <ABCPascal.y>
@ -1634,15 +1634,15 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
states[1459] = new State(-235); states[1459] = new State(-235);
states[1460] = new State(-612); states[1460] = new State(-612);
states[1461] = new State(new int[]{8,1462}); states[1461] = new State(new int[]{8,1462});
states[1462] = new State(new int[]{141,47,84,49,85,50,79,52,77,247,54,42,142,150,144,151,143,153,152,155,155,156,154,157,153,158,61,160,11,358,133,362,114,367,113,368,140,369,139,383,43,390,40,428,8,430,19,267,20,272,75,461},new int[]{-331,1463,-330,1471,-143,1467,-147,48,-148,51,-95,1470,-102,449,-81,325,-80,331,-93,357,-15,43,-161,147,-163,148,-162,152,-16,154,-57,159,-195,380,-109,382,-128,372,-108,384,-187,427,-253,437,-292,438,-17,439,-58,464,-112,467,-169,468,-264,469,-94,470,-260,474,-262,475,-263,589}); states[1462] = new State(new int[]{141,47,84,49,85,50,79,52,77,247,54,42,142,150,144,151,143,153,152,155,155,156,154,157,153,158,61,160,11,358,133,362,114,367,113,368,140,369,139,383,43,390,40,428,8,430,19,267,20,272,75,461,38,599},new int[]{-331,1463,-330,1471,-143,1467,-147,48,-148,51,-98,1470,-96,29,-95,310,-102,449,-81,325,-80,331,-93,357,-15,43,-161,147,-163,148,-162,152,-16,154,-57,159,-195,380,-109,382,-128,372,-108,384,-187,427,-253,437,-292,438,-17,439,-58,464,-112,467,-169,468,-264,469,-94,470,-260,474,-262,475,-263,589,-236,590,-113,591,-238,598});
states[1463] = new State(new int[]{9,1464,98,1465}); states[1463] = new State(new int[]{9,1464,98,1465});
states[1464] = new State(-623); states[1464] = new State(-623);
states[1465] = new State(new int[]{141,47,84,49,85,50,79,52,77,247,54,42,142,150,144,151,143,153,152,155,155,156,154,157,153,158,61,160,11,358,133,362,114,367,113,368,140,369,139,383,43,390,40,428,8,430,19,267,20,272,75,461},new int[]{-330,1466,-143,1467,-147,48,-148,51,-95,1470,-102,449,-81,325,-80,331,-93,357,-15,43,-161,147,-163,148,-162,152,-16,154,-57,159,-195,380,-109,382,-128,372,-108,384,-187,427,-253,437,-292,438,-17,439,-58,464,-112,467,-169,468,-264,469,-94,470,-260,474,-262,475,-263,589}); states[1465] = new State(new int[]{141,47,84,49,85,50,79,52,77,247,54,42,142,150,144,151,143,153,152,155,155,156,154,157,153,158,61,160,11,358,133,362,114,367,113,368,140,369,139,383,43,390,40,428,8,430,19,267,20,272,75,461,38,599},new int[]{-330,1466,-143,1467,-147,48,-148,51,-98,1470,-96,29,-95,310,-102,449,-81,325,-80,331,-93,357,-15,43,-161,147,-163,148,-162,152,-16,154,-57,159,-195,380,-109,382,-128,372,-108,384,-187,427,-253,437,-292,438,-17,439,-58,464,-112,467,-169,468,-264,469,-94,470,-260,474,-262,475,-263,589,-236,590,-113,591,-238,598});
states[1466] = new State(-627); states[1466] = new State(-627);
states[1467] = new State(new int[]{108,1468,8,-777,7,-777,140,-777,4,-777,15,-777,136,-777,134,-777,116,-777,115,-777,129,-777,130,-777,131,-777,132,-777,128,-777,114,-777,113,-777,126,-777,127,-777,124,-777,6,-777,118,-777,123,-777,121,-777,119,-777,122,-777,120,-777,135,-777,133,-777,9,-777,98,-777,117,-777,11,-777,17,-777}); states[1467] = new State(new int[]{108,1468,8,-777,7,-777,140,-777,4,-777,15,-777,136,-777,134,-777,116,-777,115,-777,129,-777,130,-777,131,-777,132,-777,128,-777,114,-777,113,-777,126,-777,127,-777,124,-777,6,-777,118,-777,123,-777,121,-777,119,-777,122,-777,120,-777,135,-777,133,-777,16,-777,9,-777,98,-777,13,-777,117,-777,11,-777,17,-777});
states[1468] = new State(new int[]{54,42,142,150,144,151,143,153,152,155,155,156,154,157,153,158,61,160,11,358,133,362,114,367,113,368,140,369,139,383,141,47,84,49,85,50,79,52,77,247,43,390,40,428,8,430,19,267,20,272,75,461},new int[]{-95,1469,-102,449,-81,325,-80,331,-93,357,-15,43,-161,147,-163,148,-162,152,-16,154,-57,159,-195,380,-109,382,-128,372,-108,384,-143,426,-147,48,-148,51,-187,427,-253,437,-292,438,-17,439,-58,464,-112,467,-169,468,-264,469,-94,470,-260,474,-262,475,-263,589}); states[1468] = new State(new int[]{54,42,142,150,144,151,143,153,152,155,155,156,154,157,153,158,61,160,11,358,133,362,114,367,113,368,140,369,139,383,141,47,84,49,85,50,79,52,77,247,43,390,40,428,8,430,19,267,20,272,75,461,38,599},new int[]{-98,1469,-96,29,-95,310,-102,449,-81,325,-80,331,-93,357,-15,43,-161,147,-163,148,-162,152,-16,154,-57,159,-195,380,-109,382,-128,372,-108,384,-143,426,-147,48,-148,51,-187,427,-253,437,-292,438,-17,439,-58,464,-112,467,-169,468,-264,469,-94,470,-260,474,-262,475,-263,589,-236,590,-113,591,-238,598});
states[1469] = new State(new int[]{118,311,123,312,121,313,119,314,122,315,120,316,135,317,133,318,9,-624,98,-624},new int[]{-192,32}); states[1469] = new State(-624);
states[1470] = new State(new int[]{118,311,123,312,121,313,119,314,122,315,120,316,135,317,133,318,9,-625,98,-625},new int[]{-192,32}); states[1470] = new State(-625);
states[1471] = new State(-626); states[1471] = new State(-626);
states[1472] = new State(new int[]{13,190,16,194,5,-691,12,-691}); states[1472] = new State(new int[]{13,190,16,194,5,-691,12,-691});
states[1473] = new State(new int[]{141,47,84,49,85,50,79,52,77,247,142,150,144,151,143,153,152,155,155,156,154,157,153,158,40,264,19,267,20,272,11,348,75,812,54,815,139,816,8,830,133,833,114,367,113,368,61,160},new int[]{-87,1474,-88,222,-79,230,-13,235,-10,245,-14,208,-143,246,-147,48,-148,51,-161,262,-163,148,-162,152,-16,263,-253,266,-292,271,-235,347,-195,839,-169,837,-57,838,-261,845,-265,846,-11,841,-237,847}); states[1473] = new State(new int[]{141,47,84,49,85,50,79,52,77,247,142,150,144,151,143,153,152,155,155,156,154,157,153,158,40,264,19,267,20,272,11,348,75,812,54,815,139,816,8,830,133,833,114,367,113,368,61,160},new int[]{-87,1474,-88,222,-79,230,-13,235,-10,245,-14,208,-143,246,-147,48,-148,51,-161,262,-163,148,-162,152,-16,263,-253,266,-292,271,-235,347,-195,839,-169,837,-57,838,-261,845,-265,846,-11,841,-237,847});
@ -2466,8 +2466,8 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
rules[621] = new Rule(-169, new int[]{77,-280,-69}); rules[621] = new Rule(-169, new int[]{77,-280,-69});
rules[622] = new Rule(-169, new int[]{77,-280,11,-67,12,-5}); rules[622] = new Rule(-169, new int[]{77,-280,11,-67,12,-5});
rules[623] = new Rule(-169, new int[]{77,24,8,-331,9}); rules[623] = new Rule(-169, new int[]{77,24,8,-331,9});
rules[624] = new Rule(-330, new int[]{-143,108,-95}); rules[624] = new Rule(-330, new int[]{-143,108,-98});
rules[625] = new Rule(-330, new int[]{-95}); rules[625] = new Rule(-330, new int[]{-98});
rules[626] = new Rule(-331, new int[]{-330}); rules[626] = new Rule(-331, new int[]{-330});
rules[627] = new Rule(-331, new int[]{-331,98,-330}); rules[627] = new Rule(-331, new int[]{-331,98,-330});
rules[628] = new Rule(-69, new int[]{}); rules[628] = new Rule(-69, new int[]{});
@ -5881,14 +5881,14 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
CurrentSemanticValue.ex = new unnamed_type_object(l, true, ne, CurrentLocationSpan); CurrentSemanticValue.ex = new unnamed_type_object(l, true, ne, CurrentLocationSpan);
} }
break; break;
case 624: // field_in_unnamed_object -> identifier, tkAssign, relop_expr case 624: // field_in_unnamed_object -> identifier, tkAssign, expr_l1
{ {
if (ValueStack[ValueStack.Depth-1].ex is nil_const) if (ValueStack[ValueStack.Depth-1].ex is nil_const)
parsertools.AddErrorFromResource("NIL_IN_UNNAMED_OBJECT",CurrentLocationSpan); parsertools.AddErrorFromResource("NIL_IN_UNNAMED_OBJECT",CurrentLocationSpan);
CurrentSemanticValue.ob = new name_assign_expr(ValueStack[ValueStack.Depth-3].id,ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan); CurrentSemanticValue.ob = new name_assign_expr(ValueStack[ValueStack.Depth-3].id,ValueStack[ValueStack.Depth-1].ex,CurrentLocationSpan);
} }
break; break;
case 625: // field_in_unnamed_object -> relop_expr case 625: // field_in_unnamed_object -> expr_l1
{ {
ident name = null; ident name = null;
var id = ValueStack[ValueStack.Depth-1].ex as ident; var id = ValueStack[ValueStack.Depth-1].ex as ident;

View file

@ -353,5 +353,6 @@ script=

View file

@ -1 +1 @@
3.8.2.3069 3.8.2.3071

View file

@ -1 +1 @@
!define VERSION '3.8.2.3069' !define VERSION '3.8.2.3071'

View file

@ -0,0 +1,5 @@
##
var a := new class(x := true?1:2); //Ошибка: Встречено '?', а ожидалось '='
var b := new class(x := if true then 1 else 2); //Ошибка: Встречено 'if', а ожидалось выражение
Assert(a.x = 1);
Assert(b.x = 1);