Declare and use Py_TabcheckFlag here.
diff --git a/Parser/parsetok.c b/Parser/parsetok.c
index 93df0d6..6453b6a 100644
--- a/Parser/parsetok.c
+++ b/Parser/parsetok.c
@@ -39,6 +39,8 @@
 #include "parsetok.h"
 #include "errcode.h"
 
+int Py_TabcheckFlag;
+
 
 /* Forward */
 static node *parsetok Py_PROTO((struct tok_state *, grammar *, int,
@@ -93,6 +95,12 @@
 		err_ret->error = E_NOMEM;
 		return NULL;
 	}
+	if (Py_TabcheckFlag || Py_VerboseFlag) {
+		tok->filename = filename;
+		tok->altwarning = (filename != NULL);
+		if (Py_TabcheckFlag >= 2)
+			tok->alterror++;
+	}
 
 #ifdef macintosh
 	{