|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jparsec.Tokens
public final class Tokens
Provides common token values.
Nested Class Summary | |
---|---|
static class |
Tokens.Fragment
Represents a fragment tagged according to its semantics. |
static class |
Tokens.ScientificNotation
Represents a scientific notation with a significand (mantissa) and an exponent. |
static class |
Tokens.Tag
Pre-built Tokens.Fragment token tags. |
Method Summary | |
---|---|
static Tokens.Fragment |
decimalLiteral(String s)
Returns a Tokens.Fragment tagged as Tokens.Tag.DECIMAL . |
static Tokens.Fragment |
fragment(String text,
Object tag)
Returns a Tokens.Fragment tagged with tag . |
static Tokens.Fragment |
identifier(String name)
Returns a Tokens.Fragment tagged as Tokens.Tag.IDENTIFIER . |
static Tokens.Fragment |
integerLiteral(String s)
Returns a Tokens.Fragment tagged as Tokens.Tag.INTEGER . |
static Tokens.Fragment |
reserved(String name)
Returns a Tokens.Fragment tagged as Tokens.Tag.RESERVED . |
static Tokens.ScientificNotation |
scientificNotation(String significand,
String exponent)
Returns a Tokens.ScientificNotation with significand before the 'e' or 'E'
and exponent after. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Tokens.Fragment fragment(String text, Object tag)
Tokens.Fragment
tagged with tag
.
text
- the fragment text.tag
- the tag representing the fragment's semantics.
public static Tokens.Fragment reserved(String name)
Tokens.Fragment
tagged as Tokens.Tag.RESERVED
.
name
- the reserved word.
public static Tokens.Fragment identifier(String name)
Tokens.Fragment
tagged as Tokens.Tag.IDENTIFIER
.
name
- the identifier.
public static Tokens.Fragment decimalLiteral(String s)
Tokens.Fragment
tagged as Tokens.Tag.DECIMAL
.
s
- the decimal string representation.
public static Tokens.Fragment integerLiteral(String s)
Tokens.Fragment
tagged as Tokens.Tag.INTEGER
.
s
- the integer string representation.
public static Tokens.ScientificNotation scientificNotation(String significand, String exponent)
Tokens.ScientificNotation
with significand
before the 'e' or 'E'
and exponent
after.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |