org.sbml.jsbml.text.parser
public class FormulaParserLL3 extends java.lang.Object implements IFormulaParser, FormulaParserLL3Constants
Modifier and Type | Class and Description |
---|---|
(package private) static class |
FormulaParserLL3.JJCalls |
private static class |
FormulaParserLL3.LookaheadSuccess |
Modifier and Type | Field and Description |
---|---|
private FormulaParserLL3.JJCalls[] |
jj_2_rtns |
private int |
jj_endpos |
private java.util.List<int[]> |
jj_expentries |
private int[] |
jj_expentry |
private int |
jj_gc |
private int |
jj_gen |
(package private) SimpleCharStream |
jj_input_stream |
private int |
jj_kind |
private int |
jj_la |
private int[] |
jj_la1 |
private static int[] |
jj_la1_0 |
private Token |
jj_lastpos |
private int[] |
jj_lasttokens |
private FormulaParserLL3.LookaheadSuccess |
jj_ls |
Token |
jj_nt
Next token.
|
private int |
jj_ntk |
private boolean |
jj_rescan |
private Token |
jj_scanpos |
static java.util.Properties |
stringToType |
Token |
token
Current token.
|
FormulaParserLL3TokenManager |
token_source
Generated Token Manager.
|
Constructor and Description |
---|
FormulaParserLL3(FormulaParserLL3TokenManager tm)
Constructor with generated Token Manager.
|
FormulaParserLL3(java.io.InputStream stream)
Constructor with InputStream.
|
FormulaParserLL3(java.io.InputStream stream,
java.lang.String encoding)
Constructor with InputStream and supplied encoding
|
FormulaParserLL3(java.io.Reader stream)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
checkSize(java.util.ArrayList<ASTNode> arguments,
int i) |
private ASTNode |
createModulo(ASTNode leftChild,
ASTNode rightChild)
Returns a piecewise
ASTNode representing the modulo operation between the left and right child given. |
void |
disable_tracing()
Disable tracing.
|
void |
enable_tracing()
Enable tracing.
|
private ASTNode |
Expression() |
ParseException |
generateParseException()
Generate ParseException.
|
private java.lang.Integer |
getInteger(ASTNode node) |
Token |
getNextToken()
Get the next Token.
|
Token |
getToken(int index)
Get the specific Token.
|
private boolean |
jj_2_1(int xla) |
private boolean |
jj_3_1() |
private boolean |
jj_3R_5() |
private void |
jj_add_error_token(int kind,
int pos) |
private Token |
jj_consume_token(int kind) |
private static void |
jj_la1_init_0() |
private int |
jj_ntk() |
private void |
jj_rescan_token() |
private void |
jj_save(int index,
int xla) |
private boolean |
jj_scan_token(int kind) |
ASTNode |
parse() |
private ASTNode |
Primary() |
void |
ReInit(FormulaParserLL3TokenManager tm)
Reinitialise.
|
void |
ReInit(java.io.InputStream stream)
Reinitialise.
|
void |
ReInit(java.io.InputStream stream,
java.lang.String encoding)
Reinitialise.
|
void |
ReInit(java.io.Reader stream)
Reinitialise.
|
Token |
string() |
private ASTNode |
TermLvl1() |
private ASTNode |
TermLvl2() |
private ASTNode |
TermLvl3() |
public static java.util.Properties stringToType
public FormulaParserLL3TokenManager token_source
SimpleCharStream jj_input_stream
public Token token
public Token jj_nt
private int jj_ntk
private Token jj_scanpos
private Token jj_lastpos
private int jj_la
private int jj_gen
private final int[] jj_la1
private static int[] jj_la1_0
private final FormulaParserLL3.JJCalls[] jj_2_rtns
private boolean jj_rescan
private int jj_gc
private final FormulaParserLL3.LookaheadSuccess jj_ls
private java.util.List<int[]> jj_expentries
private int[] jj_expentry
private int jj_kind
private int[] jj_lasttokens
private int jj_endpos
public FormulaParserLL3(java.io.InputStream stream)
public FormulaParserLL3(java.io.InputStream stream, java.lang.String encoding)
public FormulaParserLL3(java.io.Reader stream)
public FormulaParserLL3(FormulaParserLL3TokenManager tm)
private void checkSize(java.util.ArrayList<ASTNode> arguments, int i) throws ParseException
ParseException
private java.lang.Integer getInteger(ASTNode node)
private ASTNode createModulo(ASTNode leftChild, ASTNode rightChild)
ASTNode
representing the modulo operation between the left and right child given.
The fomula produced for 'a % b' or modulo(a, b) is 'piecewise(floor(a/b), gt(a/b, 0), ceil(a/b))'
leftChild
- rightChild
- ASTNode
representing the modulo operation between the left and right child given.http://sbml.org/Documents/FAQ#Why_can.27t_I_use_the_.3Crem.3E_operator_in_SBML_MathML.3F
public final Token string() throws ParseException
ParseException
public final ASTNode parse() throws ParseException
parse
in interface IFormulaParser
ParseException
private final ASTNode Expression() throws ParseException
ParseException
private final ASTNode TermLvl3() throws ParseException
ParseException
private final ASTNode TermLvl2() throws ParseException
ParseException
private final ASTNode TermLvl1() throws ParseException
ParseException
private final ASTNode Primary() throws ParseException, java.lang.NumberFormatException
ParseException
java.lang.NumberFormatException
private boolean jj_2_1(int xla)
private boolean jj_3_1()
private boolean jj_3R_5()
private static void jj_la1_init_0()
public void ReInit(java.io.InputStream stream)
ReInit
in interface IFormulaParser
public void ReInit(java.io.InputStream stream, java.lang.String encoding)
ReInit
in interface IFormulaParser
public void ReInit(java.io.Reader stream)
ReInit
in interface IFormulaParser
public void ReInit(FormulaParserLL3TokenManager tm)
private Token jj_consume_token(int kind) throws ParseException
ParseException
private boolean jj_scan_token(int kind)
public final Token getNextToken()
public final Token getToken(int index)
private int jj_ntk()
private void jj_add_error_token(int kind, int pos)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
private void jj_rescan_token()
private void jj_save(int index, int xla)