#7 flex-2.5.33 breaks wine

2.5.33
closed-rejected
John43
5
2006-03-05
2006-02-27
No

the wine source code uses this in their parser.l:

/* Exclusive string handling */
%x yystr

which breaks because flex has an internal function:
YY_BUFFER_STATE yy_scan_string (yyconst char * yystr)

which will result in:
$ flex ./parser.l
$ gcc -c lex.yy.c ...
lex.yy.c:2610: error: parse error before numeric constant
lex.yy.c: In function `yy_scan_string':
lex.yy.c:2611: error: number of arguments doesn't match
prototype

simple fix is to rename 'yystr' to something like '__yystr'

Discussion

  • John43

    John43 - 2006-03-05
    • labels: --> Compiling the scanner
    • milestone: --> 2.5.33
    • assigned_to: nobody --> john43
    • status: open --> closed-rejected
     
  • John43

    John43 - 2006-03-05

    Logged In: YES
    user_id=335409

    Hi, This is a bug in wine. It is a fairly common mistake,
    actually. The namespace "yy" is reserved for flex, as far as
    flex is concerned. To avoid conflicts with flex symbols,
    you should not prefix any of your variables, functions,
    enums, defines, etc., with "yy". -John

     
  • Mike Frysinger

    Mike Frysinger - 2006-03-06

    Logged In: YES
    user_id=114429

    thanks, i'll take this up with the wine guys

    is there a flex manual online somewhere i could refer to ?
    the link on the frontpage of flex.sf.net is omitted ...

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks