]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/www/lambdadelta/bin/xhtbl/pass3.ml
planned dehyphenation of lambdadelta eventually took place!
[helm.git] / helm / www / lambdadelta / bin / xhtbl / pass3.ml
diff --git a/helm/www/lambdadelta/bin/xhtbl/pass3.ml b/helm/www/lambdadelta/bin/xhtbl/pass3.ml
new file mode 100644 (file)
index 0000000..4513828
--- /dev/null
@@ -0,0 +1,23 @@
+module A = Array
+
+module M = Matrix
+module C = Css
+
+type status = {
+   m: M.matrix;
+   a: C.atoms;
+}
+
+let initial a m = {
+   m = m; a = a;
+}
+
+let process_cell st y x c =
+   M.set_css st.m y x (C.get_css st.a y x)
+
+let process_row st y row =
+   A.iteri (process_cell st y) row
+
+let process css matrix =
+   let st = initial css matrix in
+   A.iteri (process_row st) matrix.M.m