code: final int getFunctionToken(String key)
    {
  
      int tok;
      
      Object id;
  
      try
      {
        // These are nodetests, xpathparser treats them as functions when parsing
        // a FilterExpr. 
        id = Keywords.lookupNodeTest(key);
        if (null == id) id = m_functionTable.getFunctionID(key);
        tok = ((Integer) id).intValue();
      }
      catch (NullPointerException npe)
      {
        tok = -1;
      }
      catch (ClassCastException cce)
      {
        tok = -1;
      }
  
      return tok;
    }
docs: Given a string, return the corresponding function token.
  
  @param key A local name of a function.
  
  @return   The function ID, which may correspond to one of the FUNC_XXX
  values found in {@link org.apache.xpath.compiler.FunctionTable}, but may
  be a value installed by an external module.