help-bison
[Top][All Lists]
Advanced

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

Re: flex+bison and C++, second part


From: Tamas Nagy
Subject: Re: flex+bison and C++, second part
Date: Thu, 12 Apr 2007 11:55:47 -0700 (PDT)

Hi!

I also have a parser.c file. (sourcehandler)
Should i have to rewrite it to c++ or just link it?

Because of this, which is in the .y file:
  vrml_filel_init(f, argv[1]);

it cannot compile to c++. Even if #include
"prog.tab.h"
it cannot see the above function.

I have the bottom files too:
> Got link problem (i suppose)
> so the general way to compile a lex & yacc program
> is:
> 1. Generate the lexer
>      lex my_file.l
> 2. Generate the parser
>     yacc -d my_file.y
> 3. Compile the sources
>     cc -c lex.yy.c y.tab.cc
> 4. Link the object files (this is what i think your
> problem is)
>     cc -o my_application lex.yy.o y.tab.ob -ll -ly
> If you're using flex change the link library like
> this:
>     cc -o my_application lex.yy.o y.tab.ob -lfl -ly
> 5. Eat cake
> 
> it depends on which platform you are developing.
> If you're developing on windows use a batch file.
> -- 
> View this message in context:
>
http://www.nabble.com/flex%2Bbison-and-C%2B%2B%2C-second-part-tf1959860.html#a9905584
> Sent from the Gnu - Bison - Help mailing list
> archive at Nabble.com.
> 
> 
> 
> _______________________________________________
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-bison
> 



       
____________________________________________________________________________________
It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/




reply via email to

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