]> granicus.if.org Git - python/commitdiff
Updates to track Grammar changes. The patch to token.py loosens the regexp to
authorMichael W. Hudson <mwh@python.net>
Thu, 3 Oct 2002 09:42:01 +0000 (09:42 +0000)
committerMichael W. Hudson <mwh@python.net>
Thu, 3 Oct 2002 09:42:01 +0000 (09:42 +0000)
allow "testlist1" to be snagged.

Lib/symbol.py
Lib/token.py

index 39159b3eb67f57e85336e88282a4debc98496377..38c61931794202c87b4750548674fe283278a167 100755 (executable)
@@ -76,6 +76,8 @@ argument = 318
 list_iter = 319
 list_for = 320
 list_if = 321
+testlist1 = 322
+encoding_decl = 323
 #--end constants--
 
 sym_name = {}
index c77d3430bedca3e21bb4a9693818bc7335a3f85f..f75412c7a6302f631b2068d615a4655fc0ac1deb 100755 (executable)
@@ -98,7 +98,7 @@ def main():
     lines = fp.read().split("\n")
     fp.close()
     prog = re.compile(
-        "#define[ \t][ \t]*([A-Z][A-Z_]*)[ \t][ \t]*([0-9][0-9]*)",
+        "#define[ \t][ \t]*([A-Z0-9][A-Z0-9_]*)[ \t][ \t]*([0-9][0-9]*)",
         re.IGNORECASE)
     tokens = {}
     for line in lines: