global.h

来自「编译原理LL1语法分析的实验程序」· C头文件 代码 · 共 49 行

H
49
字号
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define assign_l_max 37
//if a variable is larger than bound_v ,it must be a interminal symbol
#define bound_v 10384
#define	max_symbol_len 24
#define max_production 100
#define max_right_d    8
struct assign_node{
	char idf[max_symbol_len];
	int assign;
	struct assign_node*next;
};
struct link_node{
	int assign;
	struct assign_node*point;
	struct link_node*next;
};
//production
struct pro_entry{
	int p[max_right_d+1];
};
struct node{
	int element;
	struct node*next;
};
struct analy_node{
	int terminal;
	int production;
	struct analy_node*next;
};
struct analy{
	int interm;
	int isnull;
	struct analy_node*row;
	struct node* first;
	struct node* follow;
	struct analy *next;
};
FILE* sin;
struct node*stack;
struct analy* ff;
struct link_node link_list[assign_l_max];//a list of link for finding a symbol by a int easy
struct assign_node assign_list[assign_l_max];//a list that record symbol
struct pro_entry pro_l[max_production];//a list of production
int load_grammer(FILE*ginput);
void analysis(void);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?