#include <string>
#include <conio.h>
#include <cctype>
#include<iostream>
using namespace std;
int c=0;
FILE *fu;
char ch;
// 关键字
char
*keyword[35]={"and","array","begin","bool","call","case","char","cons
tant","dim","do",
"else","end","false","for","if","input","integer","not","of","or","ou
tput","procedure","program",
"read","real","repeat","set","stop","then","to","true","until","var",
"while","write"};
// 分隔符
char *fenge[22]={ "(", ")" , "*", "*/", "+", ",", "-", ".", "..", "/",
"/*",
":", ":=", ";", "<", "<=", "<>", "=", ">", ">=", "[",
"]" };
char Letter (char ch)// 字母处理
{
//cout<<" 进入 LETTER"<<endl;
int i=-1;
int m=1;
int j,flag;
int p=0;
char letter[20];
while (isalnum(ch)!=0)// 当 ch 为数字 0-9 或字母 a-z 及 A-Z 时,返回非
零值,否则返回零
{
letter[++i]=ch;
ch=fgetc(fu);
};
letter[i+1]=' ';
for(int n=0;n<=i;n++)
{
if((letter[n]>='a' && letter[n]<='z') || (letter[n]>='A' &&
letter[n]<='Z')
|| (letter[n]=='-') || (letter[n]=='.') ||(letter[n]=='_')
|| (letter[n]>='0' && letter[n]<='9'))
p++;