Class AbstractTokenStream

    • Constructor Detail

      • AbstractTokenStream

        public AbstractTokenStream()
    • Method Detail

      • consume

        public final ParserToken consume()
        Description copied from interface: TokenStream
        Consumes a token from the stream.
        Specified by:
        consume in interface TokenStream
        Returns:
        the consumed token.
      • peek

        public final ParserToken peek()
        Description copied from interface: TokenStream
        Peeks at the next token on the stream.
        Specified by:
        peek in interface TokenStream
        Returns:
        the next token on the stream (special EOF token if no more tokens exists)
      • token

        public final ParserToken token()
        Description copied from interface: TokenStream
        Returns the last token extracted via the call to consume.
        Specified by:
        token in interface TokenStream
        Returns:
        the last extracted token via consume