def traceParseAction(f):
f = _trim_arity(f)<EOL>def z(*paArgs):<EOL><INDENT>thisFunc = f.func_name<EOL>s,l,t = paArgs[-<NUM_LIT:3>:]<EOL>if len(paArgs)><NUM_LIT:3>:<EOL><INDENT>thisFunc = paArgs[<NUM_LIT:0>].__class__.__name__ + '<STR_LIT:.>' + thisFunc<EOL><DEDENT>sys.stderr.write( "<STR_LIT>" % (thisFunc,line(l,s),l,t) )<EOL>try:<EOL><INDENT>ret = f(*paArgs)<EOL><DEDENT>except Exception as exc:<EOL><INDENT>sys.stderr.write( "<STR_LIT>" % (thisFunc,exc) )<EOL>raise<EOL><DEDENT>sys.stderr.write( "<STR_LIT>" % (thisFunc,ret) )<EOL>return ret<EOL><DEDENT>try:<EOL><INDENT>z.__name__ = f.__name__<EOL><DEDENT>except AttributeError:<EOL><INDENT>pass<EOL><DEDENT>return z<EOL>
Decorator for debugging parse actions.