public interface IParserFactory
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_OPERATOR_CHARACTERS
The default set of characters, which could form an operator
|
Modifier and Type | Method and Description |
---|---|
FunctionNode |
createAST(ASTNode headExpr)
Creates a new function with no arguments from the given header expression .
|
ASTNode |
createDouble(java.lang.String doubleString)
Create an double node from the given double value string
|
FractionNode |
createFraction(IntegerNode numerator,
IntegerNode denominator)
Create a "fractional" number
|
FunctionNode |
createFunction(SymbolNode head)
Creates a new function with head
head and 0 arguments. |
FunctionNode |
createFunction(SymbolNode head,
ASTNode arg0)
Creates a new function with head
head and 1 argument. |
FunctionNode |
createFunction(SymbolNode head,
ASTNode arg0,
ASTNode arg1)
Creates a new function with head
head and 2 arguments. |
IntegerNode |
createInteger(int integerValue)
Create an integer node from the given value
|
IntegerNode |
createInteger(java.lang.String integerString,
int numberFormat)
Create an integer node from the given string
|
PatternNode |
createPattern(SymbolNode patternName,
ASTNode check)
Create a pattern from the given symbol node (i.e.
|
PatternNode |
createPattern(SymbolNode patternName,
ASTNode check,
boolean optional)
Create a pattern from the given symbol node
|
PatternNode |
createPattern2(SymbolNode patternName,
ASTNode check)
Create a pattern from the given symbol node (i.e.
|
PatternNode |
createPattern3(SymbolNode patternName,
ASTNode check)
Create a pattern from the given symbol node (i.e.
|
StringNode |
createString(java.lang.StringBuffer buffer)
Create a string node from the scanned double quoted string
|
SymbolNode |
createSymbol(java.lang.String symbolName)
Create a symbol from the scanned identifier string
|
Operator |
get(java.lang.String identifier)
Get the operator for a given identifier string like Times, Plus, Sin,...
|
java.util.Map<java.lang.String,Operator> |
getIdentifier2OperatorMap()
Get the identifier to operator map
|
java.util.Map<java.lang.String,java.util.ArrayList<Operator>> |
getOperator2ListMap()
Get the operator-string to possible operator-list map
|
java.lang.String |
getOperatorCharacters()
The set of characters, which could form an operator
|
java.util.List<Operator> |
getOperatorList(java.lang.String operatorString)
Get the operator-list for a given operator-string
|
boolean |
isValidIdentifier(java.lang.String identifier)
Check if the identifier name is valid.
|
static final java.lang.String DEFAULT_OPERATOR_CHARACTERS
java.lang.String getOperatorCharacters()
java.util.Map<java.lang.String,Operator> getIdentifier2OperatorMap()
java.util.Map<java.lang.String,java.util.ArrayList<Operator>> getOperator2ListMap()
Operator get(java.lang.String identifier)
identifier
- java.util.List<Operator> getOperatorList(java.lang.String operatorString)
FunctionNode createFunction(SymbolNode head)
head
and 0 arguments.FunctionNode createFunction(SymbolNode head, ASTNode arg0)
head
and 1 argument.FunctionNode createFunction(SymbolNode head, ASTNode arg0, ASTNode arg1)
head
and 2 arguments.FunctionNode createAST(ASTNode headExpr)
ASTNode createDouble(java.lang.String doubleString)
doubleString
- IntegerNode createInteger(java.lang.String integerString, int numberFormat)
integerString
- the integer number represented as a StringnumberFormat
- the format of the number (usually 10)IntegerNode createInteger(int integerValue)
integerValue
- the integer number's valueFractionNode createFraction(IntegerNode numerator, IntegerNode denominator)
numerator
- numerator of the fractional numberdenominator
- denominator of the fractional numberPatternNode createPattern(SymbolNode patternName, ASTNode check)
_
or
x_
)patternName
- PatternNode createPattern2(SymbolNode patternName, ASTNode check)
__
or
x__
)patternName
- PatternNode createPattern3(SymbolNode patternName, ASTNode check)
___
or
x___
)patternName
- PatternNode createPattern(SymbolNode patternName, ASTNode check, boolean optional)
patternName
- StringNode createString(java.lang.StringBuffer buffer)
symbolName
- SymbolNode createSymbol(java.lang.String symbolName)
symbolName
- boolean isValidIdentifier(java.lang.String identifier)
identifier
- the currently parsed identifierfalse
if the identifier is not valid (in this case the
parser creates a SyntaxError exception); otherwise return
true