文档介绍:...wd...
...wd...
token t={s,"keywords",l_it->second};
(t);
}else{
l_it=(s);
if (l_it==())
{
id[s]=idNum;
token t={s,"id",idNum++};
(t);
}else {
token t={s,"id",l_it->second};
(t);
}
}
break;
case 2:
l_it=(s);
if (l_it!=()){
token t={s,"separatrix",l_it->second};
(t);
}
break;
case 3:
l_it=(s);
if (l_it!=()){
token t={s,"op",l_it->second};
(t);
...wd...
...wd...
...wd...
}
break;
case 4:
l_it=(s);
if (l_it!=()){
token t={s,"relop",l_it->second};
(t);
}
break;
case 5:
l_it=(s);
if (l_it==())
{
num[s]=nNum;
token t={s,"num",nNum++};
(t);
}else {
token t={s,"num",l_it->second};
(t);
}
break;
default: //error
token t={s,"id",-1};
(t);
break;
}
}
void lexical() 词法分析器,按字符读入文法并对其进展