public class UParser extends java.lang.Object implements UParserConstants
Modifier and Type | Class and Description |
---|---|
(package private) static class |
UParser.JJCalls |
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
debug |
(package private) SimpleCharStream |
jj_input_stream |
Token |
jj_nt
Next token.
|
Token |
token
Current token.
|
UParserTokenManager |
token_source
Generated Token Manager.
|
Constructor and Description |
---|
UParser() |
UParser(java.io.InputStream stream)
Constructor with InputStream.
|
UParser(java.io.InputStream stream,
java.lang.String encoding)
Constructor with InputStream and supplied encoding
|
UParser(java.io.Reader stream)
Constructor.
|
UParser(UParserTokenManager tm)
Constructor with generated Token Manager.
|
Modifier and Type | Method and Description |
---|---|
void |
disable_tracing()
Disable tracing.
|
void |
enable_tracing()
Enable tracing.
|
UnitEquation |
Equation() |
java.util.Vector |
Equations() |
int |
exponent() |
ParseException |
generateParseException()
Generate ParseException.
|
Token |
getNextToken()
Get the next Token.
|
Token |
getToken(int index)
Get the specific Token.
|
double |
number() |
java.util.Vector |
parseEquations(java.lang.String expression)
Parse a set of equations separated by semicolons.
|
UnitExpr |
parseUnitExpr(java.lang.String expression)
Parse a unit expression.
|
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.
|
void |
ReInit(UParserTokenManager tm)
Reinitialise.
|
UnitExpr |
uExpr() |
Token |
unit() |
UnitTerm |
uTerm() |
boolean debug
public UParserTokenManager token_source
SimpleCharStream jj_input_stream
public Token token
public Token jj_nt
public UParser()
public UParser(java.io.InputStream stream)
public UParser(java.io.InputStream stream, java.lang.String encoding)
public UParser(java.io.Reader stream)
public UParser(UParserTokenManager tm)
public UnitExpr parseUnitExpr(java.lang.String expression) throws ParseException
expression
- ParseException
- If parsing error is encountered.public java.util.Vector parseEquations(java.lang.String expression) throws ParseException
expression
- ParseException
- If parsing error is encountered.public final UnitExpr uExpr() throws ParseException
ParseException
public final UnitTerm uTerm() throws ParseException
ParseException
public final Token unit() throws ParseException
ParseException
public final java.util.Vector Equations() throws ParseException
ParseException
public final UnitEquation Equation() throws ParseException
ParseException
public final int exponent() throws ParseException
ParseException
public final double number() throws ParseException
ParseException
public void ReInit(java.io.InputStream stream)
public void ReInit(java.io.InputStream stream, java.lang.String encoding)
public void ReInit(java.io.Reader stream)
public void ReInit(UParserTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()