This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

flex and dos source files. How is flex built for cygwin


Hi,

We have a customer that is using flex under a custom version of cygwin that we provided them (with source). The customer is having problems when their "*.l" files are in dos format. Flex is taking the lines from the file and adding them into the lex.yy.c file untouched. (i.e. they still have the \n\r at the end), and this causing problems later on.

I tried using the version of flex that comes with the latest version of cygwin (1.5.12) and flex changes the \n\r to just \n, which makes everything work fine. Good I thought since the version of flex we provide is not the latest. I'll just recompile.

But when I tried that with the latest flex (2.5.4a-3) I get the same behavior that the customer is seeing. I get this behavior even if I compile on the latest version of cygwin.

So, my question is what options are used for building flex?

I've done "./configure; make" is there something special that I need to add to either command. I'm including a simple test program that I found on the web that can demonstrate this problem. Untar it and in the directory type "make ; ./simple < testfile". With cygwin you should see:
Desk Calculator, version 1.0 (<date>)
80


14
400
Successful Completion

For the flex compiled from the source, type "make LEX='<newflexdir/flex'; ./simple < testfile". You should see
Desk Calculator, version 1.0 (<date>)
bison: syntax error


Any help would be appreciated,
Peter


Attachment: simple.tar.bz2
Description: Binary data

Attachment: cygcheck.out
Description: Binary data

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]