Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Data.TI85.Token
Description
As a kind of object file or byte code, TI-85 programs can be represented as list of tokens.
The contents of this module describe the possible tokens, and a way to convert from byte to token.
Synopsis
- data TokenDef
- = Invalid
- | Fixed Text
- | QuoteText
- | NameLength
- | FixedLength Int
- | Extended
- | Conversion
- | Literal
- | Label
- | Goto
- tokenTable :: Array Word8 TokenDef
- tokenTableExtended :: Array Word8 TokenDef
Documentation
There are several types of tokens. Most come with some instructions for what do to with the bytes following the token.
Constructors
Invalid | |
Fixed Text | Representation of specific text |
QuoteText | Quoted string |
NameLength | A string specified by length |
FixedLength Int | A fixed-length string |
Extended | Look up the next token in the extended token table |
Conversion | Unit conversion |
Literal | Literal value, represented as text |
Label | Lbl, with a text label |
Goto | Goto, with a text label |