Enum Class OsdLexer.TokenType

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

public static enum OsdLexer.TokenType extends Enum<OsdLexer.TokenType>
Token types produced by the OSD lexer (omnist-spec §5.3).
  • Enum Constant Details

    • STRING

      public static final OsdLexer.TokenType STRING
      A double-quoted field-name string (§5.3.1); the token text contains the unescaped content.
    • CARDINALITY

      public static final OsdLexer.TokenType CARDINALITY
      A bracket-enclosed cardinality expression, e.g. [0,1] or [2]; text is the content inside brackets.
    • LBRACE

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

      public static final OsdLexer.TokenType RBRACE
      Closing brace token, &#125;.
    • COLON

      public static final OsdLexer.TokenType COLON
      Colon : separating a field label from its type.
    • COMMA

      public static final OsdLexer.TokenType COMMA
      Comma , separating fields within a record.
    • QUESTION

      public static final OsdLexer.TokenType QUESTION
      Question mark ? marking a scalar type as nullable (§5.4).
    • RECORD

      public static final OsdLexer.TokenType RECORD
      The keyword record, introducing a record definition (§5.5).
    • ROOT

      public static final OsdLexer.TokenType ROOT
      The keyword root, declaring the root record name (§5.6).
    • IDENT

      public static final OsdLexer.TokenType IDENT
      An identifier: a record name, field type name, or scalar keyword (§5.3).
    • EOF

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

    • values

      public static OsdLexer.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 OsdLexer.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