example.c
来自「编译原理此法分析一」· C语言 代码 · 共 26 行
C
26 行
// 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");
printf(" 序号 op arg1 arg2 mask 语句\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 + -
显示快捷键?