This commit is contained in:
NikolajDanger
2022-05-15 12:54:29 +02:00
parent 383332077b
commit ba22cff91f
222 changed files with 23320 additions and 0 deletions

17
W2/calculator/AbSyn.fs Normal file
View File

@ -0,0 +1,17 @@
module AbSyn
(* These are the same types as in last week's assignment. *)
type VALUE = INT of int
type BINOP = BPLUS | BMINUS | BTIMES
type RANGEOP = RSUM | RPROD | RMAX | RARGMAX
type EXP =
| CONSTANT of VALUE
| VARIABLE of string
| OPERATE of BINOP * EXP * EXP
| LET_IN of string * EXP * EXP
| OVER of RANGEOP * string * EXP * EXP * EXP