Top Description Fields Constructors Methods
org.jparsec

pack-priv final Class ParserState

extends ParseContext
Class Inheritance

Represents ParseContext for token level parsing.
Author
Ben Yu

Field Summary

Modifier and TypeField and Description
private final int
private final Token[]
private static final String
Inherited from org.jparsec.ParseContext:
atEOFlocatormoduleresultsourcestep

Constructor Summary

AccessConstructor and Description
pack-priv
ParserState(String module, CharSequence source, Token[] input, int at, SourceLocator locator, int endIndex, Object result)

Method Summary

Modifier and TypeMethod and Description
pack-priv CharSequence
characters()

Implements abstract org.jparsec.ParseContext.characters.

Reads the characters as input.

pack-priv String
getInputName(int pos)

Implements abstract org.jparsec.ParseContext.getInputName.

Returns the string representation of the current input (character or token).

pack-priv Token
getToken()

Implements abstract org.jparsec.ParseContext.getToken.

Returns the current token.

pack-priv boolean
isEof()

Implements abstract org.jparsec.ParseContext.isEof.

pack-priv char
peekChar()

Implements abstract org.jparsec.ParseContext.peekChar.

Peeks the current character.

pack-priv int
toIndex(int pos)

Implements abstract org.jparsec.ParseContext.toIndex.

Translates the logical position to physical index in the original source.

Inherited from org.jparsec.ParseContext:
applyAsDelimiterapplyNestedapplyNewNodebuildErrorParseTreebuildParseTreeenableTraceerrorIndexexpectedfailgetIndexgetTracemissingnextnextraiserenderErrorrepeatrepeatsetsetAtstillTheretoStringunexpectedwithErrorSuppressed

Field Detail

endIndexback to summary
private final int endIndex
inputback to summary
private final Token[] input
USED_ON_TOKEN_INPUTback to summary
private static final String USED_ON_TOKEN_INPUT

Constructor Detail

ParserStateback to summary
pack-priv ParserState(String module, CharSequence source, Token[] input, int at, SourceLocator locator, int endIndex, Object result)

Method Detail

charactersback to summary
pack-priv CharSequence characters()

Implements abstract org.jparsec.ParseContext.characters.

Doc from org.jparsec.ParseContext.characters.

Reads the characters as input. Only applicable to character level parsers.

Annotations
@Override
getInputNameback to summary
pack-priv String getInputName(int pos)

Implements abstract org.jparsec.ParseContext.getInputName.

Doc from org.jparsec.ParseContext.getInputName.

Returns the string representation of the current input (character or token).

Annotations
@Override
getTokenback to summary
pack-priv Token getToken()

Implements abstract org.jparsec.ParseContext.getToken.

Doc from org.jparsec.ParseContext.getToken.

Returns the current token. Only applicable to token level parser.

Annotations
@Override
isEofback to summary
pack-priv boolean isEof()

Implements abstract org.jparsec.ParseContext.isEof.

Annotations
@Override
peekCharback to summary
pack-priv char peekChar()

Implements abstract org.jparsec.ParseContext.peekChar.

Doc from org.jparsec.ParseContext.peekChar.

Peeks the current character. Only applicable to character level parser.

Annotations
@Override
toIndexback to summary
pack-priv int toIndex(int pos)

Implements abstract org.jparsec.ParseContext.toIndex.

Doc from org.jparsec.ParseContext.toIndex.

Translates the logical position to physical index in the original source.

Annotations
@Override