public class EquationParser extends java.lang.Object implements EquationParserConstants
Modifier and Type | Field and Description |
---|---|
static Token |
jj_nt
Next token.
|
static Token |
token
Current token.
|
static EquationParserTokenManager |
token_source
Generated Token Manager.
|
ABS, ACOS, ADD, ADDASSIGNMENT, AFFECTATION, AND, ASIN, ATAN, BREAK, CEIL, CHARACTERS, CLOSEBRACKET, CLOSECURLY, CLOSEPARENTHESIS, COMMA, COMMENT, CONST, COS, DECREMENT, DEFAULT, DIGITS, DIV, DIVASSIGNMENT, DOLLAR_VAR, ECHO, ELSE, EOF, EQ, FIELD, FLOOR, GE, GT, IDENTIFIER, IF, INCREMENT, LE, LT, MOD, MULT, MULTASSIGNMENT, NEQ, NOT, OPENBRACKET, OPENCURLY, OPENPARENTHESIS, OR, RETURN, SEMICOLON, SIGN, SIN, SQRT, SUB, SUBASSIGNMENT, TAN, TEXT, TODEGREES, tokenImage, TORADIANS, TYPE, VALUE, WHILE, XOR
Constructor and Description |
---|
EquationParser(EquationParserTokenManager tm)
Constructor with generated Token Manager.
|
EquationParser(java.io.InputStream stream)
Constructor with InputStream.
|
EquationParser(java.io.InputStream stream,
java.lang.String encoding)
Constructor with InputStream and supplied encoding
|
EquationParser(java.io.Reader stream)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
acceptUndefinedVariables(boolean accept) |
static void |
addAssign() |
static void |
affect() |
static void |
affectInType() |
static void |
arrayAffect() |
static void |
arrayDeclaration() |
static void |
block() |
static void |
breakExpr() |
static void |
choice() |
static void |
closeCurly() |
static void |
closeCurlyArrayDeclaration() |
static void |
closePar() |
static void |
comma() |
static void |
constant() |
static void |
decrement() |
static void |
disable_tracing()
Disable tracing.
|
static void |
divAssign() |
static void |
element() |
static void |
elseblock() |
static void |
elseExpression() |
static void |
elseif() |
static void |
enable_tracing()
Enable tracing.
|
static void |
expr() |
static void |
exprContinuation() |
static void |
exprManyMULTDIVIDE() |
static void |
exprMULTDIVIDE() |
static void |
exprMULTDIVIDEContinuation() |
static void |
exprWithFirst() |
static void |
exprWithoutFirst() |
static void |
FormalParameters() |
static ParseException |
generateParseException()
Generate ParseException.
|
static Token |
getNextToken()
Get the next Token.
|
static Token |
getToken(int index)
Get the specific Token.
|
static void |
ifToken() |
static void |
increment() |
static boolean |
isAcceptingUndefinedVariables() |
static void |
main(java.lang.String[] args) |
static void |
multAssign() |
static void |
openCurly() |
static void |
openPar() |
static void |
parse() |
static Equation |
parse(java.io.File file)
Parse an equation.
|
static Equation |
parse(java.io.File file,
java.util.List<Variable> vars)
Parse an equation, passing to the parser a list of global variables.
|
static Equation |
parse(java.lang.String text)
Parse an equation.
|
static Equation |
parse(java.lang.String text,
java.util.List<Variable> vars)
Parse an equation, passing to the parser a list of global variables.
|
static Equation |
parse(java.net.URL url)
Parse an equation.
|
static Equation |
parse(java.net.URL url,
java.util.List<Variable> vars)
Parse an equation, passing to the parser a list of global variables.
|
void |
ReInit(EquationParserTokenManager tm)
Reinitialise.
|
static void |
ReInit(java.io.InputStream stream)
Reinitialise.
|
static void |
ReInit(java.io.InputStream stream,
java.lang.String encoding)
Reinitialise.
|
static void |
ReInit(java.io.Reader stream)
Reinitialise.
|
static void |
semicolon() |
static void |
subAssign() |
static void |
typedAffect() |
static void |
unary() |
static void |
whileExpr() |
static void |
whileToken() |
public static EquationParserTokenManager token_source
public static Token token
public static Token jj_nt
public EquationParser(java.io.InputStream stream)
public EquationParser(java.io.InputStream stream, java.lang.String encoding)
public EquationParser(java.io.Reader stream)
public EquationParser(EquationParserTokenManager tm)
public static void main(java.lang.String[] args) throws ParseException
ParseException
public static void acceptUndefinedVariables(boolean accept)
public static boolean isAcceptingUndefinedVariables()
public static Equation parse(java.lang.String text, java.util.List<Variable> vars) throws ParseException
text
- the equationvars
- the list of global variablesParseException
public static Equation parse(java.net.URL url) throws ParseException, java.io.IOException
url
- the URL containing the equationParseException
java.io.IOException
public static Equation parse(java.net.URL url, java.util.List<Variable> vars) throws ParseException, java.io.IOException
url
- the URL containing the equationvars
- the list of global variablesParseException
java.io.IOException
public static Equation parse(java.io.File file) throws ParseException, java.io.IOException
file
- the File containing the equationParseException
java.io.IOException
public static Equation parse(java.io.File file, java.util.List<Variable> vars) throws ParseException, java.io.IOException
file
- the File containing the equationvars
- the list of global variablesParseException
java.io.IOException
public static Equation parse(java.lang.String text) throws ParseException
text
- the equationParseException
public static final void parse() throws ParseException
ParseException
public static final void block() throws ParseException
ParseException
public static final void breakExpr() throws ParseException
ParseException
public static final void whileExpr() throws ParseException
ParseException
public static final void choice() throws ParseException
ParseException
public static final void semicolon() throws ParseException
ParseException
public static final void comma() throws ParseException
ParseException
public static final void openCurly() throws ParseException
ParseException
public static final void whileToken() throws ParseException
ParseException
public static final void ifToken() throws ParseException
ParseException
public static final void elseif() throws ParseException
ParseException
public static final void elseblock() throws ParseException
ParseException
public static final void elseExpression() throws ParseException
ParseException
public static final void closeCurlyArrayDeclaration() throws ParseException
ParseException
public static final void closeCurly() throws ParseException
ParseException
public static final void openPar() throws ParseException
ParseException
public static final void closePar() throws ParseException
ParseException
public static final void constant() throws ParseException
ParseException
public static final void typedAffect() throws ParseException
ParseException
public static final void increment() throws ParseException
ParseException
public static final void decrement() throws ParseException
ParseException
public static final void affect() throws ParseException
ParseException
public static final void arrayAffect() throws ParseException
ParseException
public static final void addAssign() throws ParseException
ParseException
public static final void multAssign() throws ParseException
ParseException
public static final void divAssign() throws ParseException
ParseException
public static final void subAssign() throws ParseException
ParseException
public static final void affectInType() throws ParseException
ParseException
public static final void arrayDeclaration() throws ParseException
ParseException
public static final void expr() throws ParseException
ParseException
public static final void exprWithoutFirst() throws ParseException
ParseException
public static final void exprWithFirst() throws ParseException
ParseException
public static final void exprManyMULTDIVIDE() throws ParseException
ParseException
public static final void exprMULTDIVIDEContinuation() throws ParseException
ParseException
public static final void exprMULTDIVIDE() throws ParseException
ParseException
public static final void exprContinuation() throws ParseException
ParseException
public static final void unary() throws ParseException
ParseException
public static final void FormalParameters() throws ParseException
ParseException
public static final void element() throws ParseException
ParseException
public static void ReInit(java.io.InputStream stream)
public static void ReInit(java.io.InputStream stream, java.lang.String encoding)
public static void ReInit(java.io.Reader stream)
public void ReInit(EquationParserTokenManager tm)
public static final Token getNextToken()
public static final Token getToken(int index)
public static ParseException generateParseException()
public static final void enable_tracing()
public static final void disable_tracing()
Copyright © 2018 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence