help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with bison errors


From: Andreas Wagner
Subject: Re: Help with bison errors
Date: Wed, 10 Mar 2010 16:36:27 +0100

It could help if you post ur files. Maybe theres something wrong.

hmm i´m this on the following way

bison -d -oparser.c parser.y   // -d option creates the header for the
token used in the flexer
flex -oflexer.c flexer.l
gcc -oparser.o -c parser.c
gcc -oflexer.o -c flexer.c
gcc flexer.o parser.o

Regards

2010/3/10, john30 <address@hidden>:
>
> Hi, I am working on a bison parser and I get this error when compiling:
>
> Undefined symbols:
>   "NFA::setFinal(int)", referenced from:
>       doString(char, NFA&)in ccVcU1O4.o
>       negarRang(NFA&)    in ccVcU1O4.o
>       doElement(char, char)in ccVcU1O4.o
>       yyparse()    in ccVcU1O4.o
>   "NFA::getFinals()", referenced from:
>       doRepeticions(int*, NFA&) in ccVcU1O4.o
>       doRepeticions(int*, NFA&) in ccVcU1O4.o
>       doRepeticions(int*, NFA&) in ccVcU1O4.o
>   "NFA::addTransition(int, int, char)", referenced from:
>       doString(char, NFA&)in ccVcU1O4.o
>       doString(char, NFA&)in ccVcU1O4.o
>       negarRang(NFA&)    in ccVcU1O4.o
>       doElement(char, char)in ccVcU1O4.o
>       doElement(char, char)in ccVcU1O4.o
>       doElement(char, char)in ccVcU1O4.o
>       doElement(char, char)in ccVcU1O4.o
>       doRepeticions(int*, NFA&) in ccVcU1O4.o
>       doRepeticions(int*, NFA&) in ccVcU1O4.o
>       doRepeticions(int*, NFA&) in ccVcU1O4.o
>       yyparse()    in ccVcU1O4.o
>       yyparse()    in ccVcU1O4.o
>   "NFA::plus()", referenced from:
>       yyparse()    in ccVcU1O4.o
>   "NFA::NFA()", referenced from:
>       doString(char, NFA&)in ccVcU1O4.o
>       negarRang(NFA&)    in ccVcU1O4.o
>       doElement(char, char)in ccVcU1O4.o
>       doRepeticions(int*, NFA&) in ccVcU1O4.o
>       doRepeticions(int*, NFA&) in ccVcU1O4.o
>       doRepeticions(int*, NFA&) in ccVcU1O4.o
>       yyparse()    in ccVcU1O4.o
>       yyparse()    in ccVcU1O4.o
>       yyparse()    in ccVcU1O4.o
>       yyparse()    in ccVcU1O4.o
>       yyparse()    in ccVcU1O4.o
>       yyparse()    in ccVcU1O4.o
>   "NFA::setInitial(int)", referenced from:
>       doString(char, NFA&)in ccVcU1O4.o
>       negarRang(NFA&)    in ccVcU1O4.o
>       doElement(char, char)in ccVcU1O4.o
>       doRepeticions(int*, NFA&) in ccVcU1O4.o
>       doRepeticions(int*, NFA&) in ccVcU1O4.o
>       yyparse()    in ccVcU1O4.o
>   "NFA::addOptional()", referenced from:
>       yyparse()    in ccVcU1O4.o
>   "yylex()", referenced from:
>       yyparse()    in ccVcU1O4.o
>   "NFA::concatenate(NFA&)", referenced from:
>       doString(char, NFA&)in ccVcU1O4.o
>       doRepeticions(int*, NFA&) in ccVcU1O4.o
>       doRepeticions(int*, NFA&) in ccVcU1O4.o
>       doRepeticions(int*, NFA&) in ccVcU1O4.o
>       yyparse()    in ccVcU1O4.o
>   "NFA::one_of(NFA&)", referenced from:
>       yyparse()    in ccVcU1O4.o
>       yyparse()    in ccVcU1O4.o
>   "NFA::addState()", referenced from:
>       doString(char, NFA&)in ccVcU1O4.o
>       doString(char, NFA&)in ccVcU1O4.o
>       negarRang(NFA&)    in ccVcU1O4.o
>       negarRang(NFA&)    in ccVcU1O4.o
>       doElement(char, char)in ccVcU1O4.o
>       doElement(char, char)in ccVcU1O4.o
>       doRepeticions(int*, NFA&) in ccVcU1O4.o
>       doRepeticions(int*, NFA&) in ccVcU1O4.o
>       yyparse()    in ccVcU1O4.o
>       yyparse()    in ccVcU1O4.o
>   "NFA::star()", referenced from:
>       yyparse()    in ccVcU1O4.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
>
>
> I don't think it's because of some include missing (I have all includes
> needed to read the functions). I compile the files like:
>
> bison -dvt p5.y
> flex -c++ -d p5.l
> g++ lex.yy.cc p5.tab.c -lfl -o main
>
> Could you help me?
>
> Thanks in advance
> --
> View this message in context:
> http://old.nabble.com/Help-with-bison-errors-tp27848610p27848610.html
> Sent from the Gnu - Bison - Help mailing list archive at Nabble.com.
>
>
>
> _______________________________________________
> address@hidden http://lists.gnu.org/mailman/listinfo/help-bison
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]