Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
# Conflicts: # Parsers/PascalABCParserNewSaushkin/ABCPascal.cs # Parsers/PascalABCParserNewSaushkin/ABCPascal.lst # Parsers/PascalABCParserNewSaushkin/ABCPascalYacc.cs
This commit is contained in:
commit
d4d80e1bb2
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -4457,6 +4457,32 @@ keyword
|
|||
{ $$ = $1; }
|
||||
| tkWhen
|
||||
{ $$ = $1; }
|
||||
| tkPartial
|
||||
{ $$ = $1; }
|
||||
| tkAbstract
|
||||
{ $$ = new token_info($1.name, @$); }
|
||||
| tkLock
|
||||
{ $$ = $1; }
|
||||
| tkImplicit
|
||||
{ $$ = $1; }
|
||||
| tkExplicit
|
||||
{ $$ = $1; }
|
||||
| tkOn
|
||||
{ $$ = new token_info($1.name, @$); }
|
||||
| tkVirtual
|
||||
{ $$ = new token_info($1.name, @$); }
|
||||
| tkOverride
|
||||
{ $$ = new token_info($1.name, @$); }
|
||||
| tkLoop
|
||||
{ $$ = $1; }
|
||||
| tkExtensionMethod
|
||||
{ $$ = new token_info($1.name, @$); }
|
||||
| tkOverload
|
||||
{ $$ = new token_info($1.name, @$); }
|
||||
| tkReintroduce
|
||||
{ $$ = new token_info($1.name, @$); }
|
||||
| tkForward
|
||||
{ $$ = new token_info($1.name, @$); }
|
||||
;
|
||||
|
||||
reserved_keyword
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
33
TestSuite/CompilationSamples/keywords.pas
Normal file
33
TestSuite/CompilationSamples/keywords.pas
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
type
|
||||
T = class
|
||||
public static procedure &Abstract := exit;
|
||||
public static procedure &Operator := exit;
|
||||
public static procedure &Partial := exit;
|
||||
public static procedure &Lock := exit;
|
||||
public static procedure &Implicit := exit;
|
||||
public static procedure &Explicit := exit;
|
||||
public static procedure &On := exit;
|
||||
public static procedure &Overload := exit;
|
||||
public static procedure &Reintroduce := exit;
|
||||
public static procedure &Override := exit;
|
||||
public static procedure &Extensionmethod := exit;
|
||||
public static procedure &Virtual := exit;
|
||||
public static procedure &Forward := exit;
|
||||
public static procedure &Loop := exit;
|
||||
end;
|
||||
|
||||
begin
|
||||
T.Abstract(); //Program2.pas(20) : Встречено 'Abstract', а ожидался оператор
|
||||
T.Partial(); //Program2.pas(22) : Встречено 'Partial', а ожидался оператор
|
||||
T.Lock(); //Program2.pas(23) : Встречено 'Lock', а ожидался оператор
|
||||
T.Implicit(); //Program2.pas(24) : Встречено 'Implicit', а ожидался оператор
|
||||
T.Explicit(); //Program2.pas(25) : Встречено 'Explicit', а ожидался оператор
|
||||
T.On(); //Program2.pas(26) : Встречено 'On', а ожидался оператор
|
||||
T.Overload(); //Program2.pas(27) : Встречено 'Overload', а ожидался оператор
|
||||
T.Reintroduce(); //Program2.pas(28) : Встречено 'Reintroduce', а ожидался оператор
|
||||
T.Override(); //Program2.pas(29) : Встречено 'Override', а ожидался оператор
|
||||
T.Extensionmethod(); //Program2.pas(30) : Встречено 'Extensionmethod', а ожидался оператор
|
||||
T.Virtual(); //Program2.pas(31) : Встречено 'Virtual', а ожидался оператор
|
||||
T.Forward(); //Program2.pas(32) : Встречено 'Forward', а ожидался оператор
|
||||
T.Loop(); //Program2.pas(33) : Встречено 'Loop', а ожидался оператор
|
||||
end.
|
||||
Loading…
Reference in a new issue