Hi, yacc_EOF instead of 0 is used in `yylex()`.
http://git.savannah.gnu.org/cgit/bash.git/tree/parse.y#n3257 The grammar explicitly relies on yacc_EOF. http://git.savannah.gnu.org/cgit/bash.git/tree/parse.y#n376 But this seems to be different from the normal usage in flex/bison. For example, flex has <<EOF>> (I know bash doesn't use its hand coded yylex()). Bison expects yylex() to just return 0 upon seeing the EOF of the input. """ (From bison manual regarding yylex) The null character must not be used this way, because its code is zero and that signifies end-of-input. """ So is there a reason bash parsing must the non-standard yacc_EOF? Or bash parsing can be solved by using a yylex() that returns 0 upon seeing EOF? Thanks. -- Regards, Peng _______________________________________________ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison