Package org.jparsec

Class ParserState


final class ParserState extends ParseContext
Represents ParseContext for token level parsing.
  • Field Details

    • USED_ON_TOKEN_INPUT

      private static final String USED_ON_TOKEN_INPUT
      See Also:
    • input

      private final Token[] input
    • endIndex

      private final int endIndex
  • Constructor Details

  • Method Details

    • isEof

      boolean isEof()
      Specified by:
      isEof in class ParseContext
    • toIndex

      int toIndex(int pos)
      Description copied from class: ParseContext
      Translates the logical position to physical index in the original source.
      Specified by:
      toIndex in class ParseContext
    • getToken

      Token getToken()
      Description copied from class: ParseContext
      Returns the current token. Only applicable to token level parser.
      Specified by:
      getToken in class ParseContext
    • peekChar

      char peekChar()
      Description copied from class: ParseContext
      Peeks the current character. Only applicable to character level parser.
      Specified by:
      peekChar in class ParseContext
    • characters

      CharSequence characters()
      Description copied from class: ParseContext
      Reads the characters as input. Only applicable to character level parsers.
      Specified by:
      characters in class ParseContext
    • getInputName

      String getInputName(int pos)
      Description copied from class: ParseContext
      Returns the string representation of the current input (character or token).
      Specified by:
      getInputName in class ParseContext