diff --git a/src/verilog.y b/src/verilog.y
index 492da7f2..504fc70a 100644
--- a/src/verilog.y
+++ b/src/verilog.y
@@ -208,6 +208,9 @@ static void ERRSVKWD(FileLine* fileline, const string& tokname) {
 class AstSenTree;
 %}
 
+BISONPRE_VERSION(3.0,%define parse.error verbose)
+BISONPRE_VERSION(3.7,%define api.header.include {"V3ParseBison.h"})
+
 // When writing Bison patterns we use yTOKEN instead of "token",
 // so Bison will error out on unknown "token"s.
 
