change BNF (but not implementation of BNF) for parsing, to handle layers, and also change minimum key in layer tree to be 1
This commit is contained in:
@@ -2,9 +2,11 @@ structure LayerTree =
|
||||
struct
|
||||
datatype t = NODE of {key: int, value: Grid.t, left: t, right: t} | LEAF
|
||||
|
||||
val minKey = 1
|
||||
|
||||
fun init maxSide =
|
||||
let val grid = Grid.makeEmpty maxSide
|
||||
in NODE {key = 0, value = grid, left = LEAF, right = LEAF}
|
||||
in NODE {key = minKey, value = grid, left = LEAF, right = LEAF}
|
||||
end
|
||||
|
||||
fun insert (newKey, newValue, tree) =
|
||||
|
||||
Reference in New Issue
Block a user