Module Import alias Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Str If CompareGtE SubscriptLoad AttributeLoad NameLoad attr Index Num Num body Assign NameStore NameLoad Import alias identifier Import alias identifier Import alias ClassDef bases body Expr Str Assign NameStore TupleLoad Assign NameStore TupleLoad FunctionDef arguments args NameParam defaults kwarg body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Num Assign AttributeStore NameLoad attr Dict TryExcept body Assign NameStore BinOpAdd BinOpAdd SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num Index Num Str AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler body Assign NameStore BinOpAdd BinOpAdd Str Str AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr BinOpAdd NameLoad Str Assign AttributeStore NameLoad attr BinOpAdd BinOpAdd NameLoad Str Str Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body While Num body TryExcept body Assign NameStore Call NameLoad Str handlers ExceptHandler type NameLoad body Break If UnaryOpNot NameLoad body Continue Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore TupleLoad Str Str Str Str Str Str Str Str Str Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Print BinOpMod Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num Return NameLoad decorator_list Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults body Expr Str AugAssignAdd AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Print BinOpMod Str SubscriptLoad AttributeLoad NameLoad attr Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list Assign NameStore TupleLoad TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad Str Str TupleLoad Str Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign SubscriptStore AttributeLoad NameLoad attr Index SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Print SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq SubscriptLoad NameLoad Index Num Str body Assign SubscriptStore NameLoad Index Num BinOpAdd SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num orelse If CompareEq SubscriptLoad NameLoad Index Num Str body Assign SubscriptStore NameLoad Index Num BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num orelse If CompareEq SubscriptLoad NameLoad Index Num Str body Assign SubscriptStore NameLoad Index Num BinOpMult SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num orelse If CompareEq SubscriptLoad NameLoad Index Num Str body Assign SubscriptStore NameLoad Index Num BinOpDiv SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num orelse If CompareEq SubscriptLoad NameLoad Index Num Str body Assign SubscriptStore NameLoad Index Num BinOpPow SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign SubscriptStore NameLoad Index Num UnaryOpUSub SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign SubscriptStore NameLoad Index Num SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign SubscriptStore NameLoad Index Num SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body Assign SubscriptStore NameLoad Index Num SubscriptLoad AttributeLoad NameLoad attr Index SubscriptLoad NameLoad Index Num handlers ExceptHandler type NameLoad body Print BinOpMod Str SubscriptLoad NameLoad Index Num Assign SubscriptStore NameLoad Index Num Num decorator_list FunctionDef arguments args NameParam NameParam defaults body If NameLoad body Print BinOpMod Str AttributeLoad NameLoad attr orelse Print Str decorator_list decorator_list If CompareEq NameLoad Str body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr
N/A N/A sys N/A N/A N/A N/A sys path insert 0 ../.. N/A N/A N/A N/A sys version_info N/A 0 3 N/A N/A raw_input input N/A ply.lex lex N/A ply.yacc yacc N/A os Parser N/A N/A N/A 
    Base class for a lexer/parser that has the rules defined as methods
     N/A tokens N/A N/A precedence N/A __init__ N/A N/A self N/A kw N/A N/A N/A self debug N/A N/A kw get debug 0 N/A N/A self names N/A N/A N/A N/A modname N/A N/A N/A N/A N/A N/A os path split N/A N/A N/A N/A os path splitext __file__ N/A 0 N/A 1 _ N/A N/A self __class__ __name__ N/A N/A N/A N/A modname N/A N/A parser _ N/A N/A self __class__ __name__ N/A N/A self debugfile N/A modname .dbg N/A N/A self tabmodule N/A N/A modname _ parsetab N/A N/A N/A lex lex module self debug N/A self debug N/A N/A N/A yacc yacc module self debug N/A self debug debugfile N/A self debugfile tabmodule N/A self tabmodule N/A run N/A N/A self N/A N/A N/A 1 N/A N/A N/A N/A s N/A raw_input calc >  N/A N/A N/A EOFError N/A N/A N/A N/A s N/A N/A N/A N/A N/A yacc parse s N/A N/A Calc N/A Parser N/A N/A tokens N/A NAME NUMBER PLUS MINUS EXP TIMES DIVIDE EQUALS LPAREN RPAREN N/A t_PLUS \+ N/A t_MINUS - N/A t_EXP \*\* N/A t_TIMES \* N/A t_DIVIDE / N/A t_EQUALS = N/A t_LPAREN \( N/A t_RPAREN \) N/A t_NAME [a-zA-Z_][a-zA-Z0-9_]* t_NUMBER N/A N/A self t N/A N/A N/A \d+ N/A N/A N/A N/A t value N/A int N/A t value N/A N/A N/A ValueError N/A N/A N/A Integer value too large %s N/A t value N/A N/A t value 0 N/A t N/A N/A t_ignore t_newline N/A N/A self t N/A N/A N/A \n+ N/A N/A N/A t lexer lineno N/A N/A N/A t value count N/A t_error N/A N/A self t N/A N/A N/A N/A Illegal character '%s' N/A N/A t value N/A 0 N/A N/A N/A N/A t lexer skip 1 N/A N/A precedence N/A N/A left PLUS MINUS N/A left TIMES DIVIDE N/A left EXP N/A right UMINUS p_statement_assign N/A N/A self p N/A N/A N/A statement : NAME EQUALS expression N/A N/A N/A self names N/A N/A p N/A 1 N/A p N/A 3 N/A p_statement_expr N/A N/A self p N/A N/A N/A statement : expression N/A N/A p N/A 1 N/A p_expression_binop N/A N/A self p N/A N/A N/A 
        expression : expression PLUS expression
                  | expression MINUS expression
                  | expression TIMES expression
                  | expression DIVIDE expression
                  | expression EXP expression
         N/A N/A N/A p N/A 2 + N/A N/A N/A p N/A 0 N/A N/A p N/A 1 N/A p N/A 3 N/A N/A N/A N/A p N/A 2 - N/A N/A N/A p N/A 0 N/A N/A p N/A 1 N/A p N/A 3 N/A N/A N/A N/A p N/A 2 * N/A N/A N/A p N/A 0 N/A N/A p N/A 1 N/A p N/A 3 N/A N/A N/A N/A p N/A 2 / N/A N/A N/A p N/A 0 N/A N/A p N/A 1 N/A p N/A 3 N/A N/A N/A N/A p N/A 2 ** N/A N/A N/A p N/A 0 N/A N/A p N/A 1 N/A p N/A 3 N/A p_expression_uminus N/A N/A self p N/A N/A N/A expression : MINUS expression %prec UMINUS N/A N/A p N/A 0 N/A N/A p N/A 2 N/A p_expression_group N/A N/A self p N/A N/A N/A expression : LPAREN expression RPAREN N/A N/A p N/A 0 N/A p N/A 2 N/A p_expression_number N/A N/A self p N/A N/A N/A expression : NUMBER N/A N/A p N/A 0 N/A p N/A 1 N/A p_expression_name N/A N/A self p N/A N/A N/A expression : NAME N/A N/A N/A N/A p N/A 0 N/A N/A self names N/A N/A p N/A 1 N/A N/A N/A LookupError N/A N/A N/A Undefined name '%s' N/A p N/A 1 N/A N/A p N/A 0 0 N/A p_error N/A N/A self p N/A N/A N/A p N/A N/A N/A Syntax error at '%s' N/A p value N/A N/A Syntax error at EOF N/A N/A N/A N/A __name__ __main__ N/A N/A calc N/A Calc N/A N/A N/A calc run