Re: [Flex-help] flex C++ parser is brittle in systems with more then one version of flex installed
flex is a tool for generating scanners
Brought to you by:
wlestes
|
From: John H. <jo...@gl...> - 2012-11-27 00:17:34
|
That works if I am working with command-line tools. I did eventually get XCode to use the correct version of FlexLexer.h. But the current architecture requires users to make sure that their program search path and their include search path are in sync. This probably works out of the box for Linux systems but not for XCode. I haven't tried it, but I bet there is extra work to get Visual Studio to find FlexLexer.h as well. Outputting a class header file along with the class code file would help flex be more robust in development environments other than unix command-line tools. -- john On Mon, Nov 26, 2012 at 2:37 AM, Will Estes <wes...@gm...> wrote: > Does gcc -I /usr/local/include not do what you want? > > On Sunday, 25 November 2012, 7:51 pm -0800, John Horigan < > jo...@gl...> wrote: > > > I am having a hard time using flex 2.5.37 installed at /usr/local on my > OS > > X Mountain Lion system because flex 2.5.35 is already present under /usr. > > Getting XCode to use flex 2.5.37 is not too hard, but getting it to use > > /usr/local/include/FlexLexer.h is proving difficult. > > > > I would like a feature that would allow the lexer to include the correct > > version of FlexLexer.h. I propose that the option > > > > ‘--header-file=FILE, %option header-file="FILE"’ > > > > be allowed for C++ lexers. If the header option is present then flex > copies > > FlexLexer.h to the specified file and includes that file in the lexer. > You > > could even copy the correct lexer class name into the output instead of > > relying on a #define. I would be willing to work on a patch for this > change > > if developers are interested. > > > > -- john > > > ------------------------------------------------------------------------------ > > Monitor your physical, virtual and cloud infrastructure from a single > > web console. Get in-depth insight into apps, servers, databases, vmware, > > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > > Pricing starts from $795 for 25 servers or applications! > > http://p.sf.net/sfu/zoho_dev2dev_nov > > _______________________________________________ > > Flex-help mailing list > > Fle...@li... > > https://lists.sourceforge.net/lists/listinfo/flex-help > > -- > Will Estes (wl...@us...) > Flex Project Maintainer > http://flex.sourceforge.net/ > |