forked from CakeML/cakeml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tokens.lem
22 lines (22 loc) · 846 Bytes
/
tokens.lem
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
open import Pervasives_extra
(* Tokens for Standard ML. NB, not all of them are used in CakeML *)
type token =
| WhitespaceT of nat | NewlineT | LexErrorT
| HashT | LparT | RparT | StarT | CommaT | ArrowT | DotsT | ColonT | SealT
| SemicolonT | EqualsT | DarrowT | LbrackT | RbrackT | UnderbarT | LbraceT
| BarT | RbraceT | AndT | AndalsoT | AsT | CaseT | DatatypeT
| ElseT | EndT | EqtypeT | ExceptionT | FnT | FunT | HandleT | IfT
| InT | IncludeT | LetT | LocalT | OfT | OpT
| OpenT | OrelseT | RaiseT | RecT | RefT | SharingT | SigT | SignatureT | StructT
| StructureT | ThenT | TypeT | ValT | WhereT | WhileT | WithT | WithtypeT
| IntT of integer
| HexintT of string
| WordT of nat
| RealT of string
| StringT of string
| CharT of char
| TyvarT of string
| AlphaT of string
| SymbolT of string
| LongidT of string * string
| FFIT of string