Documentation of 'org.matheclipse.parser.client.ast.IParserFactory' Java class
IParserFactory
org.matheclipse.parser.client.ast

Interface IParserFactory

  • All Known Implementing Classes:
    ASTNodeFactory


    public interface IParserFactory
    Factory for creating the ASTNodes from the parser
    • Field Detail

      • DEFAULT_OPERATOR_CHARACTERS

        static final java.lang.String DEFAULT_OPERATOR_CHARACTERS
        The default set of characters, which could form an operator
        See Also:
        Constant Field Values
    • Method Detail

      • getOperatorCharacters

        java.lang.String getOperatorCharacters()
        The set of characters, which could form an operator
      • getIdentifier2OperatorMap

        java.util.Map<java.lang.String,Operator> getIdentifier2OperatorMap()
        Get the identifier to operator map
        Returns:
        the map which stores the Operators for a given head string like Times, Plus, Sin,...
      • getOperator2ListMap

        java.util.Map<java.lang.String,java.util.ArrayList<Operator>> getOperator2ListMap()
        Get the operator-string to possible operator-list map
        Returns:
        the map which stores the operator-list for a given operator string like *, +, ==...
      • get

        Operator get(java.lang.String identifier)
        Get the operator for a given identifier string like Times, Plus, Sin,...
        Parameters:
        identifier -
        Returns:
      • getOperatorList

        java.util.List<Operator> getOperatorList(java.lang.String operatorString)
        Get the operator-list for a given operator-string
        Returns:
        the operator-list for a given operator string like *, +, ==...
      • createFunction

        FunctionNode createFunction(SymbolNode head)
        Creates a new function with head head and 0 arguments.
      • createAST

        FunctionNode createAST(ASTNode headExpr)
        Creates a new function with no arguments from the given header expression .
      • createDouble

        ASTNode createDouble(java.lang.String doubleString)
        Create an double node from the given double value string
        Parameters:
        doubleString -
        Returns:
      • createInteger

        IntegerNode createInteger(java.lang.String integerString,
                                  int numberFormat)
        Create an integer node from the given string
        Parameters:
        integerString - the integer number represented as a String
        numberFormat - the format of the number (usually 10)
        Returns:
        IInteger
      • createInteger

        IntegerNode createInteger(int integerValue)
        Create an integer node from the given value
        Parameters:
        integerValue - the integer number's value
        Returns:
        IInteger
      • createFraction

        FractionNode createFraction(IntegerNode numerator,
                                    IntegerNode denominator)
        Create a "fractional" number
        Parameters:
        numerator - numerator of the fractional number
        denominator - denominator of the fractional number
        Returns:
        IFraction
      • createPattern

        PatternNode createPattern(SymbolNode patternName,
                                  ASTNode check)
        Create a pattern from the given symbol node (i.e. _ or x_)
        Parameters:
        patternName -
        Returns:
        Object
      • createPattern2

        PatternNode createPattern2(SymbolNode patternName,
                                   ASTNode check)
        Create a pattern from the given symbol node (i.e. __ or x__)
        Parameters:
        patternName -
        Returns:
        Object
      • createPattern3

        PatternNode createPattern3(SymbolNode patternName,
                                   ASTNode check)
        Create a pattern from the given symbol node (i.e. ___ or x___)
        Parameters:
        patternName -
        Returns:
        Object
      • createPattern

        PatternNode createPattern(SymbolNode patternName,
                                  ASTNode check,
                                  boolean optional)
        Create a pattern from the given symbol node
        Parameters:
        patternName -
        Returns:
        Object
      • createString

        StringNode createString(java.lang.StringBuffer buffer)
        Create a string node from the scanned double quoted string
        Parameters:
        symbolName -
        Returns:
      • createSymbol

        SymbolNode createSymbol(java.lang.String symbolName)
        Create a symbol from the scanned identifier string
        Parameters:
        symbolName -
        Returns:
      • isValidIdentifier

        boolean isValidIdentifier(java.lang.String identifier)
        Check if the identifier name is valid.
        Parameters:
        identifier - the currently parsed identifier
        Returns:
        false if the identifier is not valid (in this case the parser creates a SyntaxError exception); otherwise return true

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.