example.c

来自「编译原理此法分析三」· C语言 代码 · 共 25 行

C
25
字号
// exam.c : Defines the entry point for the console application.
#include <stdlib.h>
#include <stdio.h>
int linesCount=0;
int yaccVerbose=0;
int lexVerbose=0;
extern int yyparse();

int main(int argc, char* argv[])
{
	extern FILE *yyin;

	printf("Compiling...!\n");
	if((yyin=fopen("exprTest.txt","rt"))==NULL){
			perror("can not open file exprTest.txt\n") ;
			exit(1);
		}
	if (yyparse()){
		fprintf(stderr,"parser error\n");
		exit(1);
	}
	printf("yyparse() completed successfully!\n");
	return 0;
}

⌨️ 快捷键说明

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