Interface ParserFunction

  • All Superinterfaces:
    Serializable
    All Known Implementing Classes:
    AbstractParserFunction, Env

    public interface ParserFunction
    extends Serializable
    Interface for functions to be used in parsers. Functions must be stateless, as only a single instance is kept in memory.
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Method Detail

      • getFunctionName

        String getFunctionName()
        Returns the name of the function. Can only consist of letters, underscores, numbers.
        Returns:
        the name
      • getFunctionSignature

        String getFunctionSignature()
        Returns the signature of the function.
        Returns:
        the signature
      • getFunctionHelp

        String getFunctionHelp()
        Returns the help string for the function.
        Returns:
        the help string
      • callFunction

        Object callFunction​(Object[] params)
        Gets called from the parser.
        Parameters:
        params - the parameters obtained through the parser
        Returns:
        the result to be used further in the parser