Enum ApplesoftKeyword
- java.lang.Object
-
- java.lang.Enum<ApplesoftKeyword>
-
- io.github.applecommander.bastools.api.model.ApplesoftKeyword
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ApplesoftKeyword>
public enum ApplesoftKeyword extends java.lang.Enum<ApplesoftKeyword>
All elements of AppleSoft that are tokenized in some manner. "Keyword" was picked as it is not the word token. ;-)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ABSaddampANDASCATATNCALLCHRCLEARCOLORCONTCOSDATADEFDELDIMdivDRAWENDeqEXPFLASHFNFORFREGETGOSUBGOTOGRgtHCOLORHGRHGR2HIMEMHLINHOMEHPLOTHTABIFININPUTINTINVERSELEFTLENLETLISTLOADLOGLOMEMltMIDmulNEWNEXTNORMALNOTNOTRACEONONERRORPDLPEEKPLOTPOKEPOPPOSpowPRPRINTquestionmarkREADRECALLREMRESTORERESUMERETURNRIGHTRNDROTRUNSAVESCALESCRNSGNSHLOADSINSPCSPEEDSQRSTEPSTOPSTORESTRsubTABTANTEXTTHENTOTRACEUSRVALVLINVTABWAITXDRAW
-
Field Summary
Fields Modifier and Type Field Description intcodeThe AppleSoft token value.booleanneedsRParenIndicates that this needs _just_ a closing right parenthesis since the opening left parenthesis is included in the tokenjava.util.List<java.lang.String>partsToken parts as seen by the StreamTokenizer.java.lang.StringtextFull text of the token.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequalsIgnoreCase(java.lang.String value)static java.util.Optional<ApplesoftKeyword>find(java.lang.String value)Utility method to locate a keyword ignoring case.static java.io.StreamTokenizertokenizer(java.io.Reader r)Utility method to create a shared definition for AppleSoft file parsing.java.lang.StringtoString()static ApplesoftKeywordvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ApplesoftKeyword[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
END
public static final ApplesoftKeyword END
-
FOR
public static final ApplesoftKeyword FOR
-
NEXT
public static final ApplesoftKeyword NEXT
-
DATA
public static final ApplesoftKeyword DATA
-
INPUT
public static final ApplesoftKeyword INPUT
-
DEL
public static final ApplesoftKeyword DEL
-
DIM
public static final ApplesoftKeyword DIM
-
READ
public static final ApplesoftKeyword READ
-
GR
public static final ApplesoftKeyword GR
-
TEXT
public static final ApplesoftKeyword TEXT
-
PR
public static final ApplesoftKeyword PR
-
IN
public static final ApplesoftKeyword IN
-
CALL
public static final ApplesoftKeyword CALL
-
PLOT
public static final ApplesoftKeyword PLOT
-
HLIN
public static final ApplesoftKeyword HLIN
-
VLIN
public static final ApplesoftKeyword VLIN
-
HGR2
public static final ApplesoftKeyword HGR2
-
HGR
public static final ApplesoftKeyword HGR
-
HCOLOR
public static final ApplesoftKeyword HCOLOR
-
HPLOT
public static final ApplesoftKeyword HPLOT
-
DRAW
public static final ApplesoftKeyword DRAW
-
XDRAW
public static final ApplesoftKeyword XDRAW
-
HTAB
public static final ApplesoftKeyword HTAB
-
HOME
public static final ApplesoftKeyword HOME
-
ROT
public static final ApplesoftKeyword ROT
-
SCALE
public static final ApplesoftKeyword SCALE
-
SHLOAD
public static final ApplesoftKeyword SHLOAD
-
TRACE
public static final ApplesoftKeyword TRACE
-
NOTRACE
public static final ApplesoftKeyword NOTRACE
-
NORMAL
public static final ApplesoftKeyword NORMAL
-
INVERSE
public static final ApplesoftKeyword INVERSE
-
FLASH
public static final ApplesoftKeyword FLASH
-
COLOR
public static final ApplesoftKeyword COLOR
-
POP
public static final ApplesoftKeyword POP
-
VTAB
public static final ApplesoftKeyword VTAB
-
HIMEM
public static final ApplesoftKeyword HIMEM
-
LOMEM
public static final ApplesoftKeyword LOMEM
-
ONERR
public static final ApplesoftKeyword ONERR
-
RESUME
public static final ApplesoftKeyword RESUME
-
RECALL
public static final ApplesoftKeyword RECALL
-
STORE
public static final ApplesoftKeyword STORE
-
SPEED
public static final ApplesoftKeyword SPEED
-
LET
public static final ApplesoftKeyword LET
-
GOTO
public static final ApplesoftKeyword GOTO
-
RUN
public static final ApplesoftKeyword RUN
-
IF
public static final ApplesoftKeyword IF
-
RESTORE
public static final ApplesoftKeyword RESTORE
-
amp
public static final ApplesoftKeyword amp
-
GOSUB
public static final ApplesoftKeyword GOSUB
-
RETURN
public static final ApplesoftKeyword RETURN
-
REM
public static final ApplesoftKeyword REM
-
STOP
public static final ApplesoftKeyword STOP
-
ON
public static final ApplesoftKeyword ON
-
WAIT
public static final ApplesoftKeyword WAIT
-
LOAD
public static final ApplesoftKeyword LOAD
-
SAVE
public static final ApplesoftKeyword SAVE
-
DEF
public static final ApplesoftKeyword DEF
-
POKE
public static final ApplesoftKeyword POKE
-
PRINT
public static final ApplesoftKeyword PRINT
-
questionmark
public static final ApplesoftKeyword questionmark
-
CONT
public static final ApplesoftKeyword CONT
-
LIST
public static final ApplesoftKeyword LIST
-
CLEAR
public static final ApplesoftKeyword CLEAR
-
GET
public static final ApplesoftKeyword GET
-
NEW
public static final ApplesoftKeyword NEW
-
TAB
public static final ApplesoftKeyword TAB
-
TO
public static final ApplesoftKeyword TO
-
FN
public static final ApplesoftKeyword FN
-
SPC
public static final ApplesoftKeyword SPC
-
THEN
public static final ApplesoftKeyword THEN
-
AT
public static final ApplesoftKeyword AT
-
NOT
public static final ApplesoftKeyword NOT
-
STEP
public static final ApplesoftKeyword STEP
-
add
public static final ApplesoftKeyword add
-
sub
public static final ApplesoftKeyword sub
-
mul
public static final ApplesoftKeyword mul
-
div
public static final ApplesoftKeyword div
-
pow
public static final ApplesoftKeyword pow
-
AND
public static final ApplesoftKeyword AND
-
OR
public static final ApplesoftKeyword OR
-
gt
public static final ApplesoftKeyword gt
-
eq
public static final ApplesoftKeyword eq
-
lt
public static final ApplesoftKeyword lt
-
SGN
public static final ApplesoftKeyword SGN
-
INT
public static final ApplesoftKeyword INT
-
ABS
public static final ApplesoftKeyword ABS
-
USR
public static final ApplesoftKeyword USR
-
FRE
public static final ApplesoftKeyword FRE
-
SCRN
public static final ApplesoftKeyword SCRN
-
PDL
public static final ApplesoftKeyword PDL
-
POS
public static final ApplesoftKeyword POS
-
SQR
public static final ApplesoftKeyword SQR
-
RND
public static final ApplesoftKeyword RND
-
LOG
public static final ApplesoftKeyword LOG
-
EXP
public static final ApplesoftKeyword EXP
-
COS
public static final ApplesoftKeyword COS
-
SIN
public static final ApplesoftKeyword SIN
-
TAN
public static final ApplesoftKeyword TAN
-
ATN
public static final ApplesoftKeyword ATN
-
PEEK
public static final ApplesoftKeyword PEEK
-
LEN
public static final ApplesoftKeyword LEN
-
STR
public static final ApplesoftKeyword STR
-
VAL
public static final ApplesoftKeyword VAL
-
ASC
public static final ApplesoftKeyword ASC
-
CHR
public static final ApplesoftKeyword CHR
-
LEFT
public static final ApplesoftKeyword LEFT
-
RIGHT
public static final ApplesoftKeyword RIGHT
-
MID
public static final ApplesoftKeyword MID
-
-
Field Detail
-
code
public final int code
The AppleSoft token value. Token is overloaded, so "code" is good enough.
-
text
public final java.lang.String text
Full text of the token.
-
parts
public final java.util.List<java.lang.String> parts
Token parts as seen by the StreamTokenizer.
-
needsRParen
public boolean needsRParen
Indicates that this needs _just_ a closing right parenthesis since the opening left parenthesis is included in the token
-
-
Method Detail
-
values
public static ApplesoftKeyword[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ApplesoftKeyword c : ApplesoftKeyword.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ApplesoftKeyword valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
equalsIgnoreCase
public boolean equalsIgnoreCase(java.lang.String value)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Enum<ApplesoftKeyword>
-
tokenizer
public static java.io.StreamTokenizer tokenizer(java.io.Reader r)
Utility method to create a shared definition for AppleSoft file parsing.
-
find
public static java.util.Optional<ApplesoftKeyword> find(java.lang.String value)
Utility method to locate a keyword ignoring case.
-
-