Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!LBL-RTSG.ARPA!vern%lbl-pistachio From: vern%lbl-pistachio@LBL-RTSG.ARPA (Vern Paxson) Newsgroups: comp.sources.bugs Subject: flex -f/-F bug Message-ID: <8805052144.AA01915@lbl-pistachio> Date: 5 May 88 21:43:54 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 34 flex scanners compiled using -f or -F can generate bogus "NULL in input" messages (and then die). The fix follows. Vern rcscat -r1.3 parse.y | diff -c parse.y - RCS/parse.y,v --> stdout revision 1.3 *** parse.y Thu May 5 13:36:18 1988 --- /tmp/da1569 Thu May 5 14:43:06 1988 *************** *** 27,48 **** %% goal : initlex sect1 sect1end sect2 - { /* add default rule */ - int def_rule; - - pat = cclinit(); - cclnegate( pat ); - - def_rule = mkstate( -pat ); - - add_accept( def_rule, 0, 0 ); - - for ( i = 1; i <= lastsc; ++i ) - scset[i] = mkbranch( scset[i], def_rule ); - - fputs( "YY_DEFAULT_ACTION;\n\tYY_BREAK\n", - temp_action_file ); - } ; initlex : --- 27,32 ----