Less ambigouus 2.x grammar rule for BUILD_MAP

This commit is contained in:
rocky
2018-03-25 12:09:42 -04:00
parent 2ae9cd7d08
commit 7fb94176b1
3 changed files with 15 additions and 12 deletions

View File

@@ -646,6 +646,8 @@ class Python3Parser(PythonParser):
elif self.version >= 3.5:
if opname != 'BUILD_MAP_WITH_CALL':
if opname == 'BUILD_MAP_UNPACK':
# FIXME: start here
# rule = "%s ::= %s %s" % (kvlist_n, 'expr ' * (token.attr*2), opname)
rule = kvlist_n + ' ::= ' + 'expr ' * (token.attr*2)
self.add_unique_rule(rule, opname, token.attr, customize)
rule = 'dict_entry ::= ' + 'expr ' * (token.attr*2)