Package dev.omnist.oml
Enum Class OmlLexer.TokenType
- All Implemented Interfaces:
Serializable,Comparable<OmlLexer.TokenType>,Constable
- Enclosing class:
OmlLexer
Token types produced by the OML lexer (omnist-spec §4.2).
Each variant corresponds to one lexical category in the OML grammar.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionColon:separating a label from its value.Comma,separating array elements.An ISO-8601 date literal (§4.2 rule 4); carries aLocalDateas its value.An ISO-8601 date-time literal (§4.2 rule 3); carries aDateTimeValueas its value.End-of-input sentinel; always the last token returned byOmlLexer.tokenizeAll().A bare identifier used as an edge label, boolean keyword, or null keyword.A decimal integer literal (§4.2 rule 8); carries aBigIntegeras its value.Opening brace token,{.Opening bracket[.A floating-point number or reserved float spelling (nan, inf, -inf); carries adouble.Closing brace token,}.Closing bracket].A logical line separator: one or more of\n,\r, or;.A string value — double-quoted, raw single-quoted, or triple-quoted multiline.An ISO-8601 time literal (§4.2 rule 5); carries aTimeValueas its value. -
Method Summary
Modifier and TypeMethodDescriptionstatic OmlLexer.TokenTypeReturns the enum constant of this class with the specified name.static OmlLexer.TokenType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STRING
A string value — double-quoted, raw single-quoted, or triple-quoted multiline. -
LBRACE
Opening brace token,{. -
RBRACE
Closing brace token,}. -
LBRACKET
Opening bracket[. -
RBRACKET
Closing bracket]. -
COLON
Colon:separating a label from its value. -
COMMA
Comma,separating array elements. -
DATETIME
An ISO-8601 date-time literal (§4.2 rule 3); carries aDateTimeValueas its value. -
DATE
An ISO-8601 date literal (§4.2 rule 4); carries aLocalDateas its value. -
TIME
An ISO-8601 time literal (§4.2 rule 5); carries aTimeValueas its value. -
NUMBER
A floating-point number or reserved float spelling (nan, inf, -inf); carries adouble. -
INTEGER
A decimal integer literal (§4.2 rule 8); carries aBigIntegeras its value. -
IDENT
A bare identifier used as an edge label, boolean keyword, or null keyword. -
SEPARATOR
A logical line separator: one or more of\n,\r, or;. -
EOF
End-of-input sentinel; always the last token returned byOmlLexer.tokenizeAll().
-
-
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
-