@@ -360,10 +360,9 @@ def p_expr3(self, args):
360360 # Python 3.4+
361361 expr ::= LOAD_CLASSDEREF
362362
363+ binary_subscr2 ::= expr expr DUP_TOP_TWO BINARY_SUBSCR
363364 # Python3 drops slice0..slice3
364365
365- # In Python 2, DUP_TOP_TWO is DUP_TOPX_2
366- binary_subscr2 ::= expr expr DUP_TOP_TWO BINARY_SUBSCR
367366 '''
368367
369368 @staticmethod
@@ -672,34 +671,33 @@ def add_custom_rules(self, tokens, customize):
672671 return
673672
674673
675- class Python31Parser (Python3Parser ):
676-
677- def p_31 (self , args ):
674+ class Python33Parser (Python3Parser ):
675+ def p_33 (self , args ):
678676 """
679677 # Store locals is only in Python 3.0 to 3.3
680678 stmt ::= store_locals
681679 store_locals ::= LOAD_FAST STORE_LOCALS
680+
681+ # Python 3.3 adds yield from.
682+ expr ::= yield_from
683+ yield_from ::= expr expr YIELD_FROM
682684 """
683685
684686class Python32Parser (Python3Parser ):
685-
686- def p_32 (self , args ):
687+ def p_32on (self , args ):
687688 """
688- # Store locals is only in Python 3.0 to 3.3
689+ # In Python 3.2+, DUP_TOPX is DUP_TOP_TWO
690+ binary_subscr2 ::= expr expr DUP_TOP_TWO BINARY_SUBSCR
689691 stmt ::= store_locals
690692 store_locals ::= LOAD_FAST STORE_LOCALS
691693 """
694+ pass
692695
693- class Python33Parser (Python3Parser ):
694- def p_33 (self , args ):
695- """
696- # Store locals is only in Python 3.0 to 3.3
697- stmt ::= store_locals
698- store_locals ::= LOAD_FAST STORE_LOCALS
696+ class Python31Parser (Python32Parser ):
699697
700- # Python 3.3 adds yield from.
701- expr ::= yield_from
702- yield_from ::= expr expr YIELD_FROM
698+ def p_31 ( self , args ):
699+ """
700+ binary_subscr2 ::= expr expr DUP_TOPX BINARY_SUBSCR
703701 """
704702
705703class Python3ParserSingle (Python3Parser , PythonParserSingle ):
0 commit comments