This commit is contained in:
Ivan Bondarev 2021-12-24 14:52:33 +01:00
parent 525fb45569
commit dce5abc6b4
4 changed files with 15 additions and 6 deletions

View file

@ -1,9 +1,9 @@
// //
// 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-2BJCJ7I
// DateTime: 24.12.2021 11:23:25 // DateTime: 24.12.2021 14:49:33
// UserName: ????????? // UserName: ibond
// GPLEX input file <ABCPascal.lex> // GPLEX input file <ABCPascal.lex>
// GPLEX frame file <embedded resource> // GPLEX frame file <embedded resource>
// //

View file

@ -4320,6 +4320,8 @@ variable
} }
| variable tkRoundOpen optional_expr_list tkRoundClose | variable tkRoundOpen optional_expr_list tkRoundClose
{ {
if ($1 is index)
parsertools.AddErrorFromResource("UNEXPECTED_SYMBOL{0}", @1, "^");
$$ = new method_call($1 as addressed_value,$3 as expression_list, @$); $$ = new method_call($1 as addressed_value,$3 as expression_list, @$);
} }
| variable tkPoint identifier_keyword_operatorname | variable tkPoint identifier_keyword_operatorname

View file

@ -1,9 +1,9 @@
// (see accompanying GPPGcopyright.rtf) // (see accompanying GPPGcopyright.rtf)
// GPPG version 1.3.6 // GPPG version 1.3.6
// Machine: DESKTOP-G8V08V4 // Machine: DESKTOP-2BJCJ7I
// DateTime: 24.12.2021 11:23:26 // DateTime: 24.12.2021 14:49:34
// UserName: ????????? // UserName: ibond
// Input file <ABCPascal.y> // Input file <ABCPascal.y>
// options: no-lines gplex // options: no-lines gplex
@ -6789,6 +6789,8 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
break; break;
case 789: // variable -> variable, tkRoundOpen, optional_expr_list, tkRoundClose case 789: // variable -> variable, tkRoundOpen, optional_expr_list, tkRoundClose
{ {
if (ValueStack[ValueStack.Depth-4].ex is index)
parsertools.AddErrorFromResource("UNEXPECTED_SYMBOL{0}", LocationStack[LocationStack.Depth-4], "^");
CurrentSemanticValue.ex = new method_call(ValueStack[ValueStack.Depth-4].ex as addressed_value,ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan); CurrentSemanticValue.ex = new method_call(ValueStack[ValueStack.Depth-4].ex as addressed_value,ValueStack[ValueStack.Depth-2].stn as expression_list, CurrentLocationSpan);
} }
break; break;

View file

@ -0,0 +1,5 @@
//!Неожиданный символ '^'
begin
var p: pointer;
(^integer)(p)^.print;
end.