Project

General

Profile

« Previous | Next » 

Revision 92aface4

Added by Arnaud Dieumegard over 3 years ago

Removed warnings and solved bug for visitors iterators references between vhdl_ast and mini_vhdl_ast

View differences:

src/backends/VHDL/mini_vhdl_ast_pp.ml
75 75
  ((let open! Ppx_deriving_runtime in
76 76
      fun fmt  ->
77 77
        function
78
        | VarAssign { label = alabel; lhs = alhs; rhs = arhs } ->
78
        | MiniVarAssign { label = alabel; lhs = alhs; rhs = arhs } ->
79 79
            (match alabel with
80 80
              | None -> Format.fprintf fmt "";
81 81
              | Some e -> (((__0 ()) fmt) e;
......
84 84
            ((__1 ()) fmt) alhs;
85 85
            Format.fprintf fmt " := ";
86 86
            ((__2 ()) fmt) arhs;
87
        | SigSeqAssign { label = alabel; lhs = alhs; rhs = arhs } ->
87
        | MiniSigSeqAssign { label = alabel; lhs = alhs; rhs = arhs } ->
88 88
            (match alabel with
89 89
              | None -> Format.fprintf fmt "";
90 90
              | Some e -> (((__3 ()) fmt) e;
......
103 103
                        ((__5 ()) fmt) x;
104 104
                        true) false x);
105 105
            Format.fprintf fmt "@]@]")) arhs;
106
        | SigCondAssign { label = alabel; lhs = alhs; rhs = arhs; delay = adelay } ->
106
        | MiniSigCondAssign { label = alabel; lhs = alhs; rhs = arhs; delay = adelay } ->
107 107
            (match alabel with
108 108
              | None -> Format.fprintf fmt "";
109 109
              | Some e -> (((__6 ()) fmt) e;
......
126 126
                        ((__8 ()) fmt) x;
127 127
                        true) false x);
128 128
            Format.fprintf fmt "@]@]")) arhs;
129
        | SigSelectAssign
129
        | MiniSigSelectAssign
130 130
            { label = alabel; lhs = alhs; sel = asel; branches = abranches;
131 131
              delay = adelay }
132 132
            ->
......
154 154
                        ((__13 ()) fmt) x;
155 155
                        true) false x))) abranches;
156 156
            Format.fprintf fmt ";@]"
157
        | If { label = alabel; if_cases = aif_cases; default = adefault } ->
157
        | MiniIf { label = alabel; if_cases = aif_cases; default = adefault } ->
158 158
            (match alabel with
159 159
              | None -> Format.fprintf fmt "";
160 160
              | Some e -> (((__15 ()) fmt) e;
......
185 185
                          Format.fprintf fmt ";";
186 186
                          true) false x))) adefault));
187 187
            Format.fprintf fmt "@;end if@]"
188
        | Case { label = alabel; guard = aguard; branches = abranches } ->
188
        | MiniCase { label = alabel; guard = aguard; branches = abranches } ->
189 189
            (match alabel with
190 190
              | None -> Format.fprintf fmt "";
191 191
              | Some e -> (((__18 ()) fmt) e;
......
203 203
                          ((__20 ()) fmt) x;
204 204
                          true) false x);)) abranches;
205 205
            Format.fprintf fmt "@;end case@]";
206
        | Exit
206
        | MiniExit
207 207
            { label = alabel; loop_label = aloop_label;
208 208
              condition = acondition }
209 209
            ->
......
221 221
               | Some x ->
222 222
                   (Format.pp_print_string fmt "when@ ";
223 223
                    ((__22 ()) fmt) x;))) acondition;
224
        | Assert
224
        | MiniAssert
225 225
            { label = alabel; cond = acond; report = areport;
226 226
              severity = aseverity }
227 227
            ->
......
244 244
                Format.fprintf fmt "@;severity ";
245 245
                ((__26 ()) fmt) aseverity);
