Project

General

Profile

« Previous | Next » 

Revision 9d3bcc89

Added by Pierre-Loïc Garoche 3 months ago

Adapted json-parser from stateflow tool to the new signatures

View differences:

src/tools/stateflow/common/datatype.ml
39 39
  | Junction of junction_name_t * transitions_t
40 40
  | SFFunction of 'prog_t
41 41

  
42
type prog_t = Program of state_name_t * prog_t src_components_t list * (Lustre_types.var_decl * Lustre_types.expr) list
42
type prog_t = Program of state_name_t * prog_t src_components_t list * GlobalVarDef.t list
43 43

  
44 44
type scope_t = Constant | Input | Local | Output | Parameter
45 45

  
......
152 152

  
153 153
  let pp_vars fmt src =
154 154
    Format.fprintf fmt "@[<v>%a@ @]"
155
      (Utils.fprintf_list ~sep:"@ " Printers.pp_var)
155
      (Utils.fprintf_list ~sep:"@ " (fun fmt globvar -> Printers.pp_var fmt globvar.GlobalVarDef.variable))
156 156
    src
157 157

  
158 158
  let pp_prog fmt (Program (name, component_list, vars)) =
159 159
    Format.fprintf fmt "Main node name: %s@ %a@ %a@"
160 160
      name
161 161
      (pp_src pp_sffunction) component_list
162
      pp_vars (List.map fst vars)
162
      pp_vars vars
163 163

  
164 164
  let pp_scope fmt src =
165 165
    Format.fprintf fmt (match src with

Also available in: Unified diff