How To Compile YACC And LEX?
- by nisha
Actually I'm having YACC file as pos.yacc and LEX file name is pos1.lex.. while compilling I'm getting the folowing error...
malathy@malathy:~$ cc lex.yy.c y.tab.c -ly -ll
pos1.lex
%{
#include "y.tab.h"
int yylval;
%}
DIGIT [0-9]+
%%
{DIGIT} {yylval=atoi(yytext);return DIGIT;}
[\n ] {}
. {return *yytext;}
%%
yacc file is pos.yacc
%token…