org.apache.ignite.internal.sql

## Class SqlLexer

- java.lang.Object
- - org.apache.ignite.internal.sql.SqlLexer

All Implemented Interfaces:
  SqlLexerToken

    public class SqlLexer
    extends Object
    implements SqlLexerToken

SQL lexer.

### Constructor Summary

Constructors
Constructor and Description
`SqlLexer(String sql)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`SqlLexerToken` `lookAhead()` Get next token without lexer state change.
`boolean` `shift()` Shift lexer to the next position.
`String` `sql()`
`String` `token()`
`char` `tokenFirstChar()`
`int` `tokenPosition()`
`SqlLexerTokenType` `tokenType()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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.

#### sql

    public String sql()

Specified by:
  `sql` in interface `SqlLexerToken`
Returns:
  Original SQL.

#### token

    public String token()

Specified by:
  `token` in interface `SqlLexerToken`
Returns:
  Current token.

#### 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.

#### tokenType

    public SqlLexerTokenType tokenType()

Specified by:
  `tokenType` in interface `SqlLexerToken`
Returns:
  Token type.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.4.0
Release Date | : March 5 2018