Оптимальні програми
End;
End;
Function GetName: String;
Var Token: String;
Begin
Token := '';
If NOT IsAlpha(Look) Then Expected('Ім’я');
While IsAlNum(Look) Do Begin
Token := Token + UpCase(Look);
GetChar;
End;
GetName := Token;
SkipWhite;
End;
Function GetNum: String;
Var Value: String;
Begin
Value := '';
If NOT IsDigit(Look) Then Expected('Ціле число');
While IsDigit(Look) Do Begin
Value := Value + Look;
GetChar;
End;
GetNum := Value;
SkipWhite;