jfun.parsec.tokens
public final class Tokens extends Object
Method Summary | |
---|---|
static Character | char_literal(char c)
create a character literal token. |
static <T> TypedToken<T> | createTypedToken(String text, T type)
Create a typed token. |
static TokenDecimal | decimal_literal(String s)
create a decimal literal token object. |
static TokenEof | eof()
Get a token instance for eof. |
static Long | int_literal(long n)
Create a integer litgeral token |
static Long | long_literal(long n)
Create a integer literal token whose value is within the range of a long integer. |
static TokenQuoted | quoted_string(String open, String close, String s)
Create a quoted string token. |
static TokenReserved | reserved(String n)
create a TokenReserved object. |
static String | str_literal(String s)
Create a string literal token. |
static TokenWord | word(String n)
create a TokenWord object. |
Parameters: c the character.
Returns: the token object.
Parameters: text the token text. type the token type.
Returns: the TypedToken object.
Since: version 1.1
Parameters: s the decimal string representation.
Returns: the token object.
Since: version 1.1
Deprecated: use Tokens instead.
Create a integer litgeral tokenParameters: n the number
Returns: the token object.
Parameters: n the number
Returns: the token object.
Since: version 0.6
Parameters: open the open quote close the close quote s the quoted string
Returns: the token object.
Parameters: n the reserved word.
Returns: the token object.
Parameters: s the string literal.
Returns: the token object.
Parameters: n the word.
Returns: the token object.