Package | Description |
---|---|
slogo | |
slogo.parser.token |
Modifier and Type | Method and Description |
---|---|
Token |
SLogoInterpreter.getToken()
returns the current token, doesn't fetch a new one
|
Token |
SLogoInterpreter.match(Token rhs)
try to match a token, if unsuccessful throw an exception, otherwise match
succeeds, and next token is obtained and returned
|
Token |
SLogoInterpreter.nextToken()
get the next token and store it for retrieval by getToken()
|
Modifier and Type | Method and Description |
---|---|
void |
SLogoInterpreter.error(Token t) |
Token |
SLogoInterpreter.match(Token rhs)
try to match a token, if unsuccessful throw an exception, otherwise match
succeeds, and next token is obtained and returned
|
Modifier and Type | Class and Description |
---|---|
class |
AssignmentToken
Represents the assignment token ("=")
|
class |
CharToken
A token represented by a single character, e.g., '*', ';', '[' and
so on; the method equals compares a CharToken as equal to another CharToken
encapsulating the same character.
|
class |
EOFToken
This represents an end-of-file token Uses the singleton pattern since there's
no reason to have more than one such token.
|
class |
EOLToken
This represents an end-of-line token.
|
class |
EqualToken
Represents = token
|
class |
IdentifierToken
Represents an identifier (a variable name)
|
class |
LeftBracketToken
Represents a left bracket
|
class |
LeftParenToken
Represents a left parenthesis
|
class |
NumberToken
Represents a number (using doubles).
|
class |
PrintToken
Represents the PRINT instruction token
|
class |
RepeatToken
Represents a REPEAT instruction token
|
class |
ReservedToken
Represents a reserved word
|
class |
RightBracketToken
Represents a right bracket
|
class |
RightParenToken
Represents a right parenthesis
|
class |
VariableToken
Represents a variable
|
Modifier and Type | Method and Description |
---|---|
static Token |
TokenFactory.parse(java.io.StreamTokenizer tokenizer) |