Updates to track Grammar changes. The patch to token.py loosens the regexp to

allow "testlist1" to be snagged.
This commit is contained in:
Michael W. Hudson 2002-10-03 09:42:01 +00:00
parent d389036069
commit adf1606161
2 changed files with 3 additions and 1 deletions

View File

@ -76,6 +76,8 @@ argument = 318
list_iter = 319 list_iter = 319
list_for = 320 list_for = 320
list_if = 321 list_if = 321
testlist1 = 322
encoding_decl = 323
#--end constants-- #--end constants--
sym_name = {} sym_name = {}

View File

@ -98,7 +98,7 @@ def main():
lines = fp.read().split("\n") lines = fp.read().split("\n")
fp.close() fp.close()
prog = re.compile( 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) re.IGNORECASE)
tokens = {} tokens = {}
for line in lines: for line in lines: