ORCA-C/Table.pas
Stephen Heumann 0184e3db7b Recognize the new keywords from C99 and C11 as such.
Specifically, the following will now be tokenized as keywords:

_Alignas
_Alignof
_Atomic
_Bool
_Complex
_Generic
_Imaginary
_Noreturn
_Static_assert
_Thread_local
restrict

('inline' was also added as a standard keyword in C99, but ORCA/C already treated it as such.)

The parser currently has no support for any of these keywords, so for now errors will still be generated if they are used, but this is a first step toward adding support for them.
2020-01-03 22:48:53 -06:00

44 lines
1.6 KiB
ObjectPascal

{$optimize 7}
{---------------------------------------------------------------}
{ }
{ Table }
{ }
{ Initialized arrays and records. }
{ }
{---------------------------------------------------------------}
unit Table;
{$LibPrefix '0/obj/'}
interface
uses CCommon;
var
{from scanner.pas}
{----------------}
charKinds: array[minChar..maxChar] of charEnum; {character kinds}
charSym: array[minChar..maxChar] of tokenEnum; {symbols for single char symbols}
reservedWords: array[_Alignassy..whilesy] of string[14]; {reserved word strings}
wordHash: array[0..25] of tokenEnum; {for hashing reserved words}
{from ASM.PAS}
{------------}
{names of the opcodes}
names: array[opcode] of packed array[1..3] of char;
{binary values for the opcodes}
iOpcodes: array[o_clc..o_xce] of byte;
rOpcodes: array[o_bcc..o_bvs] of byte;
nOpcodes: array[o_adc..o_tsb,operands] of byte;
{from EXPRESSION.PAS}
{-------------------}
icp: array[tokenEnum] of byte; {in-commong priorities}
isp: array[tokenEnum] of byte; {in-stack priorities}
implementation
end.