没有合适的资源?快使用搜索试试~ 我知道了~
#include stdio.h(1).docx
需积分: 0 0 下载量 110 浏览量
2024-05-22
10:58:35
上传
评论
收藏 3KB DOCX 举报
温馨提示
试读
4页
#include stdio.h(1).docx
资源推荐
资源详情
资源评论
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_PRODUCTIONS 100
#define MAX_SYMBOLS 10
// 定义产生式结构
typedef struct {
char left;
char right[MAX_SYMBOLS][MAX_SYMBOLS];
int rightCount;
} Production;
// 函数声明
void inputGrammar(Production *p, int *n);
void printGrammar(Production *p, int n);
int hasImmediateLeftRecursion(Production p);
void eliminateLeftRecursion(Production *p, int n);
int main() {
Production productions[MAX_PRODUCTIONS];
int numProductions = 0;
// 输入文法
inputGrammar(productions, &numProductions);
// 打印输入的文法
printf("输入的文法:");
资源评论
2201_75998797
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功