Small typos

This commit is contained in:
rocky
2018-09-20 17:40:23 -04:00
parent 616e5c82f6
commit ec42ee540c
2 changed files with 3 additions and 1 deletions

View File

@@ -45,7 +45,7 @@ class PythonParser(GenericASTBuilder):
super(PythonParser, self).__init__(SyntaxTree, start, debug)
# FIXME: customize per python parser version
# These are the non-terminal we should collect into a list.
# These are the non-terminals we should collect into a list.
# For example instead of:
# stmts -> stmts stmt -> stmts stmt stmt ...
# collect as stmts -> stmt stmt ...

View File

@@ -709,6 +709,8 @@ class Python3Parser(PythonParser):
rule = ('load_closure ::= %s%s' % (('LOAD_CLOSURE ' * v), opname))
self.add_unique_rule(rule, opname, token.attr, customize)
if not is_LOAD_CLOSURE or v == 0:
# We do this complicated test to speed up parsing of
# pathelogically long literals, especially those over 1024.
build_count = token.attr
thousands = (build_count//1024)
thirty32s = ((build_count//32) % 32)