example.c

来自「词法」· C语言 代码 · 共 28 行

C
28
字号
// exam.c : Defines the entry point for the console application.
//



#include <stdlib.h>
#include <stdio.h>
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 test.txt\n") ;
			exit(1);
		}
	if (yyparse()==1){
		fprintf(stderr,"parser error\n");
		exit(1);
	}
	printf("yyparse() completed successfully!\n");
	return 0;
}

⌨️ 快捷键说明

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