Article View: net.bugs
Article #350lex right context bug ({name}*/&)
From: P. Tucker Withington
Date: Mon, 07 Jan 1985 23:08
Date: Mon, 07 Jan 1985 23:08
20 lines
1130 bytes
1130 bytes
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
~
Technical Details
Message-ID:
<133@encore.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!teddy!panda!talcott!encore!ptwShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 beta 3/9/83; site encore.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!teddy!panda!talcott!encore!ptw
From: ptw@encore.UUCP (P. Tucker Withington)
Newsgroups: net.bugs
Subject: lex right context bug ({name}*/&)
Message-ID: <133@encore.UUCP>
Date: Mon, 7-Jan-85 18:08:27 EST
Article-I.D.: encore.133
Posted: Mon Jan 7 18:08:27 1985
Date-Received: Wed, 9-Jan-85 04:51:40 EST
Organization: Encore Computer Corp., Wellesley Hills, MA
Lines: 20