Fix Bison 3.6 error messages

This commit is contained in:
Wilson Snyder 2020-07-10 21:26:27 -04:00
parent dced49a804
commit a500140f1d

View File

@ -31,7 +31,7 @@
#include <cstdarg>
#include <stack>
#define YYERROR_VERBOSE 1
#define YYERROR_VERBOSE 1 // For prior to Bison 3.6
#define YYINITDEPTH 10000 // Older bisons ignore YYMAXDEPTH
#define YYMAXDEPTH 10000
@ -322,6 +322,9 @@ class AstSenTree;
// clang-format off
%}
// Bison 3.0 and newer
BISONPRE_VERSION(3.0,%define parse.error verbose)
// When writing Bison patterns we use yTOKEN instead of "token",
// so Bison will error out on unknown "token"s.