bug-bison
[Top][All Lists]
Advanced

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

Re: bug in scan-skel.l


From: martin nylin
Subject: Re: bug in scan-skel.l
Date: Sat, 02 Apr 2005 04:15:10 +0800

Hi

As text, I suppose. All I did was just download the source for 2.0 and

configure
make
make check

Then 122 out of 127 test cases failed, all with the same error message: 
"invalid token in skeleton"

Regards
Martin
----- Original Message -----
From: "Hans Aberg" <address@hidden>
To: "martin nylin" <address@hidden>
Subject: Re: bug in scan-skel.l
Date: Fri, 1 Apr 2005 20:51:16 +0200

> 
> The thing is though that if the input stream is opened as text, 
> then the local newline should be translated into a single '\n' even 
> before the lexer sees it. Is the input file opened as binary?
> 
> At 21:26 +0800 2005/04/01, martin nylin wrote:
> > Hi
> >
> > I am testing bison 2.0 on cygwin and has found a bug in 
> > scan-skel.l. This bug causes 122 test cases to fail with the 
> > error message:
> >
> > fatal error: invalid token in skeleton: @output @output_parser_name@
> >
> > The mistake is in line 50 of scan-skel.l:
> >
> > yytext[yyleng - 1] = '\0';
> >
> > Where the programmer did not consider the fact that windoze uses 
> > two characters to represent end of line. I have no patch ready, 
> > but I assume the nicest solution would be to add something like 
> > this to system.h:
> >
> > #ifdef _WIN32
> >    #define NUMBER_OF_EOL_CHARACTERS 2
> > #else
> >    #define NUMBER_OF_EOL_CHARACTERS 1
> > #endif
> >
> > and then modify line 50 in scan-skel.l to:
> >
> > yytext[yyleng - NUMBER_OF_EOL_CHARACTERS] = '\0';
> >
> > What to do think? At least it resolves my problem.
> >
> > Regards
> > Martin
> >
> > http://www.nosoftwarepatents.com/
> >
> > --
> > ______________________________________________
> > Check out the latest SMS services @ http://www.linuxmail.org
> > This allows you to send and receive SMS through your mailbox.
> >
> >
> > Powered by Outblaze



Nej till mjukvarupatent!
http://www.nosoftwarepatents.com/

-- 
______________________________________________
Check out the latest SMS services @ http://www.linuxmail.org 
This allows you to send and receive SMS through your mailbox.


Powered by Outblaze




reply via email to

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