- All Implemented Interfaces:
Serializable,Comparable<LangTokenType>,Constable
All token types produced by the
LangLexer for the relix scripting language.
Keyword tokens are matched case-sensitively; HTTP method tokens (GET,
POST, etc.) are uppercase, all other keywords are lowercase.
When parsing names in structural positions (column names, field keys), the
ScriptParser uses isNameCompatible() to accept both
IDENTIFIER tokens and keyword tokens that were used as identifiers.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionANYtype keyword->— relationship endpoint arrowas— precedes a column binding specification:=— assignment operatorat— precedes a JSONPath extract-path bindingBOOLEANtype keyword:— colon, field separator,— list separatorconnectioncsv-— used in markdown separator rowsdatabaseDATEtype keyworddefdefault— introduces a default value for an optional IN column or paginate entryA backtick-delimited name, such as`unit-price`..— relation/column separator in relationship endpointsDURATIONtype keywordenvEnd of input.extractfalsefromfunctiongenerator— a code-backed generator sourceheader— binding type: HTTP header; also CSVheader:flagheaders— HTTP body field for request headers maphttpAn unrecognised identifier: a name that is not a reserved keyword.importin— marks an IN column (pushdown parameter)json{[(methodnamespaceNUMBERtype keywordAn integer or decimal numeric literal.out— marks an OUT column (output field)paginatepath— binding type: path-parameter|— markdown table cell separatorprivatequery..— multiplicity-bound range separator}]references— FK block on sources / suffix clause on inline tablesrelate— schema relationship declarationrelationrequired— marks an IN column as mandatory)schema;— statement terminator/— separator between a relationship name and its inverse namesource*— unbounded upper multiplicity boundSTRINGtype keywordA double-quoted string literal.symmetric— self-referential relationship modifiertable— database source fieldTIMEtype keywordTIMESTAMPtype keywordtrueurlusing -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif this token type can appear where an unquoted name (column name, field key, etc.) is expected.static LangTokenTypeReturns the enum constant of this class with the specified name.static LangTokenType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NAMESPACE
namespace -
ENV
env -
FROM
from -
USING
using -
IMPORT
import -
SOURCE
source -
CONNECTION
connection -
RELATION
relation -
FUNCTION
function -
PRIVATE
private -
DEF
def -
QUERY
query -
RELATE
relate— schema relationship declaration -
SYMMETRIC
symmetric— self-referential relationship modifier -
REFERENCES
references— FK block on sources / suffix clause on inline tables -
HTTP
http -
DATABASE
database -
CSV
csv -
JSON
json -
GENERATOR
generator— a code-backed generator source -
IN
in— marks an IN column (pushdown parameter) -
OUT
out— marks an OUT column (output field) -
AS
as— precedes a column binding specification -
AT
at— precedes a JSONPath extract-path binding -
PATH
path— binding type: path-parameter -
HEADER
header— binding type: HTTP header; also CSVheader:flag -
HEADERS
headers— HTTP body field for request headers map -
REQUIRED
required— marks an IN column as mandatory -
DEFAULT
default— introduces a default value for an optional IN column or paginate entry -
URL
url -
METHOD
method -
EXTRACT
extract -
PAGINATE
paginate -
SCHEMA
schema -
TABLE
table— database source field -
GET
-
POST
-
NUMBER
NUMBERtype keyword -
STRING
STRINGtype keyword -
BOOLEAN
BOOLEANtype keyword -
ANY
ANYtype keyword -
DATE
DATEtype keyword -
TIME
TIMEtype keyword -
TIMESTAMP
TIMESTAMPtype keyword -
DURATION
DURATIONtype keyword -
TRUE
true -
FALSE
false -
IDENTIFIER
An unrecognised identifier: a name that is not a reserved keyword. -
DELIMITED_IDENTIFIER
A backtick-delimited name, such as`unit-price`. TheLangToken.value()holds the name without the backticks, a doubled backtick read as one. Accepted only where aschema:block names a column or a struct field. -
STRING_LIT
A double-quoted string literal. TheLangToken.value()holds the content without the enclosing quotes (escape sequences resolved). -
NUMBER_LIT
An integer or decimal numeric literal. -
ASSIGN
:=— assignment operator -
COLON
:— colon, field separator -
SEMICOLON
;— statement terminator -
COMMA
,— list separator -
LPAREN
( -
RPAREN
) -
LBRACE
{ -
RBRACE
} -
LBRACKET
[ -
RBRACKET
] -
PIPE
|— markdown table cell separator -
DASH
-— used in markdown separator rows -
DOT
.— relation/column separator in relationship endpoints -
RANGE
..— multiplicity-bound range separator -
ARROW
->— relationship endpoint arrow -
SLASH
/— separator between a relationship name and its inverse name -
STAR
*— unbounded upper multiplicity bound -
EOF
End of input.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isNameCompatible
public boolean isNameCompatible()Returnstrueif this token type can appear where an unquoted name (column name, field key, etc.) is expected.This allows users to name columns
url,table,source, etc., without quoting them.
-