I am trying to write a parse program/script/whatever using lex and
yacc.
basically, I'm getting this error:
***********************************************************************(Compiling
commands)
[me]$ bison -d tcpparse.y
[me]$ mv tcpparse.tab.h tcpparse.h
mv: overwrite `tcpparse.h'? y
[me]$ mv tcpparse.tab.c tcpparse.y.c
mv: overwrite `tcpparse.y.c'? y
[me]$ flex tcpparse.l
[me]$ mv lex.yy.c tcpparse.lex.c
mv: overwrite `tcpparse.lex.c'? y
[me]$ gcc -c tcpparse.lex.c -o tcpparse.lex.o
[me]$ gcc -c tcpparse.lex.c -o tcpparse.lex.o
***********************************************************************error
begins here*****************
[me]$ gcc -o tcpparse.lex.o tcpparse.y.o -ll -lm -lfl
tcpparse.y.o(.text+0x25e): In function `yyparse':
: undefined reference to `yylex'
collect2: ld returned 1 exit status
************************************************************************error
ends here******************
Now, my understanding of Lex and Yacc is not very good. If you could
help me with a solution that would be great. If you could write it so
your kids could understand it, that would be better.
I'm just looking for some possible causes of this problem. and maybe a
hint at what I need to look for.
Bill Meehan