Group

Lexer Tokens

Lexer token definitions describing the low-level character patterns for identifiers, literals, and other terminal symbols.

DATE

A date literal token of the form @YYYY-MM-DD. The @ prefix distinguishes date literals from other values. Month and day components are optional, allowing partial dates such as @2024 or @2024-01.

DATETIME

A datetime literal token of the form @YYYY-MM-DDThh:mm:ss.fff+hh:mm. The @ prefix and T separator are required. The time component and timezone offset are optional. For example: @2024-01-15T12:30:00+05:00 or @2024-01-15T.

DELIMITEDIDENTIFIER

A backtick-delimited identifier. Allows any character sequence — including reserved words, spaces, and special characters — to serve as an identifier. Escape sequences are supported inside the backticks.

EOF

The end-of-file token, built into the ANTLR runtime. Used in the top-level library rule to assert that the entire input has been consumed. It is not a character sequence but a virtual marker emitted by the lexer when the input stream is exhausted.

IDENTIFIER

The basic unquoted identifier token. Starts with a letter or underscore, followed by zero or more letters, digits, or underscores. Case-sensitive. Reserved words cannot appear as plain identifiers; use a delimited or quoted form instead.

LONGNUMBER

A long integer literal token. One or more digits followed by the suffix L (uppercase). Represents 64-bit integer values. For example: 1000000L.

NUMBER

A numeric literal token representing an integer or decimal number. One or more digits, optionally followed by a decimal point and more digits. Used for integer and decimal quantity values.

QUOTEDIDENTIFIER

A double-quote-delimited identifier. Allows any character sequence, including spaces and reserved words, to serve as an identifier. Supports the same escape sequences as string literals.

STRING

A single-quote-delimited string literal token. The content may include any character or an escape sequence. Supports \', \", \\, \/, \f, \n, \r, \t, and Unicode escapes (\uXXXX).

TIME

A time literal token of the form @Thh:mm:ss.fff. The @T prefix distinguishes time literals from datetime literals. Minutes, seconds, and milliseconds are optional, allowing partial times such as @T14 or @T14:30.