Bug #852

Parse error problem for config files on linux when regenerating the bison/flex script file

Added by artart78 over 8 years ago. Updated almost 8 years ago.

Status:Rejected Start date:05/08/2010
Priority:Low Due date:
Assignee:- % Done:

0%

Category:Build
Target version:Version 0.8.0

Description

You must not generate the cf_* file in code\nel\src\misc\config_file because it's known to not working anymore with current version of flex and bison.

Use the generated file that are in the repo.

log.txt - Log of the error when running make in code/ryzom/server/src/mirror_service (2.3 kB) Magnifier artart78, 05/08/2010 12:41 pm

debug_mirror_service.cfg - The preprocessed debug file (3.4 kB) artart78, 05/08/2010 12:41 pm

History

#1 Updated by artart78 over 8 years ago

It seems to work now. The parser files from the repo seem correct; I think it messed them up when I ran cmake (before running the make_all). You can close it, except if you think there's a problem in the CMakeFiles.

#2 Updated by zorglub over 8 years ago

I also had some problems with the config file parser. Basically, nothing worked, not even the sample, not even an empty file.

I finally nailed it down to the following problem, in nel/src/misc/config_file/cf_grammatical.h
Here, we statically define the tokens for use by the lexer, starting at 257.
However, the parser (cf_grammatical.cpp) starts at 258.

So for example, we have in cf_grammatical.h:

#define ADD_ASSIGN 257

And in cf_grammatical.cpp:

ADD_ASSIGN = 258,

Which causes tokens sent from the lexer to be misinterpreted by the parser, wrecking havoc.

I guess some behaviour changed in flex/bison, somewhere. I run Gentoo 64 bits, with the following versions:

bison (GNU Bison) 2.4.1

flex 2.5.35

#3 Updated by zorglub over 8 years ago

After a bit more look, it might be a slight build discrepancy somewhere. In my case, the parser (cf_grammatical.cpp) is regenerated by the build process (in the build root, code/build/release/nel), whereas it seems that it's not intended. The src commited one (in code/nel/src/) is apparently supposed to be used and has the defines for the symbols.

#4 Updated by krystlih over 8 years ago

I have this issue on Ubuntu 10.04 32-bit right now, I've tried using both versions of the cf_grammatical.cpp file with no luck, does anyone have a resolution to this issue?

#5 Updated by TiXx815 over 8 years ago

same problem on Ubuntu 10.04 64-bit and bison 2.4.1 right now

#7 Updated by vl over 8 years ago

  • Subject changed from Parse error problem for config files on linux to Parse error problem for config files on linux when regenerating the bison/flex script file
  • Status changed from New to Validated
  • Priority changed from Normal to Low

I changed the title and text since we know we must not regenerate the script file

#8 Updated by kervala almost 8 years ago

With flex 2.5.4 and bison 2.4.1, that's working fine and even if some #defines are not identical to before, it doesn't create any bug.

#9 Updated by kervala almost 8 years ago

  • Status changed from Validated to Rejected
  • Target version set to Version 0.8.0

Also available in: Atom PDF