[Top][All Lists]

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

RE: lex & yacc with C++ projects

From: Robert Collins
Subject: RE: lex & yacc with C++ projects
Date: Fri, 26 Apr 2002 21:59:50 +1000

> -----Original Message-----
> From: Guido Draheim [mailto:address@hidden 
> Sent: Friday, April 26, 2002 9:49 PM

> aaaahhh. even though I need some enlightment what's wrong with a
> libstdc++ dependency for a c++ compiled source - so your project
> uses c++ files without libstdc++ and you want to include a parser 
> but that would bring you an unwanted lib-dependency?

> anyway, since I'm thinking about it, I am wondering if the 
> following could work - what do you think about such rules...
> :
>    $(LTCXXCOMPILE) -c $<
> :
>    $(CXXCOMPILE) -c $<
> ... or does that not work with `make`? hmmm, just wondering...

These are the current rules: fooparse.h: fooparse.y
        bison -d -o $(srcdir)/fooparse.y
        @mv fooparse.h 2>/dev/null || mv fooparse.hh
fooparse.h foolex.l fooparse.h
        flex -8 $(srcdir)/foolex.l
        mv lex.yy.c


... and in the PROGRAMS fooparse.h

what would be great would be

in the _PROGRAMS fooparse.y foolex.l


or something similar (with the explicit behaviour that the lexx and yacc
mode will still be std C output.)


reply via email to

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