Project

General

Profile

« Previous | Next » 

Revision 21485807

Added by Xavier Thirioux almost 11 years ago

- added struct types declaration
- added constant definition with a struct type
- added checking for multiple definitions of nodes (behavior was buggy)
- better and more uniform error messages
for undefined/already defined symbols

We still need struct expressions...

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

View differences:

src/corelang.ml
149 149
    Main_not_found
150 150
  | Main_wrong_kind
151 151
  | No_main_specified
152
  | Unbound_symbol of ident
153
  | Already_bound_symbol of ident
152 154

  
155
exception Error of error * Location.t
153 156

  
154 157
module VDeclModule =
155 158
struct (* Node module *)
......
230 233

  
231 234

  
232 235
(***********************************************************)
233
exception Error of error
234
exception Unbound_type of type_dec_desc*Location.t
235
exception Already_bound_label of label*type_dec_desc*Location.t
236

  
237 236
(* Fast access to nodes, by name *)
238 237
let (node_table : (ident, top_decl) Hashtbl.t) = Hashtbl.create 30
239 238
let consts_table = Hashtbl.create 30
......
729 728
      !Options.main_node
730 729
  | No_main_specified ->
731 730
    fprintf fmt "No main node specified@."
731
  | Unbound_symbol sym ->
732
    fprintf fmt
733
      "%s is undefined.@."
734
      sym
735
  | Already_bound_symbol sym -> 
736
    fprintf fmt
737
      "%s is already defined.@."
738
      sym
732 739

  
733 740
(* filling node table with internal functions *)
734 741
let vdecls_of_typ_ck cpt ty =

Also available in: Unified diff