Enum Class LangTokenType

java.lang.Object
java.lang.Enum<LangTokenType>
com.darkcollective.relix.lang.LangTokenType
All Implemented Interfaces:
Serializable, Comparable<LangTokenType>, Constable

public enum LangTokenType extends Enum<LangTokenType>
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.

  • Enum Constant Details

    • NAMESPACE

      public static final LangTokenType NAMESPACE
      namespace
    • ENV

      public static final LangTokenType ENV
      env
    • FROM

      public static final LangTokenType FROM
      from
    • USING

      public static final LangTokenType USING
      using
    • IMPORT

      public static final LangTokenType IMPORT
      import
    • SOURCE

      public static final LangTokenType SOURCE
      source
    • CONNECTION

      public static final LangTokenType CONNECTION
      connection
    • RELATION

      public static final LangTokenType RELATION
      relation
    • FUNCTION

      public static final LangTokenType FUNCTION
      function
    • PRIVATE

      public static final LangTokenType PRIVATE
      private
    • DEF

      public static final LangTokenType DEF
      def
    • QUERY

      public static final LangTokenType QUERY
      query
    • RELATE

      public static final LangTokenType RELATE
      relate — schema relationship declaration
    • SYMMETRIC

      public static final LangTokenType SYMMETRIC
      symmetric — self-referential relationship modifier
    • REFERENCES

      public static final LangTokenType REFERENCES
      references — FK block on sources / suffix clause on inline tables
    • HTTP

      public static final LangTokenType HTTP
      http
    • DATABASE

      public static final LangTokenType DATABASE
      database
    • CSV

      public static final LangTokenType CSV
      csv
    • JSON

      public static final LangTokenType JSON
      json
    • GENERATOR

      public static final LangTokenType GENERATOR
      generator — a code-backed generator source
    • IN

      public static final LangTokenType IN
      in — marks an IN column (pushdown parameter)
    • OUT

      public static final LangTokenType OUT
      out — marks an OUT column (output field)
    • AS

      public static final LangTokenType AS
      as — precedes a column binding specification
    • AT

      public static final LangTokenType AT
      at — precedes a JSONPath extract-path binding
    • PATH

      public static final LangTokenType PATH
      path — binding type: path-parameter
    • HEADERS

      public static final LangTokenType HEADERS
      headers — HTTP body field for request headers map
    • REQUIRED

      public static final LangTokenType REQUIRED
      required — marks an IN column as mandatory
    • DEFAULT

      public static final LangTokenType DEFAULT
      default — introduces a default value for an optional IN column or paginate entry
    • URL

      public static final LangTokenType URL
      url
    • METHOD

      public static final LangTokenType METHOD
      method
    • EXTRACT

      public static final LangTokenType EXTRACT
      extract
    • PAGINATE

      public static final LangTokenType PAGINATE
      paginate
    • SCHEMA

      public static final LangTokenType SCHEMA
      schema
    • TABLE

      public static final LangTokenType TABLE
      table — database source field
    • GET

      public static final LangTokenType GET
    • POST

      public static final LangTokenType POST
    • NUMBER

      public static final LangTokenType NUMBER
      NUMBER type keyword
    • STRING

      public static final LangTokenType STRING
      STRING type keyword
    • BOOLEAN

      public static final LangTokenType BOOLEAN
      BOOLEAN type keyword
    • ANY

      public static final LangTokenType ANY
      ANY type keyword
    • DATE

      public static final LangTokenType DATE
      DATE type keyword
    • TIME

      public static final LangTokenType TIME
      TIME type keyword
    • TIMESTAMP

      public static final LangTokenType TIMESTAMP
      TIMESTAMP type keyword
    • DURATION

      public static final LangTokenType DURATION
      DURATION type keyword
    • TRUE

      public static final LangTokenType TRUE
      true
    • FALSE

      public static final LangTokenType FALSE
      false
    • IDENTIFIER

      public static final LangTokenType IDENTIFIER
      An unrecognised identifier: a name that is not a reserved keyword.
    • DELIMITED_IDENTIFIER

      public static final LangTokenType DELIMITED_IDENTIFIER
      A backtick-delimited name, such as `unit-price`. The LangToken.value() holds the name without the backticks, a doubled backtick read as one. Accepted only where a schema: block names a column or a struct field.
    • STRING_LIT

      public static final LangTokenType STRING_LIT
      A double-quoted string literal. The LangToken.value() holds the content without the enclosing quotes (escape sequences resolved).
    • NUMBER_LIT

      public static final LangTokenType NUMBER_LIT
      An integer or decimal numeric literal.
    • ASSIGN

      public static final LangTokenType ASSIGN
      := — assignment operator
    • COLON

      public static final LangTokenType COLON
      : — colon, field separator
    • SEMICOLON

      public static final LangTokenType SEMICOLON
      ; — statement terminator
    • COMMA

      public static final LangTokenType COMMA
      , — list separator
    • LPAREN

      public static final LangTokenType LPAREN
      (
    • RPAREN

      public static final LangTokenType RPAREN
      )
    • LBRACE

      public static final LangTokenType LBRACE
      {
    • RBRACE

      public static final LangTokenType RBRACE
      }
    • LBRACKET

      public static final LangTokenType LBRACKET
      [
    • RBRACKET

      public static final LangTokenType RBRACKET
      ]
    • PIPE

      public static final LangTokenType PIPE
      | — markdown table cell separator
    • DASH

      public static final LangTokenType DASH
      - — used in markdown separator rows
    • DOT

      public static final LangTokenType DOT
      . — relation/column separator in relationship endpoints
    • RANGE

      public static final LangTokenType RANGE
      .. — multiplicity-bound range separator
    • ARROW

      public static final LangTokenType ARROW
      -> — relationship endpoint arrow
    • SLASH

      public static final LangTokenType SLASH
      / — separator between a relationship name and its inverse name
    • STAR

      public static final LangTokenType STAR
      * — unbounded upper multiplicity bound
    • EOF

      public static final LangTokenType EOF
      End of input.
  • Method Details

    • values

      public static LangTokenType[] 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

      public static LangTokenType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • isNameCompatible

      public boolean isNameCompatible()
      Returns true if 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.