473,605 Members | 2,690 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

flex for windows

I am trying to contribute to a large project and am running into a bit
of a problem.

One of the lex files uses %option reentrant, which flex refuses to
compile. I am running version 2.5.4 under windows. From what I can
gather, this is a rather old version, but I have not been able to find
newer binaries.
Is there a download out there for version 2.5.33? Also, can someone
confirm that %option reentrant works with 2.5.33?

Thanks a million, and sorry if this is a FAQ.

Dec 12 '07 #1
16 7944
Gus Gassmann wrote:
I am trying to contribute to a large project and am running into a bit
of a problem.

One of the lex files uses %option reentrant, which flex refuses to
compile. I am running version 2.5.4 under windows. From what I can
gather, this is a rather old version, but I have not been able to find
newer binaries.
Yeah, I have 2.5.33 installed on current machine.
Is there a download out there for version 2.5.33? Also, can someone
confirm that %option reentrant works with 2.5.33?
flex issues are off-topic for c.l.c, one option might be running flex on
Linux, and then check if the C sources generated, compile on your
current environment.

--
Tor <bw****@wvtqvm. vw | tr i-za-h a-z>
Dec 12 '07 #2
On Dec 12, 4:32 pm, Gus Gassmann <Horand.Gassm.. .@dal.cawrote:
I am trying to contribute to a large project and am running into a bit
of a problem.

One of the lex files uses %option reentrant, which flex refuses to
compile. I am running version 2.5.4 under windows. From what I can
gather, this is a rather old version, but I have not been able to find
newer binaries.
Is there a download out there for version 2.5.33? Also, can someone
confirm that %option reentrant works with 2.5.33?
Hi,

I ran into the same problems some time ago. The only solution I found
was to compile a newer version using cygwin. I haven't found any
binaries of the 2.5.33 for windows at that time.

The biggest problem with the cygwin version is that you have to use
cygwin path for windows drives such as /cygdrive/c/ . If somebody has
another solution, I'm also interested in it.

Julien Hamaide

Dec 13 '07 #3
>One of the lex files uses %option reentrant, which flex refuses to
>compile. I am running version 2.5.4 under windows. ...

I ran into the same problems some time ago. The only solution I found
was to compile a newer version using cygwin. I haven't found any
binaries of the 2.5.33 for windows at that time.

The biggest problem with the cygwin version is that you have to use
cygwin path for windows drives such as /cygdrive/c/ . If somebody has
another solution, I'm also interested in it.
It looks like you have to run 'make check' inside cygwin anyway, or
discount environmental failures. You haven't specified what problem
you have in mind for "another solution." There are plenty of hints on
line about building or downloading flex for mingw, in case, for some
reason, you don't want to use the cygwin version.

Dec 13 '07 #4
>One of the lex files uses %option reentrant, which flex refuses to
>compile. I am running version 2.5.4 under windows. ...
I ran into the same problems some time ago. The only solution I found
was to compile a newer version using cygwin. I haven't found any
binaries of the 2.5.33 for windows at that time. ...
Part of the problem seems to be that flex has added features which
can't be supported fully without some posix environment. There are
plenty of suggestions on line about flex for mingw. You can't say you
want cygwin capabilities and in the same breath you want everything to
happen automagically without them.
Dec 13 '07 #5
Tim Prince wrote:
Part of the problem seems to be that flex has added features which
can't be supported fully without some posix environment. There are
plenty of suggestions on line about flex for mingw. You can't say you
want cygwin capabilities and in the same breath you want everything to
happen automagically without them.
I don't think that a tool like flex really depends on special POSIX
features, apart from the file handling. More problems will result from
the autobloat implementation, where more platform specific (filesystem
related) features may be required.

My solution for that problem is a Linux box, where ./configure already
works, then compiling the configured sources under the actual target
system (Windows), with "native" tools. Cygwin and MinGW frequently
fail to configure, with ridiculous error messages like "compiler
cannot create executable files". In most cases it's sufficient to link
the result with Windows-specific wrappers around fopen() and similar
filesystem specific functions, to make the code work.

DoDi

Dec 14 '07 #6
On 13 Dec, 08:12, Tim Prince <timothypri...@ sbcglobal.netwr ote:
One of the lex files uses %option reentrant, which flex refuses to
compile. I am running version 2.5.4 under windows. ...
I ran into the same problems some time ago. The only solution I found
was to compile a newer version using cygwin. I haven't found any
binaries of the 2.5.33 for windows at that time. ...

Part of the problem seems to be that flex has added features which
can't be supported fully without some posix environment. There are
plenty of suggestions on line about flex for mingw. You can't say you
want cygwin capabilities and in the same breath you want everything to
happen automagically without them.
Can't say I understand any of this. Someone handed me a .l file with
%option reentrant in it. I work in a Windows environment, but I have
to get that .l file compiled somehow.

Following this discussion, I found mingw and thought I installed it; I
downloaded flex 2.5.33 and thought I installed it, but it complains
that it can't find a .dll called msys-regex-0.dll. Now what?

Is there anyone kind (and knowledgeable) enough to help out a
desperate soul in a fix? I know I am asking for a lot, but I am hoping
that there is somewhere in this great world that is the internet a
step by step procedure I can follow. (As in 1. Download this file from
here. 2. Install to that directory. 3. Download and install that file
there. etc.)

Thanks a million.

gus
Dec 15 '07 #7
Hans-Peter Diettrich wrote:
Tim Prince wrote:
>Part of the problem seems to be that flex has added features which
can't be supported fully without some posix environment....

