mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-02-01 01:30:47 +00:00
Rename TypeSpecifier to DeclarationSpecifiers, consistent with C standard terminology.
Also remove its first argument, which was unused. There is no functional change yet.
This commit is contained in:
parent
a9fb1ba482
commit
06a027b237
@ -43,6 +43,8 @@
|
|||||||
{ expressionType - the type of the expression }
|
{ expressionType - the type of the expression }
|
||||||
{ expressionTree - for non-constant initializers }
|
{ expressionTree - for non-constant initializers }
|
||||||
{ isConstant - is the initializer expression conastant? }
|
{ isConstant - is the initializer expression conastant? }
|
||||||
|
{ typeSpec - type given by the last declaration specifiers, }
|
||||||
|
{ specifier-qualifier list, or type name evaluated }
|
||||||
{ }
|
{ }
|
||||||
{ External Subroutines: }
|
{ External Subroutines: }
|
||||||
{ }
|
{ }
|
||||||
@ -60,8 +62,6 @@
|
|||||||
{ StopSpin - Stop the spinner }
|
{ StopSpin - Stop the spinner }
|
||||||
{ SystemError - intercept run time compiler errors }
|
{ SystemError - intercept run time compiler errors }
|
||||||
{ TermError - flag a terminal error }
|
{ TermError - flag a terminal error }
|
||||||
{ typeSpec - type of the last type specifier evaluated by }
|
|
||||||
{ TypeSpecifier }
|
|
||||||
{ }
|
{ }
|
||||||
{---------------------------------------------------------------}
|
{---------------------------------------------------------------}
|
||||||
|
|
||||||
|
17
Parser.pas
17
Parser.pas
@ -11,7 +11,7 @@
|
|||||||
{ InitParser - initialize the parser }
|
{ InitParser - initialize the parser }
|
||||||
{ Match - insure that the next token is of the specified type }
|
{ Match - insure that the next token is of the specified type }
|
||||||
{ TermParser - shut down the parser }
|
{ TermParser - shut down the parser }
|
||||||
{ TypeSpecifier - handle a type specifier }
|
{ DeclarationSpecifiers - handle a type specifier }
|
||||||
{ }
|
{ }
|
||||||
{---------------------------------------------------------------}
|
{---------------------------------------------------------------}
|
||||||
|
|
||||||
@ -2531,12 +2531,11 @@ Match(semicolonch, 22);
|
|||||||
end; {DoStaticAssert}
|
end; {DoStaticAssert}
|
||||||
|
|
||||||
|
|
||||||
procedure TypeSpecifier (doingFieldList,isConstant: boolean);
|
procedure DeclarationSpecifiers (isConstant: boolean);
|
||||||
|
|
||||||
{ handle a type specifier }
|
{ handle declaration specifiers or a specifier-qualifier list }
|
||||||
{ }
|
{ }
|
||||||
{ parameters: }
|
{ parameters: }
|
||||||
{ doingFieldList - are we processing a field list? }
|
|
||||||
{ isConstant - did we already find a constsy? }
|
{ isConstant - did we already find a constsy? }
|
||||||
{ }
|
{ }
|
||||||
{ outputs: }
|
{ outputs: }
|
||||||
@ -2604,7 +2603,7 @@ var
|
|||||||
goto 1;
|
goto 1;
|
||||||
end; {if}
|
end; {if}
|
||||||
typeSpec := wordPtr; {default type specifier is an integer}
|
typeSpec := wordPtr; {default type specifier is an integer}
|
||||||
TypeSpecifier(true,false); {get the type specifier}
|
DeclarationSpecifiers(false); {get the specifier-qualifier list}
|
||||||
if not skipDeclarator then
|
if not skipDeclarator then
|
||||||
repeat {declare the variables...}
|
repeat {declare the variables...}
|
||||||
if didFlexibleArray then
|
if didFlexibleArray then
|
||||||
@ -2732,7 +2731,7 @@ var
|
|||||||
end; {CheckConst}
|
end; {CheckConst}
|
||||||
|
|
||||||
|
|
||||||
begin {TypeSpecifier}
|
begin {DeclarationSpecifiers}
|
||||||
isForwardDeclared := false; {not doing a forward reference (yet)}
|
isForwardDeclared := false; {not doing a forward reference (yet)}
|
||||||
skipDeclarator := false; {declarations are required (so far)}
|
skipDeclarator := false; {declarations are required (so far)}
|
||||||
CheckConst;
|
CheckConst;
|
||||||
@ -3061,7 +3060,7 @@ if isconstant then begin {handle a constant type}
|
|||||||
tPtr^.isConstant := true;
|
tPtr^.isConstant := true;
|
||||||
typeSpec := tPtr;
|
typeSpec := tPtr;
|
||||||
end; {if}
|
end; {if}
|
||||||
end; {TypeSpecifier}
|
end; {DeclarationSpecifiers}
|
||||||
|
|
||||||
|
|
||||||
{-- Externally available subroutines ---------------------------}
|
{-- Externally available subroutines ---------------------------}
|
||||||
@ -3366,7 +3365,7 @@ if token.kind in {handle a TypeSpecifier/declarator}
|
|||||||
extendedsy,voidsy,enumsy,structsy,unionsy,typedef,volatilesy,constsy] then
|
extendedsy,voidsy,enumsy,structsy,unionsy,typedef,volatilesy,constsy] then
|
||||||
begin
|
begin
|
||||||
typeFound := true;
|
typeFound := true;
|
||||||
TypeSpecifier(false,foundConstsy);
|
DeclarationSpecifiers(foundConstsy);
|
||||||
if not skipDeclarator then begin
|
if not skipDeclarator then begin
|
||||||
variable := nil;
|
variable := nil;
|
||||||
Declarator(typeSpec, variable, variableSpace, doingPrototypes);
|
Declarator(typeSpec, variable, variableSpace, doingPrototypes);
|
||||||
@ -3898,7 +3897,7 @@ var
|
|||||||
begin {TypeName}
|
begin {TypeName}
|
||||||
{read and process the type specifier}
|
{read and process the type specifier}
|
||||||
typeSpec := wordPtr;
|
typeSpec := wordPtr;
|
||||||
TypeSpecifier(false,false);
|
DeclarationSpecifiers(false);
|
||||||
|
|
||||||
{handle the abstract-declarator part}
|
{handle the abstract-declarator part}
|
||||||
tl := nil; {no types so far}
|
tl := nil; {no types so far}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user