Project

General

Profile

Revision 3769b712 src/tools/stateflow/json-parser/main_parse_json_file.ml

View differences:

src/tools/stateflow/json-parser/main_parse_json_file.ml
48 48
	    Parsing.clear_parser ();
49 49
	    embed_fun content vars
50 50
	  with Parsing.Parse_error ->
51
	    let loc = Location.dummy_loc in
51
	    let loc = Lustrec.Location.dummy_loc in
52 52
	    raise (Parse.Error (loc, Parse.String_Syntax_error actions))
53 53
	)
54 54
    with Util.Type_error _ -> (
......
62 62
      Condition.tru
63 63
      Parser_lustre.expr
64 64
      (fun e (in_,out_,locals_) ->
65
	(* let vars = Corelang.get_expr_vars e in *)
65
	(* let vars = Lustrec.Corelang.get_expr_vars e in *)
66 66
	Condition.cquote {
67 67
	expr =  e;
68 68
	cinputs = in_;
......
129 129
    end) in
130 130
    let module Sem = CPS.Semantics (T) (Model) in
131 131
    let prog = Sem.code_gen modularmode in
132
    let header = List.map Corelang.mktop [
132
    let header = List.map Lustrec.Corelang.mktop [
133 133
      (LustreSpec.Open (false,"lustrec_math"));
134 134
      (LustreSpec.Open (false,"conv"));
135 135
      (LustreSpec.Open (true,"locallib"));
136 136
    ]
137 137
    in
138 138
    let prog =header@prog in
139
    Options.print_dec_types := true;
140
    (* Format.printf "%a@." Printers.pp_prog prog; *)
139
    Lustrec.Options.print_dec_types := true;
140
    (* Format.printf "%a@." Lustrec.Printers.pp_prog prog; *)
141 141

  
142 142
    let auto_file = "sf_gen_test_auto.lus" in (* Could be changed *)
143 143
    let auto_out = open_out auto_file in
144 144
    let auto_fmt = Format.formatter_of_out_channel auto_out in
145
    Format.fprintf auto_fmt "%a@." Printers.pp_prog prog;
145
    Format.fprintf auto_fmt "%a@." Lustrec.Printers.pp_prog prog;
146 146
    Format.eprintf "Print initial lustre model with automaton in sf_gen_test_auto.lus@.";
147 147
    
148 148
    let prog, deps = Compiler_stages.stage1 prog "" "" in
149 149

  
150
    (* Format.printf "%a@." Printers.pp_prog prog; *)
150
    (* Format.printf "%a@." Lustrec.Printers.pp_prog prog; *)
151 151
    let noauto_file = "sf_gen_test_noauto.lus" in (* Could be changed *)
152 152
    let noauto_out = open_out noauto_file in
153 153
    let noauto_fmt = Format.formatter_of_out_channel noauto_out in
154
    Format.fprintf noauto_fmt "%a@." Printers.pp_prog prog;
154
    Format.fprintf noauto_fmt "%a@." Lustrec.Printers.pp_prog prog;
155 155
    Format.eprintf "Print expanded lustre model in sf_gen_test_noauto.lus@.";
156 156
    ()
157 157

  
158
  with Parse.Error (l, err) -> Format.eprintf "Parse error at loc %a : %a@.@?" Location.pp_loc l Parse.pp_error err
158
  with Parse.Error (l, err) -> Format.eprintf "Parse error at loc %a : %a@.@?" Lustrec.Location.pp_loc l Parse.pp_error err
159 159

  
160 160
(* term representing argument for file *)
161 161
let file =

Also available in: Unified diff