我有一个lex和yacc程序。程序编译工作正常,但当我通过gcc y.tab.c lex.yy.c -ll运行程序时,它会给出fatal error: y.tab.h: No such file or directory。lex程序:->#include<string.h>FILE *fp,*yyin;"*"|"/"|"+"|"-"
我对编译器和学习如何从.txt文件中输入多行方程(每行一个等式)的计算器很陌生。同时我也面临着分割故障的问题。YACC代码:#include <stdio.h>#define YYSTYPE int /* the attribute type for Yacc'sstack */
extern int yylval; /* defined by lex, holds attrib of cur