From: ceriel Date: Wed, 14 Sep 1988 14:03:50 +0000 (+0000) Subject: correction for update_ceg X-Git-Tag: release-5-5~2845 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=b725b0af8bc859b61efd3963cfab6143041d259a;p=ack.git correction for update_ceg --- diff --git a/util/ceg/EM_parser/common/pars.g b/util/ceg/EM_parser/common/pars.g index f76f4755e..6aadb7a93 100644 --- a/util/ceg/EM_parser/common/pars.g +++ b/util/ceg/EM_parser/common/pars.g @@ -162,9 +162,9 @@ def_row : [ special | simple] { out( "}\n\n");} 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);} - [ special | simple] { out( "}\n\n"); } + [ special | simple] { out( "}\n\n"); to_change = 0; } | C_INSTR [ c_special | c_simple] @@ -319,8 +319,11 @@ char **argv; library = TRUE; to_change = argv[2]; c_table(); - fprint( STDERR, "No rule for %s\n", to_change); - exit( 1); + if (to_change) { + fprint( STDERR, "No rule for %s\n", to_change); + exit( 1); + } + exit(nerrors); } } else {