Package net.sf.eBus.text
Enum TokenLexer.LexMode
- java.lang.Object
-
- java.lang.Enum<TokenLexer.LexMode>
-
- net.sf.eBus.text.TokenLexer.LexMode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TokenLexer.LexMode>
- Enclosing class:
- TokenLexer
public static enum TokenLexer.LexMode extends java.lang.Enum<TokenLexer.LexMode>
The lexer will either analyze the tokens identifying the type or collect raw input until a terminating delimiter is found.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TokenLexer.LexMode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TokenLexer.LexMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
COOKED
public static final TokenLexer.LexMode COOKED
When in cooked mode identify the token type.
-
RAW
public static final TokenLexer.LexMode RAW
When in raw mode, collect characters until the terminating delimiter is found. RAW is used to read in all characters between parens, braces, etc. RAW mode will read in an entire file if the open, close delimiters are mismatched.
-
-
Method Detail
-
values
public static TokenLexer.LexMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TokenLexer.LexMode c : TokenLexer.LexMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TokenLexer.LexMode valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-