help-flex
[Top][All Lists]
Advanced

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

Flex 2.5.19 native compile for Win32


From: dan.johnson2
Subject: Flex 2.5.19 native compile for Win32
Date: Thu, 12 Sep 2002 17:32:07 -0500

Hi,

I am looking for guidance on how to make the most recent Flex version
compile and run on Win2k. I have seen the 2.5.4a version with the MSVC make,
but it still looks like a substantial port effort to get it to run for Win32
(with Flexdef.h mods as a start), so I'm hoping I'm missing something
simple. I am using MSVC, and I also use Borland 5.5.

I want to use Bison and flex to create C++ parsers for modest level language
parsers (simpler aspects of C++, Java, Fortran) as a learning effort toward
understanding how to build the tools and grammars. My end goals are to
understand how to build and extend program slicers, etc.

Any tools you can point me to, any guidance on what to skip, what not to,
etc., would be greatly appreciated.

I am having difficulty finding working examples of C++ examples involving
Bison and Flex. I want to use the Flex feature providing the location of the
token in the source code, as well as using 4 parsers in the same program, so
"pure_parser", reentrant, a double as a return type for yylval, debug (since
I'm a beginner), error_body=0, lex_body=0 (for pure), and a confusing
collection of errors result. Examples showing this, what includes to use for
MSDOS C++, would be VERY helpful.

The relationship between the macros for yylex and the name I give the parser
seem problematic. It ends up I have to "precompute" what the preprocessor +
Flex/Bison is going to name the routine, which is trial and error on the
generated source. Is there a simple rule to this?

In C++, when I name the parser, and name the lexer, then where do I tell the
parser what 1) lexer class to call, and 2) the yylex method name? The two
seem to be confused, and many attempts have failed.

Also, when installing, does configure work on windows machines (MS-DOS)? I'm
missing some steps on how to install and run these programs that were
probably developed on Unix/Linux machines on my MS-DOS machine. Any help, or
if you could point me to some resource pages I'd greatly appreciate it.


Thanks in advance,

Dan Johnson









reply via email to

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