没有合适的资源?快使用搜索试试~ 我知道了~
编译原理词法分析程序(C语言)
5星 · 超过95%的资源 需积分: 22 24 下载量 145 浏览量
2008-11-30
14:46:20
上传
评论 2
收藏 8KB TXT 举报
温馨提示
试读
12页
编译原理词法分析程序(C语言) 编译原理词法分析程序(C语言) 编译原理词法分析程序(C语言)
资源推荐
资源详情
资源评论
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <ctype.h>
#include <iostream.h>
#include <iomanip.h>
#include <math.h>
#include <conio.h>
typedef struct //关键字结构体
{
char ID[30];
char name[30];
}keywords;
typedef struct //符号结构体
{
char ID[30];
char name;
}sign;
typedef struct //全部单词结构体
{
int position;
char leibie[10];
char ID[5];
char name[10];
double num;
}table;
typedef struct //数字结构体
{
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <ctype.h>
#include <iostream.h>
#include <iomanip.h>
#include <math.h>
#include <conio.h>
typedef struct //关键字结构体
{
char ID[30];
char name[30];
}keywords;
typedef struct //符号结构体
{
char ID[30];
char name;
}sign;
typedef struct //全部单词结构体
{
int position;
char leibie[10];
char ID[5];
char name[10];
double num;
}table;
typedef struct //数字结构体
{
int position;
char leibie[30];
char ID[30];
char name[30];
double num;
}number;
typedef struct //标识符结构体
{
int position;
char leibie[30];
char ID[30];
char name[30];
}id; //关键字0 标识符1 数字2 符号3
sign signs[100];
keywords keys[100];
number NUM[100];
id id_table[100];
table all_table[100];
double tokenval;
int lineno;
int lastnum=0;
int lastsign=0;
int lastid=0;
int lastword=0;
void Keyword()
{
int i;
strcpy(keys[0].name,"main");
char leibie[30];
char ID[30];
char name[30];
double num;
}number;
typedef struct //标识符结构体
{
int position;
char leibie[30];
char ID[30];
char name[30];
}id; //关键字0 标识符1 数字2 符号3
sign signs[100];
keywords keys[100];
number NUM[100];
id id_table[100];
table all_table[100];
double tokenval;
int lineno;
int lastnum=0;
int lastsign=0;
int lastid=0;
int lastword=0;
void Keyword()
{
int i;
strcpy(keys[0].name,"main");
剩余11页未读,继续阅读
资源评论
- aimo_Doris2013-01-19很好的程序,但好像运行有点问题吧,好久之前看过,忘记了
Rocky_SP
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功