public interface IParserFactory
Modifier and Type | Field and Description |
---|---|
static 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(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(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
|
StringNode |
createString(StringBuffer buffer)
Create a string node from the scanned double quoted string
|
SymbolNode |
createSymbol(String symbolName)
Create a symbol from the scanned identifier string
|
Operator |
get(String identifier)
Get the operator for a given identifier string like Times, Plus, Sin,...
|
Map<String,Operator> |
getIdentifier2OperatorMap()
Get the identifier to operator map
|
Map<String,ArrayList<Operator>> |
getOperator2ListMap()
Get the operator-string to possible operator-list map
|
String |
getOperatorCharacters()
The set of characters, which could form an operator
|
List<Operator> |
getOperatorList(String operatorString)
Get the operator-list for a given operator-string
|
boolean |
isValidIdentifier(String identifier)
Check if the identifier name is valid.
|
static final String DEFAULT_OPERATOR_CHARACTERS
String getOperatorCharacters()
Map<String,Operator> getIdentifier2OperatorMap()
Map<String,ArrayList<Operator>> getOperator2ListMap()
Operator get(String identifier)
identifier
- List<Operator> getOperatorList(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(String doubleString)
doubleString
- IntegerNode createInteger(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)
patternName
- StringNode createString(StringBuffer buffer)
symbolName
- SymbolNode createSymbol(String symbolName)
symbolName
- boolean isValidIdentifier(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
Copyright © 2016. All rights reserved.