parameters: (f)
return_statement: return z
docstring: Decorator for debugging parse actions. 
      
      When the parse action is called, this decorator will print C{">> entering I{method-name}(line:I{current_source_line}, I{parse_location}, I{matched_tokens})".}
      When the parse action completes, the decorator will print C{"<<"} followed by the returned value, or any exception that the parse action raised.
  
      Example::
          wd = Word(alphas)
  
          @traceParseAction
          def remove_duplicate_chars(tokens):
              return ''.join(sorted(set(''.join(tokens))))
  
          wds = OneOrMore(wd).setParseAction(remove_duplicate_chars)
          print(wds.parseString("slkdjs sld sldd sdlf sdljf"))
      prints::
          >>entering remove_duplicate_chars(line: 'slkdjs sld sldd sdlf sdljf', 0, (['slkdjs', 'sld', 'sldd', 'sdlf', 'sdljf'], {}))
          <<leaving remove_duplicate_chars (ret: 'dfjkls')
          ['dfjkls']
docstring_summary: Decorator for debugging parse actions. 
      
      When the parse action is called, this decorator will print C{">> entering I{method-name}(line:I{current_source_line}, I{parse_location}, I{matched_tokens})".}
      When the parse action completes, the decorator will print C{"<<"} followed by the returned value, or any exception that the parse action raised.
docstring_tokens: Decorator for debugging parse actions . When the parse action is called this decorator will print C { >> entering I { method - name } ( line : I { current_source_line } I { parse_location } I { matched_tokens } ) . } When the parse action completes the decorator will print C { << } followed by the returned value or any exception that the parse action raised .
function: def traceParseAction(f):
      """
      Decorator for debugging parse actions. 
      
      When the parse action is called, this decorator will print C{">> entering I{method-name}(line:I{current_source_line}, I{parse_location}, I{matched_tokens})".}
      When the parse action completes, the decorator will print C{"<<"} followed by the returned value, or any exception that the parse action raised.
  
      Example::
          wd = Word(alphas)
  
          @traceParseAction
          def remove_duplicate_chars(tokens):
              return ''.join(sorted(set(''.join(tokens))))
  
          wds = OneOrMore(wd).setParseAction(remove_duplicate_chars)
          print(wds.parseString("slkdjs sld sldd sdlf sdljf"))
      prints::
          >>entering remove_duplicate_chars(line: 'slkdjs sld sldd sdlf sdljf', 0, (['slkdjs', 'sld', 'sldd', 'sdlf', 'sdljf'], {}))
          <<leaving remove_duplicate_chars (ret: 'dfjkls')
          ['dfjkls']
      """
      f = _trim_arity(f)
      def z(*paArgs):
          thisFunc = f.__name__
          s,l,t = paArgs[-3:]
          if len(paArgs)>3:
              thisFunc = paArgs[0].__class__.__name__ + '.' + thisFunc
          sys.stderr.write( ">>entering %s(line: '%s', %d, %r)\n" % (thisFunc,line(l,s),l,t) )
          try:
              ret = f(*paArgs)
          except Exception as exc:
              sys.stderr.write( "<<leaving %s (exception: %s)\n" % (thisFunc,exc) )
              raise
          sys.stderr.write( "<<leaving %s (ret: %r)\n" % (thisFunc,ret) )
          return ret
      try:
          z.__name__ = f.__name__
      except AttributeError:
          pass
      return z
function_tokens: def traceParseAction ( f ) : f = _trim_arity ( f ) def z ( * paArgs ) : thisFunc = f . __name__ s , l , t = paArgs [ - 3 : ] if len ( paArgs ) > 3 : thisFunc = paArgs [ 0 ] . __class__ . __name__ + '.' + thisFunc sys . stderr . write ( ">>entering %s(line: '%s', %d, %r)\n" % ( thisFunc , line ( l , s ) , l , t ) ) try : ret = f ( * paArgs ) except Exception as exc : sys . stderr . write ( "<<leaving %s (exception: %s)\n" % ( thisFunc , exc ) ) raise sys . stderr . write ( "<<leaving %s (ret: %r)\n" % ( thisFunc , ret ) ) return ret try : z . __name__ = f . __name__ except AttributeError : pass return z