#2 flex 2.5.31 compile fix

closed-accepted
Davy Durham
None
5
2003-06-26
2003-06-06
Wummel
No

Usage of internal yy* variables (and that includes
yylineno) is forbidden in flex 2.5.x.

Discussion

  • Wummel
    Wummel
    2003-06-06

     
    Attachments
  • Davy Durham
    Davy Durham
    2003-06-07

    • assigned_to: nobody --> ddurham
     
  • Davy Durham
    Davy Durham
    2003-06-07

    Logged In: YES
    user_id=28588

    Actually, I think some of this is a mistake in flex.

    The '%option noyylineno' in cfg.l should make flex NOT
    define the yylineno symbol because I want to keep up with
    line numbers, not have flex do it for me (because I do it
    needing more functionality than flex's keeping up with it
    provides).

    However, not being able to assign to YY_CURRENT_BUFFER looks
    likes it's no longer valid. But this is okay because from
    looking at the generated scanner, it will now return NULL if
    there is no current buffer anymore (previously it would just
    be pointed to wherever the last buffer was--even it had been
    deallocated already).

    But I need to figure out which version of flex this
    YY_CURRENT_BUFFER change started in and #if/#endif that
    assignment out (because it still needs to be there for old
    versions of flex)

    Thanks for bringing these issues to my attention. I'll try
    to contact the flex list about fixing the '%option
    noyylineno' problem.

     
  • Wummel
    Wummel
    2003-06-07

    Logged In: YES
    user_id=9205

    > The '%option noyylineno' in cfg.l should make flex NOT
    > define the yylineno symbol
    Hm, it shoud work, but I won't bet my head on it :)

    There was some struggling on the flex mailing list about
    what is the "external api" of flex. The developers wanted to
    have the yy* namespace for internal usage except where
    explicitely documented, which was not the case with yylineno :/
    That is why I suggest not using yylineno but another name.

     
  • Davy Durham
    Davy Durham
    2003-06-07

    Logged In: YES
    user_id=28588

    Oh ok... Well, I'll wait and see if my bug report on
    lex.sf.net is ever tended to. But I guess it won't hurt to
    rename it of course.

     
  • Davy Durham
    Davy Durham
    2003-06-26

    • status: open --> closed-accepted