This commit is contained in:
Ivan Bondarev 2021-12-12 14:46:43 +01:00
parent ec110dca07
commit b845735c07
5 changed files with 22 additions and 4 deletions

View file

@ -311,6 +311,7 @@ namespace CodeCompletion
compiler.Compile();
foreach (var lv in compiler.CompiledVariables)
CorrectVariableType(lv);
compiler.ClearAll(/*false*/);
}

View file

@ -2,7 +2,7 @@
// This CSharp output file generated by Gardens Point LEX
// Version: 1.1.3.301
// Machine: DESKTOP-2BJCJ7I
// DateTime: 24.10.2021 12:23:06
// DateTime: 12.12.2021 14:38:36
// UserName: ibond
// GPLEX input file <ABCPascal.lex>
// GPLEX frame file <embedded resource>

View file

@ -4183,6 +4183,8 @@ dotted_identifier
: identifier { $$ = $1; }
| dotted_identifier tkPoint identifier_or_keyword
{
if ($1 is index)
parsertools.AddErrorFromResource("UNEXPECTED_SYMBOL{0}", @1, "^");
$$ = new dot_node($1 as addressed_value, $3 as addressed_value, @$);
}
;
@ -4251,7 +4253,9 @@ variable
| typeof_expr
{ $$ = $1; }
| literal_or_number tkPoint identifier_or_keyword
{
{
if ($1 is index)
parsertools.AddErrorFromResource("UNEXPECTED_SYMBOL{0}", @1, "^");
$$ = new dot_node($1 as addressed_value, $3 as addressed_value, @$);
}
| variable_or_literal_or_number tkSquareOpen expr_list tkSquareClose
@ -4320,6 +4324,8 @@ variable
}
| variable tkPoint identifier_keyword_operatorname
{
if ($1 is index)
parsertools.AddErrorFromResource("UNEXPECTED_SYMBOL{0}", @1, "^");
$$ = new dot_node($1 as addressed_value, $3 as addressed_value, @$);
}
| tuple tkPoint identifier_keyword_operatorname

View file

@ -2,7 +2,7 @@
// GPPG version 1.3.6
// Machine: DESKTOP-2BJCJ7I
// DateTime: 24.10.2021 12:23:07
// DateTime: 12.12.2021 14:38:37
// UserName: ibond
// Input file <ABCPascal.y>
@ -6642,6 +6642,8 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
break;
case 770: // dotted_identifier -> dotted_identifier, tkPoint, identifier_or_keyword
{
if (ValueStack[ValueStack.Depth-3].ex is index)
parsertools.AddErrorFromResource("UNEXPECTED_SYMBOL{0}", LocationStack[LocationStack.Depth-3], "^");
CurrentSemanticValue.ex = new dot_node(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan);
}
break;
@ -6714,7 +6716,9 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
{ CurrentSemanticValue.ex = ValueStack[ValueStack.Depth-1].ex; }
break;
case 785: // variable -> literal_or_number, tkPoint, identifier_or_keyword
{
{
if (ValueStack[ValueStack.Depth-3].ex is index)
parsertools.AddErrorFromResource("UNEXPECTED_SYMBOL{0}", LocationStack[LocationStack.Depth-3], "^");
CurrentSemanticValue.ex = new dot_node(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan);
}
break;
@ -6790,6 +6794,8 @@ public partial class GPPGParser: ShiftReduceParser<PascalABCSavParser.Union, Lex
break;
case 790: // variable -> variable, tkPoint, identifier_keyword_operatorname
{
if (ValueStack[ValueStack.Depth-3].ex is index)
parsertools.AddErrorFromResource("UNEXPECTED_SYMBOL{0}", LocationStack[LocationStack.Depth-3], "^");
CurrentSemanticValue.ex = new dot_node(ValueStack[ValueStack.Depth-3].ex as addressed_value, ValueStack[ValueStack.Depth-1].id as addressed_value, CurrentLocationSpan);
}
break;

View file

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