Package org.jparsec
Class Tokens
java.lang.Object
org.jparsec.Tokens
Provides common token values.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Represents a fragment tagged according to its semantics.static final class
Represents a scientific notation with a significand (mantissa) and an exponent.static enum
Pre-builtTokens.Fragment
token tags. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Tokens.Fragment
Returns aTokens.Fragment
tagged asTokens.Tag.DECIMAL
.static Tokens.Fragment
Returns aTokens.Fragment
tagged withtag
.static Tokens.Fragment
identifier
(String name) Returns aTokens.Fragment
tagged asTokens.Tag.IDENTIFIER
.static Tokens.Fragment
Returns aTokens.Fragment
tagged asTokens.Tag.INTEGER
.static Tokens.Fragment
Returns aTokens.Fragment
tagged asTokens.Tag.RESERVED
.static Tokens.ScientificNotation
scientificNotation
(String significand, String exponent)
-
Constructor Details
-
Tokens
private Tokens()
-
-
Method Details
-
fragment
Returns aTokens.Fragment
tagged withtag
.- Parameters:
text
- the fragment text.tag
- the tag representing the fragment's semantics.
-
reserved
Returns aTokens.Fragment
tagged asTokens.Tag.RESERVED
.- Parameters:
name
- the reserved word.- Returns:
- the token value.
-
identifier
Returns aTokens.Fragment
tagged asTokens.Tag.IDENTIFIER
.- Parameters:
name
- the identifier.- Returns:
- the token value.
-
decimalLiteral
Returns aTokens.Fragment
tagged asTokens.Tag.DECIMAL
.- Parameters:
s
- the decimal string representation.- Returns:
- the token value.
-
integerLiteral
Returns aTokens.Fragment
tagged asTokens.Tag.INTEGER
.- Parameters:
s
- the integer string representation.- Returns:
- the token value.
-
scientificNotation
-