Давайте создадим компилятор! :: Креншоу Джек
Страница:
223 из 382
}
function Locate(N: Symbol): integer;
begin
Locate := Lookup(@ST, n, NEntry);
end;
{–}
{ Look for Symbol in Table }
function InTable(n: Symbol): Boolean;
begin
InTable := Lookup(@ST, n, NEntry) <> 0;
end;
{–}
{ Check to See if an Identifier is in the Symbol Table }
{ Report an error if it's not. }
procedure CheckTable(N: Symbol);
begin
if not InTable(N) then Undefined(N);
end;
{–}
{ Check the Symbol Table for a Duplicate Identifier }
{ Report an error if identifier is already in table.
|< Пред. 221 222 223 224 225 След. >|