correction for update_ceg

This commit is contained in:
ceriel 1988-09-14 14:03:50 +00:00
parent 5fd21b16a9
commit b725b0af8b

View file

@ -162,9 +162,9 @@ def_row : [ special | simple] { out( "}\n\n");}
c_table : c_row* c_table : c_row*
; ;
c_row : %if ( strcmp( yytext, to_change) == 0) c_row : %if ( to_change && strcmp( yytext, to_change) == 0)
C_INSTR { set_outfile( yytext); header( yytext);} C_INSTR { set_outfile( yytext); header( yytext);}
[ special | simple] { out( "}\n\n"); } [ special | simple] { out( "}\n\n"); to_change = 0; }
| C_INSTR | C_INSTR
[ c_special | c_simple] [ c_special | c_simple]
@ -319,9 +319,12 @@ char **argv;
library = TRUE; library = TRUE;
to_change = argv[2]; to_change = argv[2];
c_table(); c_table();
if (to_change) {
fprint( STDERR, "No rule for %s\n", to_change); fprint( STDERR, "No rule for %s\n", to_change);
exit( 1); exit( 1);
} }
exit(nerrors);
}
} }
else { else {
library = FALSE; library = FALSE;