Commit 0f78d719 authored by Benoit Barbot's avatar Benoit Barbot
Browse files

refactor

parent 1e60a2c5
Pipeline #953 failed with stage
in 12 seconds
../editor/Data.ml
\ No newline at end of file
../editor/Data.mli
\ No newline at end of file
../editor/DrawingGeom.ml
\ No newline at end of file
#----------------------------------------------------------------------
# SETTINGS FOR THE ELIOM PROJECT cosmosweb
#----------------------------------------------------------------------
......@@ -9,12 +8,12 @@ PROJECT_NAME := cosmosweb
SERVER_FILES := $(wildcard *.eliomi *.eliom)
# Source files for the client
CLIENT_FILES := $(wildcard *.eliomi *.eliom) graphDrawing.ml utilsWeb.ml SimpleGraph.ml Data.ml TikzGraph.ml MarkovChain.ml layout.ml genericSerializer.ml tikzLexer.ml tikzParser.ml DrawingGeom.ml
CLIENT_FILES := $(wildcard *.eliomi *.eliom) TAGraph.ml
# OCamlfind packages for the server
SERVER_PACKAGES := lwt.ppx js_of_ocaml-ppx.deriving xml-light
# OCamlfind packages for the client
CLIENT_PACKAGES := lwt.ppx js_of_ocaml-ppx js_of_ocaml-ppx.deriving xml-light
CLIENT_PACKAGES := lwt.ppx js_of_ocaml-ppx js_of_ocaml-ppx.deriving xml-light GraphEditor
# Directory with files to be statically served
LOCAL_STATIC = static
......
../editor/SimpleGraph.ml
\ No newline at end of file
......@@ -270,6 +270,8 @@ let print_position outx lexbuf =
let parse_file file add_node add_arc =
let lexbuf = Lexing.from_string file in
try
()
(*
let nodelist,arclist = TikzParser.main TikzLexer.token lexbuf in
let nl = Hashtbl.create 10 in
List.iter (fun (pos,at,name,content) ->
......@@ -283,11 +285,9 @@ let parse_file file add_node add_arc =
| `ControlPoint pos -> `ControlPoint (from_tikz pos)
| `Text t -> `Text t) pl in
add_arc (al,pl2) s2 fin2) arclist
*)
with
| Parsing.Parse_error ->
Printf.fprintf stderr "%a: Parsing error: unexpected token:'%s'\n"
print_position lexbuf (Lexing.lexeme lexbuf);
failwith "Fail to parse Tikz file format"
......@@ -29,8 +29,7 @@ let attribute_div =
[%%client
module GenGraph = GraphDrawing.GraphEditor(SimpleGraph.S(MarkovChain))
module TikzGraph = GraphDrawing.GraphEditor(SimpleGraph.S(TikzGraph))
module TAGraphEd = GraphDrawing.GraphEditor(SimpleGraph.S(TAGraph))
]
......@@ -95,7 +94,6 @@ let () =
(fun () () ->
let _ = [%client
(let editor_state = TikzGraph.init ~%canvas_elt ~%attribute_list_div ~%create_form ~%slider in
TikzGraph.init_client editor_state :unit) ] in
(let editor_state = TAGraphEd.init ~%canvas_elt ~%attribute_list_div ~%create_form ~%slider in
TAGraphEd.init_client editor_state :unit) ] in
Lwt.return (page (graph_editor ())))
../editor/genericSerializer.ml
\ No newline at end of file
../editor/graphDrawing.ml
\ No newline at end of file
../editor/layout.ml
\ No newline at end of file
../editor/utilsWeb.ml
\ No newline at end of file
../editor/vect2d.ml
\ No newline at end of file
../editor/Data.ml
\ No newline at end of file
../editor/Data.mli
\ No newline at end of file
../editor/DrawingGeom.ml
\ No newline at end of file
#----------------------------------------------------------------------
# SETTINGS FOR THE ELIOM PROJECT cosmosweb
#----------------------------------------------------------------------
......@@ -9,12 +8,12 @@ PROJECT_NAME := cosmosweb
SERVER_FILES := $(wildcard *.eliomi *.eliom)
# Source files for the client
CLIENT_FILES := $(wildcard *.eliomi *.eliom) graphDrawing.ml utilsWeb.ml SimpleGraph.ml Data.ml TikzGraph.ml MarkovChain.ml layout.ml genericSerializer.ml tikzLexer.ml tikzParser.ml DrawingGeom.ml
CLIENT_FILES := $(wildcard *.eliomi *.eliom) TikzGraph.ml MarkovChain.ml tikzLexer.ml tikzParser.ml
# OCamlfind packages for the server
SERVER_PACKAGES := lwt.ppx js_of_ocaml-ppx.deriving xml-light
# OCamlfind packages for the client
CLIENT_PACKAGES := lwt.ppx js_of_ocaml-ppx js_of_ocaml-ppx.deriving xml-light
CLIENT_PACKAGES := lwt.ppx js_of_ocaml-ppx js_of_ocaml-ppx.deriving xml-light GraphEditor
# Directory with files to be statically served
LOCAL_STATIC = static
......
../editor/SimpleGraph.ml
\ No newline at end of file
../editor/genericSerializer.ml
\ No newline at end of file
../editor/graphDrawing.ml
\ No newline at end of file
../editor/layout.ml
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment