Class UnitFormatParser

java.lang.Object
tech.units.indriya.internal.format.UnitFormatParser
All Implemented Interfaces:
UnitTokenConstants

public final class UnitFormatParser extends Object implements UnitTokenConstants
  • Field Details

    • 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 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 Details

    • UnitFormatParser

      public UnitFormatParser(SymbolMap symbols, Reader in)
    • 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

      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

      Number numberExpr() throws TokenException
      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

      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)