Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

gcc Lex and Yacc Problem

1 view
Skip to first unread message

bill....@gmail.com

unread,
May 31, 2006, 5:47:03 PM5/31/06
to
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

0 new messages