public final class Tokens
extends java.lang.Object
| Constructor and Description |
|---|
Tokens() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Character |
char_literal(char c)
create a character literal token.
|
static <T> TypedToken<T> |
createTypedToken(java.lang.String text,
T type)
Create a typed token.
|
static TokenDecimal |
decimal_literal(java.lang.String s)
create a decimal literal token object.
|
static jfun.parsec.tokens.TokenEof |
eof()
Get a token instance for eof.
|
static java.lang.Long |
int_literal(long n)
Deprecated.
use
long_literal(long) instead. |
static java.lang.Long |
long_literal(long n)
Create a integer literal token whose value is within the range of a long integer.
|
static MyToken |
my(java.lang.String text,
int kind)
Deprecated.
|
static TokenQuoted |
quoted_string(java.lang.String open,
java.lang.String close,
java.lang.String s)
Create a quoted string token.
|
static TokenReserved |
reserved(java.lang.String n)
create a TokenReserved object.
|
static java.lang.String |
str_literal(java.lang.String s)
Create a string literal token.
|
static TokenWord |
word(java.lang.String n)
create a TokenWord object.
|
public static <T> TypedToken<T> createTypedToken(java.lang.String text, T type)
text - the token text.type - the token type.public static TokenReserved reserved(java.lang.String n)
n - the reserved word.public static TokenWord word(java.lang.String n)
n - the word.@Deprecated public static MyToken my(java.lang.String text, int kind)
text - the text.kind - the kind.public static TokenDecimal decimal_literal(java.lang.String s)
s - the decimal string representation.public static java.lang.Character char_literal(char c)
c - the character.public static java.lang.Long int_literal(long n)
long_literal(long) instead.n - the numberpublic static java.lang.Long long_literal(long n)
n - the numberpublic static TokenQuoted quoted_string(java.lang.String open, java.lang.String close, java.lang.String s)
open - the open quoteclose - the close quotes - the quoted stringpublic static java.lang.String str_literal(java.lang.String s)
s - the string literal.public static jfun.parsec.tokens.TokenEof eof()