Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## lp.parse
Enum LpTokenType

    java.lang.Object
      java.lang.Enum<LpTokenType>
          lp.parse.LpTokenType

All Implemented Interfaces:
  Serializable, Comparable<LpTokenType>

    public enum LpTokenType

extends Enum<LpTokenType>

Enumeration of token types returned by a `LpLexer` and further used by parsers to parse source code.

Version:
  1.0.0
Author:
  Martin Slota
See Also:
  `LpLexer.getTokenType()`

Enum Constant Summary
`COMMA` A comma.
`DOT` A dot.
`EOF` Returned when the end of input is reached.
`LEFT_PAREN` A left parenthesis.
`LOWERCASE_WORD` Any string of letters, numbers and underscores not beginning with an uppercase letter.
`RIGHT_PAREN` A right parenthesis.
`RULE_ARROW` An arrow separating a rule's head from a rule's body.
`UNKNOWN_CHAR` Everything that does not fit into some of the previous categories is identified as this token type.
`UPPERCASE_WORD` Any string of letters, numbers and underscores beginning with an uppercase letter.

Field Summary
`private String` | `description` Description of the token.

Method Summary
`String` | `getDescription()` Getter method for the description.
`static LpTokenType` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static LpTokenType[]` | `values()` Returns an array containing the constants of this enum type, in the order they're declared.

Methods inherited from class java.lang.Enum
`clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Enum Constant Detail

### LEFT_PAREN

    public static final LpTokenType LEFT_PAREN

  A left parenthesis.

### RIGHT_PAREN

    public static final LpTokenType RIGHT_PAREN

  A right parenthesis.

### COMMA

    public static final LpTokenType COMMA

  A comma.

### DOT

    public static final LpTokenType DOT

  A dot.

### RULE_ARROW

    public static final LpTokenType RULE_ARROW

  An arrow separating a rule's head from a rule's body.

### LOWERCASE_WORD

    public static final LpTokenType LOWERCASE_WORD

  Any string of letters, numbers and underscores not beginning with an uppercase letter. See `LpLexer` for details.

### UPPERCASE_WORD

    public static final LpTokenType UPPERCASE_WORD

  Any string of letters, numbers and underscores beginning with an uppercase letter. See `LpLexer` for details.

### EOF

    public static final LpTokenType EOF

  Returned when the end of input is reached.

### UNKNOWN_CHAR

    public static final LpTokenType UNKNOWN_CHAR

  Everything that does not fit into some of the previous categories is identified as this token type.

Field Detail

### description

    private final String description

  Description of the token.

Method Detail

### values

    public static final LpTokenType[] values()

  Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:

      for(LpTokenType c : LpTokenType.values())
              System.out.println(c);

  Returns:
    an array containing the constants of this enum type, in the order they're declared

### valueOf

    public static LpTokenType valueOf(String name)

  Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name

### getDescription

    public String getDescription()

  Getter method for the description.

  Returns:
    token type description

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD