Project

General

Profile

« Previous | Next » 

Revision 7291cb80

Added by Xavier Thirioux over 9 years ago

- merged test script
- added -d support
- corrected #open parser problem
- corrected interface/implementation (.lusi/.lus) checking
for types (not yet for clocks)

git-svn-id: https://cavale.enseeiht.fr/svn/lustrec/lustre_compiler/trunk@171 041b043f-8d7c-46b2-b46e-ef0dd855326e

View differences:

src/types.ml
96 96
  | Tunivar ->
97 97
    fprintf fmt "'%s" (name_of_type ty.tid)
98 98

  
99
let rec print_node_ty fmt ty =
100
  match ty.tdesc with
101
  | Tint ->
102
    fprintf fmt "int"
103
  | Treal ->
104
    fprintf fmt "real"
105
  | Tbool ->
106
    fprintf fmt "bool"
107
  | Tclock t ->
108
    fprintf fmt "%a clock" print_ty t
109
  | Tstatic (_, t) ->
110
    fprintf fmt "%a" print_node_ty t
111
  | Tconst t ->
112
    fprintf fmt "%s" t
113
  | Trat ->
114
    fprintf fmt "rat"
115
  | Tarrow (ty1,ty2) ->
116
    fprintf fmt "%a->%a" print_ty ty1 print_ty ty2
117
  | Ttuple tylist ->
118
    fprintf fmt "(%a)"
119
      (Utils.fprintf_list ~sep:"*" print_ty) tylist
120
  | Tenum taglist ->
121
    fprintf fmt "(%a)"
122
      (Utils.fprintf_list ~sep:" + " pp_print_string) taglist
123
  | Tarray (e, ty) ->
124
    fprintf fmt "%a^%a" print_ty ty Dimension.pp_dimension e
125
  | Tlink ty ->
126
      print_ty fmt ty
127
  | Tunivar ->
128
    fprintf fmt "'%s" (name_of_type ty.tid)
129
  | _   -> assert false
130

  
99 131
let pp_error fmt = function
100 132
  | Unbound_value id ->
101 133
    fprintf fmt "Unknown value %s@." id

Also available in: Unified diff