Class UnitFormatParser
java.lang.Object
tech.units.indriya.internal.format.UnitFormatParser
- All Implemented Interfaces:
UnitTokenConstants
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
(package private) static final class
private static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final UnitFormatParser.JJCalls[]
private int
private final List
<int[]> private int[]
private int
private int
private DefaultCharStream
private int
private int
private final int[]
private static int[]
private Token
private int[]
private final UnitFormatParser.LookaheadSuccess
private Token
Next token.private int
private boolean
private Token
private SymbolMap
private Token
Current token.private UnitTokenManager
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
ConstructorsConstructorDescriptionUnitFormatParser
(InputStream stream) Constructor with InputStream.UnitFormatParser
(InputStream stream, String encoding) Constructor with InputStream and supplied encodingUnitFormatParser
(Reader stream) Constructor.UnitFormatParser
(SymbolMap symbols, Reader in) Constructor with generated Token Manager. -
Method Summary
Modifier and TypeMethodDescription(package private) javax.measure.Unit
<?> addExpr()
(package private) javax.measure.Unit
<?> (package private) javax.measure.Unit
<?> (package private) final void
Disable tracing.(package private) final void
Enable tracing.(package private) UnitFormatParser.Exponent
exp()
(package private) javax.measure.Unit
<?> (package private) TokenException
Generate TokenException.(package private) final Token
Get the next Token.(package private) final 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
private int
jj_ntk()
private void
private void
jj_save
(int index, int xla) private boolean
jj_scan_token
(int kind) (package private) javax.measure.Unit
<?> mulExpr()
(package private) Number
javax.measure.Unit
<?> (package private) Token
sign()
-
Field Details
-
symbols
-
token_source
Generated Token Manager. -
jj_input_stream
-
token
Current token. -
jj_nt
Next token. -
jj_ntk
private int jj_ntk -
jj_scanpos
-
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
-
jj_rescan
private boolean jj_rescan -
jj_gc
private int jj_gc -
jj_ls
-
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 Details
-
UnitFormatParser
-
UnitFormatParser
UnitFormatParser(InputStream stream) Constructor with InputStream. -
UnitFormatParser
UnitFormatParser(InputStream stream, String encoding) Constructor with InputStream and supplied encoding -
UnitFormatParser
UnitFormatParser(Reader stream) Constructor. -
UnitFormatParser
UnitFormatParser(UnitTokenManager tm) Constructor with generated Token Manager.
-
-
Method Details
-
parseUnit
- Throws:
TokenException
-
compoundExpr
- Throws:
TokenException
-
addExpr
- Throws:
TokenException
-
mulExpr
- Throws:
TokenException
-
exponentExpr
- Throws:
TokenException
-
atomicExpr
- Throws:
TokenException
-
sign
- Throws:
TokenException
-
numberExpr
- Throws:
TokenException
-
exp
- 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
Reinitialise.- Throws:
TokenException
-
jj_scan_token
private boolean jj_scan_token(int kind) -
getNextToken
Get the next Token. -
getToken
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)
-