Arena
1.0
A content management system
|
A token that represents a numeric value. More...
Public Member Functions | |
def | __init__ |
Constructor. | |
def | init |
Initializer. | |
def | readFrom |
Read the token from the specified stream. More... | |
def | isInteger |
Determine whether or not the number represented is an integer value. More... | |
def | value |
Retrieve the numeric value of the token. More... | |
Public Member Functions inherited from Library.Parse.Scan.Tokens.AWordToken | |
def | __init__ |
Constructor. | |
def | init |
Initializer. | |
def | writeTo |
Write the token to the specified stream. More... | |
def | readFrom |
Read the token from the specified stream. More... | |
def | scope |
Retrieve the token scope (the symbol table in which it is located) | |
def | index |
Retrieve the token index within its symbol table. | |
Public Member Functions inherited from Library.Parse.Scan.Tokens.AToken | |
def | __init__ |
Constructor. More... | |
def | init |
Initializer. | |
def | rewind |
Return the token to the input stream. More... | |
def | toString |
Return a string representation of the token. More... | |
def | readFrom |
Read the token from the specified stream. More... | |
def | writeTo |
Write the token to the specified stream. More... | |
def | code |
Retrieve the token code. | |
def | literal |
Retrieve the token literal. | |
def | Language |
Retrieve the language used to parse the token. More... | |
Public Member Functions inherited from Library.Base.Classwork.AnObject | |
def | init |
Initialize a new object instance. More... | |
def | __init__ |
Construct and initialize a new instance of AnObject. More... | |
def | __del__ |
Destroy the object instance. More... | |
def | displayName |
Construct a "pretty" display name for the class instance, based on the name of its class. More... | |
def | implements |
Determine whether the class instance is related to the specified class. More... | |
def | toString |
Return a string representation of the class, suitable for output to a console or text-based device. More... | |
def | __str__ |
Return a string representation of the class. More... | |
def | classname |
Return the name of the class from which the instance was created. More... | |
def | name |
Return the name of the class. More... | |
Public Member Functions inherited from Library.String.Utilities.IsPrintable | |
def | toString |
Return a string representation of the class conveniently. More... | |
def | __str__ |
Return a string representation of the class. More... | |
def | printTo |
Print a string representation of the class to the specified stream. More... | |
Public Member Functions inherited from Library.IO.Streams.IsStreamable | |
def | writeTo |
Write class instance data to the specified stream. More... | |
def | readFrom |
Read class instance data from the specified stream. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Library.Parse.Scan.Tokens.AToken | |
def | fromSource |
Construct a new token based on the next character read from the specified stream. More... | |
A token that represents a numeric value.
As with AWordToken, this class simply accumulates characters from the input stream until it encounters one that is not allowed by the language to be part of a number. It then attempts to convert that string into a numeric value; if it fails to do so, it signals that it has an erroneous number by changing its code()
to TokenType.error.
def Library.Parse.Scan.Tokens.ANumberToken.isInteger | ( | Self | ) |
Determine whether or not the number represented is an integer value.
def Library.Parse.Scan.Tokens.ANumberToken.readFrom | ( | Self, | |
Source | |||
) |
Read the token from the specified stream.
This routine is used to tokenize a text-based input stream.
def Library.Parse.Scan.Tokens.ANumberToken.value | ( | Self | ) |
Retrieve the numeric value of the token.