#include <iostream>
#include<bits/stdc++.h>
using namespace std;
map<string,string>mp;
void coo(string k,int id)
{
if(id==1)
{
mp[k]="keyword";
}
else if(id==2)
{
mp[k]="boundary";
}
else if(id==3)
{
mp[k] = "identifier";
}
else if(id==4)
{
mp[k] = "operator";
}
else
{
mp[k] = "integer";
}
}
void init()
{
coo("main",1);
coo("if",1);
coo("int",1);
coo("for",1);
coo("while",1);
coo("else",1);
coo("(",2<
sdut 编译原理 小C语言--词法分析程序
最新推荐文章于 2022-05-14 20:33:04 发布