[comp.sources.bugs] flex -f/-F bug

vern%lbl-pistachio@LBL-RTSG.ARPA (Vern Paxson) (05/06/88)

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 ----