Class SqlLexer

    • Constructor Detail

      • SqlLexer

        public SqlLexer​(String sql)
        Constructor.
        Parameters:
        sql - Input.
    • Method Detail

      • lookAhead

        public SqlLexerToken lookAhead()
        Get next token without lexer state change.
        Returns:
        Next token.
      • shift

        public boolean shift()
        Shift lexer to the next position.
        Returns:
        True if next token was found, false in case of end-of-file.
      • tokenFirstChar

        public char tokenFirstChar()
        Specified by:
        tokenFirstChar in interface SqlLexerToken
        Returns:
        First character of the current token.
      • tokenPosition

        public int tokenPosition()
        Specified by:
        tokenPosition in interface SqlLexerToken
        Returns:
        Current token start position.
      • eod

        public boolean eod()
        Returns:
        True if end of data is reached.
      • position

        public int position()
        Returns:
        Current lexer position.