"Джек Креншоу. Давайте создадим компилятор! " - читать интересную книгу автора

IsAlpha := upcase(c) in ['A'..'Z'];
end;
{-}
{ Recognize a Decimal Digit }
function IsDigit(c: char): boolean;
begin
IsDigit := c in ['0'..'9'];
end;
{-}
{ Get an Identifier }
function GetName: char;
begin
if not IsAlpha(Look) then Expected('Name');
GetName := UpCase(Look);
GetChar;
end;
{-}
{ Get a Number }
function GetNum: char;
begin
if not IsDigit(Look) then Expected('Integer');
GetNum := Look;
GetChar;
end;
{-}
{ Output a String with Tab }
procedure Emit(s: string);
begin
Write(TAB, s);
end;
{-}
{ Output a String with Tab and CRLF }
procedure EmitLn(s: string);
begin
Emit(s);
WriteLn;
end;
{-}
{ Initialize }
procedure Init;
begin
GetChar;
end;
{-}
{ Main Program }
begin
Init;
end.
{-}