Class UnitFormatParser
- java.lang.Object
-
- tech.units.indriya.internal.format.UnitFormatParser
-
- All Implemented Interfaces:
UnitTokenConstants
public final class UnitFormatParser extends java.lang.Object implements UnitTokenConstants
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
UnitFormatParser.Exponent
(package private) static class
UnitFormatParser.JJCalls
private static class
UnitFormatParser.LookaheadSuccess
-
Field Summary
Fields Modifier and Type Field Description private UnitFormatParser.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
private DefaultCharStream
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 UnitFormatParser.LookaheadSuccess
jj_ls
private Token
jj_nt
Next token.private int
jj_ntk
private boolean
jj_rescan
private Token
jj_scanpos
private SymbolMap
symbols
private Token
token
Current token.private UnitTokenManager
token_source
Generated Token Manager.-
Fields inherited from interface tech.units.indriya.internal.format.UnitTokenConstants
ASTERISK, CARET, CLOSE_PAREN, COLON, DEFAULT, DIGIT, E, EOF, EXTENDED_CHAR, FLOATING_POINT, INITIAL_CHAR, INTEGER, LOG, MIDDLE_DOT, MINUS, NAT_LOG, OPEN_PAREN, PLUS, SOLIDUS, SUPERSCRIPT_DIGIT, SUPERSCRIPT_INTEGER, tokenImage, UNIT_IDENTIFIER
-
-
Constructor Summary
Constructors Constructor Description UnitFormatParser(java.io.InputStream stream)
Constructor with InputStream.UnitFormatParser(java.io.InputStream stream, java.lang.String encoding)
Constructor with InputStream and supplied encodingUnitFormatParser(java.io.Reader stream)
Constructor.UnitFormatParser(SymbolMap symbols, java.io.Reader in)
UnitFormatParser(UnitTokenManager tm)
Constructor with generated Token Manager.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) javax.measure.Unit<?>
addExpr()
(package private) javax.measure.Unit<?>
atomicExpr()
(package private) javax.measure.Unit<?>
compoundExpr()
(package private) void
disable_tracing()
Disable tracing.(package private) void
enable_tracing()
Enable tracing.(package private) UnitFormatParser.Exponent
exp()
(package private) javax.measure.Unit<?>
exponentExpr()
(package private) TokenException
generateParseException()
Generate TokenException.(package private) Token
getNextToken()
Get the next Token.(package private) Token
getToken(int index)
Get the specific Token.private boolean
jj_2_1(int xla)
private boolean
jj_2_2(int xla)
private boolean
jj_3_1()
private boolean
jj_3_2()
private boolean
jj_3R_3()
private boolean
jj_3R_4()
private boolean
jj_3R_5()
private boolean
jj_3R_6()
private void
jj_add_error_token(int kind, int pos)
private Token
jj_consume_token(int kind)
Reinitialise.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)
(package private) javax.measure.Unit<?>
mulExpr()
(package private) java.lang.Number
numberExpr()
javax.measure.Unit<?>
parseUnit()
(package private) Token
sign()
-
-
-
Field Detail
-
symbols
private SymbolMap symbols
-
token_source
private UnitTokenManager token_source
Generated Token Manager.
-
jj_input_stream
private DefaultCharStream jj_input_stream
-
token
private Token token
Current token.
-
jj_nt
private Token jj_nt
Next token.
-
jj_ntk
private int jj_ntk
-
jj_scanpos
private Token jj_scanpos
-
jj_lastpos
private Token jj_lastpos
-
jj_la
private int jj_la
-
jj_gen
private int jj_gen
-
jj_la1
private final int[] jj_la1
-
jj_la1_0
private static int[] jj_la1_0
-
jj_2_rtns
private final UnitFormatParser.JJCalls[] jj_2_rtns
-
jj_rescan
private boolean jj_rescan
-
jj_gc
private int jj_gc
-
jj_ls
private final UnitFormatParser.LookaheadSuccess jj_ls
-
jj_expentries
private final java.util.List<int[]> jj_expentries
-
jj_expentry
private int[] jj_expentry
-
jj_kind
private int jj_kind
-
jj_lasttokens
private int[] jj_lasttokens
-
jj_endpos
private int jj_endpos
-
-
Constructor Detail
-
UnitFormatParser
public UnitFormatParser(SymbolMap symbols, java.io.Reader in)
-
UnitFormatParser
UnitFormatParser(java.io.InputStream stream)
Constructor with InputStream.
-
UnitFormatParser
UnitFormatParser(java.io.InputStream stream, java.lang.String encoding)
Constructor with InputStream and supplied encoding
-
UnitFormatParser
UnitFormatParser(java.io.Reader stream)
Constructor.
-
UnitFormatParser
UnitFormatParser(UnitTokenManager tm)
Constructor with generated Token Manager.
-
-
Method Detail
-
parseUnit
public javax.measure.Unit<?> parseUnit() throws TokenException
- Throws:
TokenException
-
compoundExpr
javax.measure.Unit<?> compoundExpr() throws TokenException
- Throws:
TokenException
-
addExpr
javax.measure.Unit<?> addExpr() throws TokenException
- Throws:
TokenException
-
mulExpr
javax.measure.Unit<?> mulExpr() throws TokenException
- Throws:
TokenException
-
exponentExpr
javax.measure.Unit<?> exponentExpr() throws TokenException
- Throws:
TokenException
-
atomicExpr
javax.measure.Unit<?> atomicExpr() throws TokenException
- Throws:
TokenException
-
sign
Token sign() throws TokenException
- Throws:
TokenException
-
numberExpr
java.lang.Number numberExpr() throws TokenException
- Throws:
TokenException
-
exp
UnitFormatParser.Exponent exp() throws TokenException
- Throws:
TokenException
-
jj_2_1
private boolean jj_2_1(int xla)
-
jj_2_2
private boolean jj_2_2(int xla)
-
jj_3R_3
private boolean jj_3R_3()
-
jj_3R_6
private boolean jj_3R_6()
-
jj_3_2
private boolean jj_3_2()
-
jj_3_1
private boolean jj_3_1()
-
jj_3R_4
private boolean jj_3R_4()
-
jj_3R_5
private boolean jj_3R_5()
-
jj_la1_init_0
private static void jj_la1_init_0()
-
jj_consume_token
private Token jj_consume_token(int kind) throws TokenException
Reinitialise.- Throws:
TokenException
-
jj_scan_token
private boolean jj_scan_token(int kind)
-
getNextToken
final Token getNextToken()
Get the next Token.
-
getToken
final Token getToken(int index)
Get the specific Token.
-
jj_ntk
private int jj_ntk()
-
jj_add_error_token
private void jj_add_error_token(int kind, int pos)
-
generateParseException
TokenException generateParseException()
Generate TokenException.
-
enable_tracing
final void enable_tracing()
Enable tracing.
-
disable_tracing
final void disable_tracing()
Disable tracing.
-
jj_rescan_token
private void jj_rescan_token()
-
jj_save
private void jj_save(int index, int xla)
-
-