diff --git a/yacc/reader.c b/yacc/reader.c index 2b77c53c3..ea21088ec 100644 --- a/yacc/reader.c +++ b/yacc/reader.c @@ -857,6 +857,8 @@ void declare_tokens(int assoc) bp->prec = prec; } + if (strcmp(bp->name, "EOF") == 0) + bp->value = 0; c = nextc(); if (c == EOF) unexpected_EOF();