java.lang.Object
simula.compiler.utilities.Token
- All Implemented Interfaces:
Externalizable
,Serializable
Utility class Token.
Link to GitHub: Source File.
- Author:
- Øystein Myhre Andersen
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The style codes used by Simula Editor. -
Field Summary
-
Constructor Summary
ConstructorDescriptionToken()
The default constructor used by Externalization.Create a new Token.Create a new Token.Create a new Token.Create a new Token. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get this Token's value string.Get this Token's keyword attribute.int
Get this Token's keyword code.Returns the style code for this Token's keyword.getText()
Get this Token's text attribute.getValue()
Get this Token's value attribute.void
readExternal
(ObjectInput inpt) void
Set this Token's text attribute.toString()
void
writeExternal
(ObjectOutput oupt)
-
Field Details
-
text
The Token's text attribute -
keyWord
The Token's keyWord attribute -
value
The Token's value attribute -
lineNumber
public int lineNumberThe Token's line number -
lineNumberBeforeScanBasic
public static int lineNumberBeforeScanBasicThe line number before scan basic.
-
-
Constructor Details
-
Token
Create a new Token.- Parameters:
text
- the Token's text attributekeyWord
- the Token's keyword attributevalue
- the Token's value attribute
-
Token
Create a new Token.- Parameters:
text
- the Token's text attributekeyWord
- the Token's keyword attribute
-
Token
Create a new Token.- Parameters:
keyWord
- the Token's keyword attributevalue
- the Token's value attribute
-
Token
Create a new Token.- Parameters:
keyWord
- the Token's keyword attribute
-
Token
public Token()The default constructor used by Externalization.
-
-
Method Details
-
setText
Set this Token's text attribute.- Parameters:
text
- new text attribute
-
getText
Get this Token's text attribute.- Returns:
- this Token's text attribute
-
getStyleCode
Returns the style code for this Token's keyword.- Returns:
- the style code for this Token's keyword
-
getKeyWord
Get this Token's keyword attribute.- Returns:
- this Token's keyword attribute
-
getKeyWordCode
public int getKeyWordCode()Get this Token's keyword code.- Returns:
- this Token's keyword code
-
getValue
Get this Token's value attribute.- Returns:
- this Token's value attribute
-
getIdentifier
Get this Token's value string.- Returns:
- this Token's value string
-
equals
-
toString
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-