Enum Class OmlLexer.TokenType

java.lang.Object
java.lang.Enum<OmlLexer.TokenType>
dev.omnist.oml.OmlLexer.TokenType
All Implemented Interfaces:
Serializable, Comparable<OmlLexer.TokenType>, Constable
Enclosing class:
OmlLexer

public static enum OmlLexer.TokenType extends Enum<OmlLexer.TokenType>
Token types produced by the OML lexer (omnist-spec §4.2). Each variant corresponds to one lexical category in the OML grammar.
  • Enum Constant Details

    • STRING

      public static final OmlLexer.TokenType STRING
      A string value — double-quoted, raw single-quoted, or triple-quoted multiline.
    • LBRACE

      public static final OmlLexer.TokenType LBRACE
      Opening brace token, &#123;.
    • RBRACE

      public static final OmlLexer.TokenType RBRACE
      Closing brace token, &#125;.
    • LBRACKET

      public static final OmlLexer.TokenType LBRACKET
      Opening bracket [.
    • RBRACKET

      public static final OmlLexer.TokenType RBRACKET
      Closing bracket ].
    • COLON

      public static final OmlLexer.TokenType COLON
      Colon : separating a label from its value.
    • COMMA

      public static final OmlLexer.TokenType COMMA
      Comma , separating array elements.
    • DATETIME

      public static final OmlLexer.TokenType DATETIME
      An ISO-8601 date-time literal (§4.2 rule 3); carries a DateTimeValue as its value.
    • DATE

      public static final OmlLexer.TokenType DATE
      An ISO-8601 date literal (§4.2 rule 4); carries a LocalDate as its value.
    • TIME

      public static final OmlLexer.TokenType TIME
      An ISO-8601 time literal (§4.2 rule 5); carries a TimeValue as its value.
    • NUMBER

      public static final OmlLexer.TokenType NUMBER
      A floating-point number or reserved float spelling (nan, inf, -inf); carries a double.
    • INTEGER

      public static final OmlLexer.TokenType INTEGER
      A decimal integer literal (§4.2 rule 8); carries a BigInteger as its value.
    • IDENT

      public static final OmlLexer.TokenType IDENT
      A bare identifier used as an edge label, boolean keyword, or null keyword.
    • SEPARATOR

      public static final OmlLexer.TokenType SEPARATOR
      A logical line separator: one or more of \n, \r, or ;.
    • EOF

      public static final OmlLexer.TokenType EOF
      End-of-input sentinel; always the last token returned by OmlLexer.tokenizeAll().
  • Method Details

    • values

      public static OmlLexer.TokenType[] 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 OmlLexer.TokenType 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