According to Gabriele Bartolini:
> > Yes, probably another conclusion I jumped to, based on the recollection
> > that Neal had done the Win32 port.  After reviewing cvs diffs yesterday,
> > I realized that Gabriele had committed the conf_lexer.cxx that had those
> > ifdefs.
> 
> I am sorry, but I did not think I had done it. I had a better look and I
> just committed the changes made by Marco Nenciarini. At that time, I
> tested everything, it worked and I applied the changes.
> 
> However, I just had a look at your patch, Gilles, and manually applied
> it on the current CVS code; I then ran:

Just curious, but why did you need to manually apply my patch?  Did it
not work with the patch command?  The manual changes to conf_lexer.lxx
were OK, despite lots of changes to the indentation which now make it
harder to read (remember standard tab stops are 8 spaces), but you missed
one of my changes to conf_parser.yxx, which is likely to break things.

So, I've rebuilt a patch, attached, that includes my changes to
both of these files, with a few cosmetic changes, plus the changes
to config_parser.cxx (which I rebuilt on a system with bison 1.875c).
The only missing piece is conf_lexer.cxx, which I'm reluctant to rebuild
because the most recent flex program I have installed on any of my
systems is flex-2.5.4a-31.1 (on Red Hat FC2).  I've gzipped the patch
so it won't get messed up by any e-mail program.  Could you try this patch,
then rebuild conf_lexer.cxx with your flex program?

> flex  -oconf_lexer.cxx  conf_lexer.lxx
> 
> and
> 
> bison -o conf_parser.cxx conf_parser.yxx 
> 
> Here are my flex and bison versions:
> - flex 2.5.31
> - bison (GNU Bison) 1.875a
> 
> In attach, you find the patch I just made. I'd suggest to wait after
> 3.2.0b6 is out to commit it into the CVS, unless you guys tell me to do
> differently. My lack of faith comes from my ignorance with lex/yacc,
> even though I built the package and I got no errors.
> 
> I wait your orders guys for the release. Please vote:
> 
> 1) apply this patch on 3.2.0b6 and test it
> 2) release 3.2.0b6 and apply it straightly after
> 
> Please tell me what you think and eventually have a try.

Well, remember what this patch is supposed to fix:

- improved error handling, gives file name and correct line number, even
  if using include files
- allows space before comment, because otherwise it would just complain
  about the "#" character and go on to parse the text after it as a
  definition
- allows config file with an unterminated line at end of file, by pushing
  an extra newline token to the parser at EOF
- parser correctly handles extra newline tokens, by moving this handling
  out of simple_expression, and into simple_expression_list and block, as
  simple_expression must return a new ConfigDefaults object and a newline
  token doesn't cut it (caused segfaults when dealing with fix above)

It would be a shame to release yet another beta release and still not
have these problems fixed!  Proper error handling has been lacking for
a long time, and many users have been confused by the config parser's
cryptic error messages.  This will at least tell them what file to look
at, and the proper line number when using includes.  The problem with
files then end without a newline has caught many people too.

3.2.0b6 is likely to be the last beta before 3.2.0 final, so if you're
at all worried about the impact of this change, isn't it better to put
it in the hands of beta testers before final release?  I'd really like
this patch to go into b6, but it would be a good idea if a few other
developers tested it first, as I asked back in April.  All I can say is
it works for me (but I tested it using flex 2.5.4a, and only on RH 9).

-- 
Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/
Dept. Physiology, U. of Manitoba  Winnipeg, MB  R3E 3J7  (Canada)

Attachment: config_parser.1.gz
Description: gzip compressed data, was "config_parser.1", from Unix

Reply via email to