246 246
            Format.fprintf fmt "@]";
247
        | ProcedureCall { label = alabel; name = aname; assocs = aassocs } ->
247
        | MiniProcedureCall { label = alabel; name = aname; assocs = aassocs } ->
248 248
            (match alabel with
249 249
              | None -> Format.fprintf fmt "";
250 250
              | Some e -> (((__27 ()) fmt) e;
......
264 264
                          ((__29 ()) fmt) x;
265 265
                          true) false x))) aassocs;
266 266
               Format.fprintf fmt "@])");
267
        | Wait  -> Format.pp_print_string fmt "wait"
268
        | Null { label = alabel } ->
267
        | MiniWait  -> Format.pp_print_string fmt "wait"
268
        | MiniNull { label = alabel } ->
269 269
            (match alabel with
270 270
              | None -> Format.fprintf fmt "";
271 271
              | Some e -> (((__27 ()) fmt) e;
272 272
                     Format.fprintf fmt ":@ ")
273 273
            );
274 274
            Format.fprintf fmt "null";
275
        | Return { label = alabel; expr = aexpr } ->
275
        | MiniReturn { label = alabel; expr = aexpr } ->
276 276
            (match alabel with
277 277
              | None -> ();
278 278
              | Some a -> (((__28 ()) fmt) a;
......
387 387
  ((let open! Ppx_deriving_runtime in
388 388
      fun fmt  ->
389 389
        function
390
        | VarDecl { names = anames; typ = atyp; init_val = ainit_val } ->
390
        | MiniVarDecl { names = anames; typ = atyp; init_val = ainit_val } ->
391 391
            (Format.fprintf fmt "variable ";
392 392
             ((((fun x  ->
393 393
                    ignore
......
404 404
                | _ ->
405 405
                    (Format.fprintf fmt ":=";
406 406
                     ((__2 ()) fmt) ainit_val;))));)
407
        | CstDecl { names = anames; typ = atyp; init_val = ainit_val } ->
407
        | MiniCstDecl { names = anames; typ = atyp; init_val = ainit_val } ->
408 408
            (Format.fprintf fmt "constant ";
409 409
             ((((fun x  ->
410 410
                    ignore
......
418 418
              ((__4 ()) fmt) atyp;
419 419
              Format.fprintf fmt " := ";
420 420
              ((__5 ()) fmt) ainit_val)))
421
        | SigDecl { names = anames; typ = atyp; init_val = ainit_val } ->
421
        | MiniSigDecl { names = anames; typ = atyp; init_val = ainit_val } ->
422 422
            (Format.fprintf fmt "signal ";
423 423
            ((fun x  ->
424 424
              ignore
......
436 436
              | _ ->
437 437
                  (Format.fprintf fmt ":=";
438 438
                  ((__8 ()) fmt) ainit_val;)))
439
        | ComponentDecl
439
        | MiniComponentDecl
440 440
            { name = aname; generics = agenerics; ports = aports } ->
441 441
            Format.fprintf fmt "@[<v 2>component ";
442 442
            ((__9 ()) fmt) aname;
......
468 468
                            true) false x))) aports;
469 469
                Format.fprintf fmt "@]);");
470 470
            Format.fprintf fmt "@]@;end component";
471
        | Subprogram
471
        | MiniSubprogram
472 472
            { spec = aspec; decl_part = adecl_part; stmts = astmts }
473 473
            ->
474 474
              Format.fprintf fmt "@[<v 2>";
......
663 663
  ((let open! Ppx_deriving_runtime in
664 664
      fun fmt  ->
665 665
        function
666
        | Process a0 ->
666
        | MiniProcess a0 ->
667 667
             ((__0 ()) fmt) a0;
668
        | ComponentInst a0 ->
668
        | MiniComponentInst a0 ->
669 669
             ((__1 ()) fmt) a0;
670 670
    )
671 671
    [@ocaml.warning "-A"])

Also available in: Unified diff