My solution for that problem is a Linux box, where ./configure already
works, then compiling the configured sources under the actual target
system (Windows), with "native" tools. ...
Cygwin configures and builds current flex "out of the box," and I get
only 1 adverse indication in the testsuite. Your recommendation to
use linux amounts to using a posix environment, more so than
cygwin. So, I'm not convinced by any of these suggestions that
avoiding posix emulations makes it easier.
Dec 15 '07 #8
tim prince wrote:
Cygwin configures and builds current flex "out of the box," and I get
only 1 adverse indication in the testsuite. Your recommendation to
use linux amounts to using a posix environment, more so than
cygwin. So, I'm not convinced by any of these suggestions that
avoiding posix emulations makes it easier.
Compiling to native code, for the actual target platform, eliminates
many problems in the later use of tools or libraries.

Like Wine for Linux, CygWin and MinGW are not *extensions* to the host
OS, they only open a *narrow* window into a different world. The use of
the output is restricted to the same emulator box.

With regards to autobloat, it's up to the author of the source code,
which target platform he wants to support. When he is a member of the
hate-Windows fraction, or simply doesn't care about non-POSIX platforms,
the configuration of his project will fail in CygWin, leaving the user
with uncompilable code. Autobloat is not only a tool set for making
projects platform independent, at the same time it allows to effectively
exclude platforms as well :-(

DoDi
Jan 6 '08 #9
In comp.compilers George Neuner <gn******@comca st.netwrote:
I've successfully compiled past versions of both Flex and Bison using
Visual Studio (not the latest stuff though).
iirc, the "newest" stuff has a runtime dependency on m4.

I hadn't noticed the .34 release, but running a quick check, see that
not only have none of the bugs I reported some time ago been addressed, but
that this has some additional defect in the legacy tablesize options.

That means that it can't compile some files written for "older" lex's -
more than a quarter of the files I'm working with (ymmv). So don't
discard 2.5.4a - you'll continue to need it for a while.

We're talking about this -

http://flex.sourceforge.net/

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

Jan 6 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
6578
by: olig9 | last post by:
Hello, is there a way to feed an ifstream to a parser generated with flex and bison? I could see that flex wants a FILE* for reading, but I only have an ifstream (actually and ifstream*) for input. It seems that flex++ can use an ifstream; but how does the generated lexer then work with bison? Or is there a (portable) way to get a FILE* from an ifstream? Thanks in advance, Oliver Gerlich
2
287
by: skulkrinbait | last post by:
Hello, I need some help please. I need to migrate some applications from OS2 to Windows, the source code is C. I believe this can be done using Lex and Yacc and have installed Cygwin with Flex and Bison which I believe are compatible but I'm having trouble getting Flex to process the C file. I assume that I need to write some rules for Flex to use but as I'm not familiar with C I've no idea what the rules should be. Apologies for...
6
15466
by: Volker Hetzer | last post by:
Hi! We are finding ourselves in a situation where we have to parse several more or less free format text files. In the past, on linux, we had flex and bison for generating very fast parsers for these files. Is there any equivalent in the visual studio world? Lots of Greetings! Volker --
2
2515
by: James Calivar | last post by:
Hi, I'm trying to compile PHP v5.1.6 under Windows XP using cygwin. I get the following error when I run ./configure. Can anyone help please? $ ./configure loading cache ./config.cache checking for Cygwin environment... yes checking for mingw32 environment... no
5
1516
by: Ronald S. Cook | last post by:
I need ideas on how to best design a Windows form for my particular situation. On a cattle feeding yard there will be between about 300 and 600 pens. On my "Pen Feeding Sequence" form, I want the user to be able to setup and maintain the order in which the pens should be fed (ultimately in the Pen table is a column named Sequence that gets an interger value). So on the form...
5
5940
by: ASP.NET explorer | last post by:
I have been asked to create some simple animation using Adobe Flash player in ASP.NET(C#) web application. While I am fairly well versed with ASP.NET C#, I absolutely have NO IDEA about how to say "Hello World" in a Flash enabled web page rendered via ASP.NET. Can any one let me get started? ---
13
3103
by: treble54 | last post by:
I need to build PHP from source with the pdo_ibm extension and I am having an issue with it. Firstly, I am using Visual Studio .NET 2003 and I am building PHP from source through the Visual Studio Command Prompt. When I get to the nmake step, it gets through everything until it hits the zend_language_scanner.l file. Then I get these errors: zend_language_scanner.l(24) : warning C4005: 'yyleng' : macro redefinition...
10
6704
by: Jules Winfield | last post by:
Guys, I've been designing applications for the financial services industry using MSFT technologies for many years (Win32 API, MFC, and now .NET WinForms). All applications are Internet-based, with a "thick client" which makes calls to my grid of servers via a socket or remoting connection. Customers are pleased with my work but it seems that over the past twelve months or so, those same customers have expressed a strong demand to...
0
1278
by: Benny the Guard | last post by:
I have code that uses FLEX and Bison on windows to generate a parser. It was configured awhile back by a colleague using FLEX 2.5.4a and builds on Solaris, Windows and Linux using FLEX 2.5.4. Things worked fine until I started adding symbols to my lexer now I get and error about "32000 NFA states". As I wold rather not limit myself to limits imposed by 1997 software, I looked and found an update which is 2.5.33. However, no where can I...
0
8001
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8424
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8415
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8069
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8286
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
3912
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3958
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2438
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1270
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.