-
Notifications
You must be signed in to change notification settings - Fork 84
/
tokensScript.sml
35 lines (32 loc) · 1.03 KB
/
tokensScript.sml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
(*
The tokens CakeML concrete syntax.
Some tokens are from Standard ML and not used in CakeML.
*)
open HolKernel Parse boolLib bossLib;
local open integerTheory stringTheory in end;
val _ = new_theory "tokens"
val _ = set_grammar_ancestry ["integer", "string"];
Datatype:
token =
WhitespaceT num | 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 | SharingT | SigT | SignatureT | StructT
| StructureT | ThenT | TypeT | ValT | WhereT | WhileT | WithT | WithtypeT
| IntT int
| HexintT string
| WordT num
| RealT string
| StringT string
| CharT char
| TyvarT string
| AlphaT string
| SymbolT string
| LongidT string string
| FFIT string
| REPLIDT string
End
val _ = export_theory()