Albert Chin <[EMAIL PROTECTED]> writes:
> zotnet/tws/lexedit.sed does not work correctly with HP-UX 11.00 lex.
> Attached below is a copy of the C code generated by lex against
> zotnet/tws/dtimep.lex.
>
> The part that matters is:
> #ifdef YYREENTRANT
> __thread int yylineno;
> #else
> int yylineno = 1;
> #endif /* reentrant */
>
> According to zotnet/tws/lexedit.sed, everything from 'int yylineno '
> onward will be deleted, leaving a hanging #ifdef. A quick solution is
> to apply the following patch:
> --- lexedit.sed.orig Mon Apr 24 16:25:01 2000
> +++ lexedit.sed Mon Apr 24 16:25:15 2000
> @@ -8,6 +8,7 @@
> default: return(0);\
> } }
> /^struct yysvf *yybgin = yysvec+1;$/d
> +/^#ifdef YYREENTRANT/,$d
> /^int yylineno /,$d
> /^# define YYTYPE short/c\
> # define YYTYPE int
>
> This seems prone to future hiccups though.
Also, I'm not sure how it'll affect the lex output on other OSes.
> Is it possible to get rid of the sed hackery altogether?
One certainly hopes so! So far no one's been brave enough to really delve
into that.
-----------------------------------------------------------------------
Dan Harkless | To prevent SPAM contamination, please
[EMAIL PROTECTED] | do not post this private email address
SpeedGate Communications, Inc. | to the USENET or WWW. Thank you.