diff options
-rw-r--r-- | tools/lemon/lemon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lemon/lemon.c b/tools/lemon/lemon.c index c7d4d1da2e..de0ae2362b 100644 --- a/tools/lemon/lemon.c +++ b/tools/lemon/lemon.c @@ -1669,7 +1669,7 @@ int main(int argc _U_, char **argv) /* Parse the input file */ Parse(&lem); if( lem.errorcnt ) exit(lem.errorcnt); - if( lem.nrule==0 ){ + if( lem.nrule==0 || lem.rule == NULL ){ fprintf(stderr,"Empty grammar.\n"); exit(1); } |