parameters: (self, type, value, context)
return_statement: return ilabel
docstring: Turn a token into a label.  (Internal)
docstring_summary: Turn a token into a label.  (Internal)
docstring_tokens: Turn a token into a label . ( Internal )
function: def classify(self, type, value, context):
          """Turn a token into a label.  (Internal)"""
          if type == token.NAME:
              # Keep a listing of all used names
              self.used_names.add(value)
              # Check for reserved words
              ilabel = self.grammar.keywords.get(value)
              if ilabel is not None:
                  return ilabel
          ilabel = self.grammar.tokens.get(type)
          if ilabel is None:
              raise ParseError("bad token", type, value, context)
          return ilabel
function_tokens: def classify ( self , type , value , context ) : if type == token . NAME : # Keep a listing of all used names self . used_names . add ( value ) # Check for reserved words ilabel = self . grammar . keywords . get ( value ) if ilabel is not None : return ilabel ilabel = self . grammar . tokens . get ( type ) if ilabel is None : raise ParseError ( "bad token" , type , value , context ) return ilabel