Document hacky customize arg count better.

This commit is contained in:
rocky
2017-09-30 18:02:35 -04:00
parent e7778f83f2
commit 1d7a3c6444
3 changed files with 26 additions and 10 deletions

View File

@@ -93,12 +93,18 @@ class Scanner2(Scanner):
for instr in bytecode.get_instructions(co):
print(instr._disassemble())
# Container for tokens
# list of tokens/instructions
tokens = []
# "customize" is a dict whose keys are nonterminals
# and the value is the argument stack entries for that
# nonterminal. The count is a little hoaky. It is mostly
# not used, but sometimes it is.
# "customize" is a dict whose keys are nonterminals
customize = {}
if self.is_pypy:
customize['PyPy'] = 1
customize['PyPy'] = 0
Token = self.Token # shortcut