public final class Tokens extends Object
Modifier and Type | Class and Description |
---|---|
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. |
Modifier and Type | Method and Description |
---|---|
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)
|
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)
Copyright © 2013–2016 jparsec. All rights reserved.