Package: flex
Version: 2.5.31-36
Severity: important

The implementation of the -P option is incompatible with flex 2.5.4a,
since it does not leave the POSIX lex variables yytext and yyleng
accessible in the lexer when this option is used.  Here is a fix:

Index: main.c
--- flex-2.5.31/main.c  2003-04-01 01:51:38.000000000 +0000
+++ flex-2.5.31-20051223/main.c 2005-12-23 21:10:13.000000000 +0000
@@ -1661,6 +1661,15 @@
                                   ("%option yyclass only meaningful for C++ 
scanners"));
        }
 
+       /*
+        * Ensure that lexers work when the -P option is used.
+        * The yytext_ptr variable in this implementation is useless.
+        */
+       if ( strcmp(prefix, "yy") ) {
+               outn ("#define [[yytext]] yytext");
+               outn ("#define [[yyleng]] yyleng");
+       }
+
        if (useecs)
                numecs = cre8ecs (nextecm, ecgroup, csize);
        else


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.4.27-td2
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to