lex right context bug ({name}*/&)
P. Tucker Withington
ptw at encore.UUCP
Tue Jan 8 09:08:27 AEST 1985
Index: lex 4.1 8/11/83 (BSD); 1.4 ? (Sys. V)
The following fragment appears to raise a bug in lex. When the *-ed expression
matches 0 characters (e.g., & is the first input), yytext comes back as "&"
rather than "". I am able to work around with a judicious REJECT, but I don't
think I should have to. Any opinions or ideas? Am I missing something?
name [0-9A-Za-z.\-]
%%
{name}*/& {
if(yytext[0] == '&')
printf("Bug!\n");
}
o.o --tucker
~
More information about the Net.bugs
mailing list