Documentation of 'org.matheclipse.parser.client.operator.ASTNodeFactory' Java class
ASTNodeFactory
org.matheclipse.parser.client.operator

Class ASTNodeFactory

    • Constructor Detail

      • ASTNodeFactory

        public ASTNodeFactory(boolean ignoreCase)
        Create a default ASTNode factory
    • Method Detail

      • addOperator

        public static void addOperator(java.util.Map<java.lang.String,Operator> operatorMap,
                                       java.util.Map<java.lang.String,java.util.ArrayList<Operator>> operatorTokenStartSet,
                                       java.lang.String operatorStr,
                                       java.lang.String headStr,
                                       Operator oper)
      • getIdentifier2OperatorMap

        public java.util.Map<java.lang.String,Operator> getIdentifier2OperatorMap()
        public Map getIdentifier2OperatorMap()
        Specified by:
        getIdentifier2OperatorMap in interface IParserFactory
        Returns:
        the map which stores the Operators for a given head string like Times, Plus, Sin,...
      • get

        public Operator get(java.lang.String identifier)
        Description copied from interface: IParserFactory
        Get the operator for a given identifier string like Times, Plus, Sin,...
        Specified by:
        get in interface IParserFactory
        Returns:
      • getOperator2ListMap

        public java.util.Map<java.lang.String,java.util.ArrayList<Operator>> getOperator2ListMap()
        Description copied from interface: IParserFactory
        Get the operator-string to possible operator-list map
        Specified by:
        getOperator2ListMap in interface IParserFactory
        Returns:
        the map which stores the operator-list for a given operator string like *, +, ==...
      • getOperatorList

        public java.util.List<Operator> getOperatorList(java.lang.String key)
        Description copied from interface: IParserFactory
        Get the operator-list for a given operator-string
        Specified by:
        getOperatorList in interface IParserFactory
        Returns:
        the operator-list for a given operator string like *, +, ==...
      • createInfixOperator

        public static InfixOperator createInfixOperator(java.lang.String operatorStr,
                                                        java.lang.String headStr,
                                                        int precedence,
                                                        int grouping)
      • createPrefixOperator

        public static PrefixOperator createPrefixOperator(java.lang.String operatorStr,
                                                          java.lang.String headStr,
                                                          int precedence)
      • createPostfixOperator

        public static PostfixOperator createPostfixOperator(java.lang.String operatorStr,
                                                            java.lang.String headStr,
                                                            int precedence)
      • createDouble

        public ASTNode createDouble(java.lang.String doubleString)
        Description copied from interface: IParserFactory
        Create an double node from the given double value string
        Specified by:
        createDouble in interface IParserFactory
        Returns:
      • createInteger

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

        public IntegerNode createInteger(int intValue)
        Description copied from interface: IParserFactory
        Create an integer node from the given value
        Specified by:
        createInteger in interface IParserFactory
        Parameters:
        intValue - the integer number's value
        Returns:
        IInteger
      • createString

        public StringNode createString(java.lang.StringBuffer buffer)
        Description copied from interface: IParserFactory
        Create a string node from the scanned double quoted string
        Specified by:
        createString in interface IParserFactory
        Returns:
      • isValidIdentifier

        public boolean isValidIdentifier(java.lang.String identifier)
        Description copied from interface: IParserFactory
        Check if the identifier name is valid.
        Specified by:
        isValidIdentifier in interface IParserFactory
        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.