diff --git a/src/TODO b/src/TODO index c1fba1cacbca36230adffa7411a5aa1666319994..66d2017b499babecc56e74a5649805d38bc454cc 100644 --- a/src/TODO +++ b/src/TODO @@ -32,6 +32,9 @@ parce que dans lazyCompile.ml, ca s'appele "do_node" ... du genre "[int,int]" voire meme "[int,real]" qui ne sont plus autorisé, mais à qui on pourrait donner du sens via des tableaux et des structures factices +* s'inspirer de JB pour faire le menage dans les items + (op,const,type) predefinis ; les tabuler à la place. + * "extern", "unsafe", and "memoryless" annotations Rajouter ces 3 mots clefs dans la syntaxe. diff --git a/src/compiledData.ml b/src/compiledData.ml index 01a1f01bccebe7c0475f3b53f36c86416ae0cf1e..bd35953671754d5beb65a953c7fea5521b547dcd 100644 --- a/src/compiledData.ml +++ b/src/compiledData.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 07/02/2008 (at 11:24) by Erwan Jahier> *) +(** Time-stamp: <modified the 07/02/2008 (at 15:01) by Erwan Jahier> *) (** @@ -250,7 +250,7 @@ Type : node_half_eff correspond à un noeud half-checked : on conserve simplement la node_info (on pourra sophistiquer plus tard) ----------------------------------------------------------------------*) -and node_half_eff = SyntaxTreeCore.node_info srcflagged +and node_half_eff = SyntaxTreeCore.user_node_info srcflagged (*--------------------------------------------------------------------- Type : node_eff ----------------------------------------------------------------------- diff --git a/src/expandPack.ml b/src/expandPack.ml index 4b016148dccedcca69813871c80dd9dc38abc4d7..73bc7c0b322fa968b553b4f43079896797048d18 100644 --- a/src/expandPack.ml +++ b/src/expandPack.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 07/02/2008 (at 11:25) by Erwan Jahier> *) +(** Time-stamp: <modified the 07/02/2008 (at 15:32) by Erwan Jahier> *) open Lxm open SyntaxTree @@ -28,7 +28,7 @@ let (doit: (* On part du packbody du modèle, dont on duplique les tables :*) let ctab = Hashtbl.copy mi.it.mo_body.pk_const_table in let ttab = Hashtbl.copy mi.it.mo_body.pk_type_table in - let otab = Hashtbl.copy mi.it.mo_body.pk_oper_table in + let otab = Hashtbl.copy mi.it.mo_body.pk_node_table in (* liste des nouveaux define ... *) let newdefs = ref [] in (* liste des nouveaux provides ... *) @@ -91,11 +91,11 @@ let (doit: | _ -> instance_error () in let ni = Node { - ni_name = s; - ni_staticlist = [] ; - ni_value = NodeAlias (Some(inl,outl), ne) ; + uname = s; + static_args = [] ; + def = NodeAlias (Some(inl,outl), ne) ; } in - let x = Lxm.flagit (OperInfo ni) p.src in + let x = Lxm.flagit (NodeInfo ni) p.src in newprov := x::!newprov ; let y = Lxm.flagit ni p.src in put_in_tab "node" otab s y ; @@ -109,7 +109,7 @@ let (doit: let body = { pk_const_table = ctab ; pk_type_table = ttab ; - pk_oper_table = otab ; + pk_node_table = otab ; pk_def_list = List.append (mi.it.mo_body.pk_def_list) (List.rev !newdefs) diff --git a/src/lazyCompiler.ml b/src/lazyCompiler.ml index 9228173e6cebc021bb5cc45783a0758681970f88..eeef7b5b4ac70779762ca24c7a585018b48e4777 100644 --- a/src/lazyCompiler.ml +++ b/src/lazyCompiler.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 07/02/2008 (at 11:25) by Erwan Jahier> *) +(** Time-stamp: <modified the 07/02/2008 (at 15:22) by Erwan Jahier> *) open Lxm @@ -415,13 +415,13 @@ and (const_check_do : t -> Ident.long -> Lxm.t -> SymbolTab.t -> Ident.pack_name (******************************************************************************) let (node_check_interface_do: t -> CompiledData.node_key -> Lxm.t -> SymbolTab.t -> - Ident.pack_name -> SyntaxTreeCore.oper_info srcflagged -> + Ident.pack_name -> SyntaxTreeCore.node_info srcflagged -> CompiledData.node_eff) = fun this nk lxm symbols pack_name node_def -> assert false let (node_check_do: t -> CompiledData.node_key -> Lxm.t -> SymbolTab.t -> - Ident.pack_name -> SyntaxTreeCore.oper_info srcflagged -> + Ident.pack_name -> SyntaxTreeCore.node_info srcflagged -> CompiledData.node_eff) = fun this nk lxm symbols pack_name node_def -> (* @@ -444,12 +444,12 @@ let (node_check_do: t -> CompiledData.node_key -> Lxm.t -> SymbolTab.t -> nf_out_formal_clocks = ocl; } - | Func func_info -> + | ExtNode enode_info -> assert false let (node_check: t -> CompiledData.node_key -> Lxm.t -> CompiledData.node_eff) = fun this nk -> - x_check this.nodes SymbolTab.find_oper node_check_do lookup_node_eff + x_check this.nodes SymbolTab.find_node node_check_do lookup_node_eff (fun nk -> Ident.pack_of_long (fst nk)) (fun nk -> Ident.of_long (fst nk)) this nk @@ -457,7 +457,7 @@ let (node_check: t -> CompiledData.node_key -> Lxm.t -> CompiledData.node_eff) = let (node_check_interface: t -> CompiledData.node_key -> Lxm.t -> CompiledData.node_eff) = fun this nk -> - x_check_interface this.nodes SymbolTab.find_oper node_check + x_check_interface this.nodes SymbolTab.find_node node_check node_check_interface_do lookup_node_eff (fun nk -> Ident.pack_of_long (fst nk)) (fun nk -> Ident.of_long (fst nk)) this nk diff --git a/src/parser.mly b/src/parser.mly index 11ab1ed1eef93fb17b44056983644d3cfd0f5df6..9a3bfda34da8b31fc0c562a5cf5daabdc512fcfe 100644 --- a/src/parser.mly +++ b/src/parser.mly @@ -134,11 +134,11 @@ let treat_struct_type def_list := (TypeItem typstr) :: !def_list ) -(*************************************) -(* Traitement d'une function externe *) -(*************************************) -let treat_external_func - (funclxm : Lxm.t) (* le lexeme de la func *) +(*********************************) +(* Traitement d'un noeud externe *) +(*********************************) +let treat_external_node + (ext_nodelxm : Lxm.t) (inpars : ((Lxm.t list) * type_exp) list) (* liste des ins *) (outpars : ((Lxm.t list) * type_exp) list) (* liste des outs *) = (* sortie: unit *) @@ -155,16 +155,16 @@ let treat_external_func let flat_ins = ParserUtils.flat_flagged_list inpars make_a_param in (* fabrique la liste à plat des outputs *) let flat_outs = ParserUtils.flat_flagged_list outpars make_a_param in - (* fabrique le func_info *) - let funcstr = Lxm.id funclxm in - let finfo = { - fn_name = funcstr; - fn_inpars = flat_ins; - fn_outpars = flat_outs + (* fabrique le extern_node_info *) + let ext_nodestr = Lxm.id ext_nodelxm in + let en_info = { + ename = ext_nodestr; + inputs = flat_ins; + outputs = flat_outs } in (* range l'info correspondante dans la table des oper *) - SyntaxTree.add_info oper_table "function or node" funclxm (Func finfo) ; - def_list := (OperItem funcstr) :: !def_list + SyntaxTree.add_info oper_table "(extern) node" ext_nodelxm (ExtNode en_info) ; + def_list := (OperItem ext_nodestr) :: !def_list ) (********************************************) @@ -256,12 +256,12 @@ let treat_node_decl } in let nstr = Lxm.id nlxm in let ninfo = { - ni_name = nstr; - ni_staticlist = statics; - ni_value = nval + uname = nstr; + static_args = statics; + def = nval } in (* On met le tout dans la table des oper *) - SyntaxTree.add_info oper_table "function or node" nlxm (Node (ninfo)) ; + SyntaxTree.add_info oper_table "(extern) node" nlxm (Node (ninfo)) ; def_list := (OperItem nstr) :: !def_list ) let treat_node_alias @@ -273,11 +273,11 @@ let treat_node_alias ( let nstr = Lxm.id nlxm in let ninfo = { - ni_name = nstr; - ni_staticlist = statics; - ni_value = NodeAlias (dyn, value) + uname = nstr; + static_args = statics; + def = NodeAlias (dyn, value) } in - SyntaxTree.add_info oper_table "function or node" nlxm (Node (ninfo)) ; + SyntaxTree.add_info oper_table "(extern) node" nlxm (Node (ninfo)) ; def_list := (OperItem nstr) :: !def_list ) @@ -501,12 +501,12 @@ sxOneProvide: let invars = clocked_ids_to_var_infos VarInput $3 in let outvars = clocked_ids_to_var_infos VarOutput $5 in let xn = Node { - ni_name = Lxm.id $2 ; - ni_staticlist = []; - ni_value = NodeExtern (invars, outvars); + uname = Lxm.id $2 ; + static_args = []; + def = NodeExtern (invars, outvars); } in Lxm.flagit - (OperInfo xn) + (NodeInfo xn) $2 } /* type abstrait ... */ @@ -658,7 +658,7 @@ sxOneDecl: { } | sxTypeDecl { } - | sxFuncDecl + | sxExtNodeDecl { } | sxNodeDecl { } @@ -798,14 +798,14 @@ sxType: /* fonctions */ -sxFuncDecl: - TK_FUNCTION sxIdent sxFunParam TK_RETURNS sxFunParam sxOptSemicol +sxExtNodeDecl: + TK_FUNCTION sxIdent sxExtNodeParam TK_RETURNS sxExtNodeParam sxOptSemicol /* WARNING ! il faut remettre les listes à l'endroit */ - { treat_external_func $2 (List.rev $3) (List.rev $5) } + { treat_external_node $2 (List.rev $3) (List.rev $5) } ; -sxFunParam: TK_OPEN_PAR sxTypedIdentsList TK_CLOSE_PAR +sxExtNodeParam: TK_OPEN_PAR sxTypedIdentsList TK_CLOSE_PAR { $2 } | TK_OPEN_PAR sxTypedIdentsList TK_SEMICOL TK_CLOSE_PAR { $2 } diff --git a/src/symbolTab.ml b/src/symbolTab.ml index bdf9958e07de58f5b7cfa870b29cb834e10775db..e826886c0cb38550f0e925bbd727fad1049af2e4 100644 --- a/src/symbolTab.ml +++ b/src/symbolTab.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 07/02/2008 (at 11:26) by Erwan Jahier> *) +(** Time-stamp: <modified the 07/02/2008 (at 15:22) by Erwan Jahier> *) (* Sous-module pour SyntaxTab @@ -15,14 +15,14 @@ type 'a hereflagged = type t = { st_consts: (Ident.t , (const_info srcflagged) hereflagged) Hashtbl.t ; st_types : (Ident.t , (type_info srcflagged) hereflagged) Hashtbl.t ; - st_opers : (Ident.t , (oper_info srcflagged) hereflagged) Hashtbl.t ; + st_nodes : (Ident.t , (node_info srcflagged) hereflagged) Hashtbl.t ; } (* Création/initialisation d'une symbol_tab *) let create () = { st_consts = Hashtbl.create 50; st_types = Hashtbl.create 50; - st_opers = Hashtbl.create 50; + st_nodes = Hashtbl.create 50; } let find_type (this: t) (id: Ident.t) = ( @@ -41,9 +41,9 @@ let find_const (this: t) (id: Ident.t) = ( assert false ) -let find_oper (this: t) (id: Ident.t) = ( +let find_node (this: t) (id: Ident.t) = ( try - Hashtbl.find (this.st_opers) id + Hashtbl.find (this.st_nodes) id with Not_found -> print_string ("*** unknown operator "^(Ident.to_string id)^"\n"); assert false @@ -58,8 +58,8 @@ let add_import_type (this: t) (id: Ident.t) (aid: Ident.long) = ( Hashtbl.replace (this.st_types) id (NotHere aid) ) -let add_import_oper (this: t) (id: Ident.t) (aid: Ident.long) = ( - Hashtbl.replace (this.st_opers) id (NotHere aid) +let add_import_node (this: t) (id: Ident.t) (aid: Ident.long) = ( + Hashtbl.replace (this.st_nodes) id (NotHere aid) ) let add_const (this: t) (n: Ident.t) (cix: const_info srcflagged) = ( @@ -83,13 +83,13 @@ let add_type (this: t) (n: Ident.t) (tix: type_info srcflagged) = ( | _ -> () ) -let add_oper (this: t) (n: Ident.t) (oix: oper_info srcflagged) = ( - Hashtbl.add this.st_opers n (Here oix) +let add_node (this: t) (n: Ident.t) (oix: node_info srcflagged) = ( + Hashtbl.add this.st_nodes n (Here oix) ) let iter_types this f = ( Hashtbl.iter f this.st_types) let iter_consts this f = ( Hashtbl.iter f this.st_consts) -let iter_opers this f = ( Hashtbl.iter f this.st_opers) +let iter_nodes this f = ( Hashtbl.iter f this.st_nodes) let dump this = ( (* A FAIRE (si besoin ...) *) diff --git a/src/symbolTab.mli b/src/symbolTab.mli index d8ed29f49c606382d6850afcf8ab2795d2fec6dc..a3271ff13e0a48c8acc9eabaeb8b62356abecefe 100644 --- a/src/symbolTab.mli +++ b/src/symbolTab.mli @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 07/02/2008 (at 11:27) by Erwan Jahier> *) +(** Time-stamp: <modified the 07/02/2008 (at 15:21) by Erwan Jahier> *) (********************************************************** Sous-module pour SyntaxTab @@ -26,17 +26,17 @@ val create : unit -> t (* Recherche d'items *) val find_type : t -> Ident.t -> (SyntaxTreeCore.type_info Lxm.srcflagged) hereflagged val find_const : t -> Ident.t -> (SyntaxTreeCore.const_info Lxm.srcflagged) hereflagged -val find_oper : t -> Ident.t -> (SyntaxTreeCore.oper_info Lxm.srcflagged) hereflagged +val find_node : t -> Ident.t -> (SyntaxTreeCore.node_info Lxm.srcflagged) hereflagged (* Ajout de nom d'item importés (via uses) *) val add_import_const : t -> Ident.t -> Ident.long -> unit val add_import_type : t -> Ident.t -> Ident.long -> unit -val add_import_oper : t -> Ident.t -> Ident.long -> unit +val add_import_node : t -> Ident.t -> Ident.long -> unit (** Add local items declaration *) val add_type : t -> Ident.t -> SyntaxTreeCore.type_info Lxm.srcflagged -> unit val add_const : t -> Ident.t -> SyntaxTreeCore.const_info Lxm.srcflagged -> unit -val add_oper : t -> Ident.t -> SyntaxTreeCore.oper_info Lxm.srcflagged -> unit +val add_node : t -> Ident.t -> SyntaxTreeCore.node_info Lxm.srcflagged -> unit (* Itérer sur les items *) @@ -44,8 +44,8 @@ val iter_types : t -> (Ident.t -> (SyntaxTreeCore.type_info Lxm.srcflagged) hereflagged -> unit) -> unit val iter_consts : t -> (Ident.t -> (SyntaxTreeCore.const_info Lxm.srcflagged) hereflagged -> unit) -> unit -val iter_opers : - t -> (Ident.t -> (SyntaxTreeCore.oper_info Lxm.srcflagged) hereflagged -> unit) -> unit +val iter_nodes : + t -> (Ident.t -> (SyntaxTreeCore.node_info Lxm.srcflagged) hereflagged -> unit) -> unit val dump : t -> unit diff --git a/src/syntaxTab.ml b/src/syntaxTab.ml index e3778426596152c741d70159a655af92f5557b86..04552e0ed02276148d0f77b171d041b18837d53c 100644 --- a/src/syntaxTab.ml +++ b/src/syntaxTab.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 07/02/2008 (at 11:27) by Erwan Jahier> *) +(** Time-stamp: <modified the 07/02/2008 (at 15:22) by Erwan Jahier> *) (** Table des infos sources : une couche au dessus de SyntaxTree pour mieux @@ -153,9 +153,9 @@ let init_user_items (this: pack_mng) = ( (Lxm.flagit (Ident.make_long pname s) xti.src) in (* EXPORTATION D'UN oper_info *) - let export_oper + let export_node (s: Ident.t) - (xoi: SyntaxTreeCore.oper_info srcflagged) + (xoi: SyntaxTreeCore.node_info srcflagged) = ( Verbose.printf " export oper %s\n" (Ident.to_string s); put_in_tab "oper" this.pm_user_items @@ -169,7 +169,7 @@ let init_user_items (this: pack_mng) = ( (* ON EXPORTE TOUT TEL QUEL *) Hashtbl.iter export_type pg.pg_body.pk_type_table ; Hashtbl.iter export_const pg.pg_body.pk_const_table ; - Hashtbl.iter export_oper pg.pg_body.pk_oper_table ; + Hashtbl.iter export_node pg.pg_body.pk_node_table ; ) | Some spflg -> ( (* ON EXPORTE LES PROVIDES *) @@ -179,7 +179,7 @@ let init_user_items (this: pack_mng) = ( match (x.it) with TypeInfo xti -> export_type s (Lxm.flagit xti lxm) | ConstInfo xci -> export_const s (Lxm.flagit xci lxm) - | OperInfo xoi -> export_oper s (Lxm.flagit xoi lxm) + | NodeInfo xoi -> export_node s (Lxm.flagit xoi lxm) ) in List.iter treat_prov spflg ) @@ -328,9 +328,9 @@ init_pack_mng_stabs (this: t) (pname: Ident.pack_name) (pm: pack_mng) = ( | None -> () ) | OperItem n -> ( - SymbolTab.add_import_oper pm.pm_body_stab n iks.it; + SymbolTab.add_import_node pm.pm_body_stab n iks.it; match pm.pm_provide_stab with - Some pt -> SymbolTab.add_import_oper pt n iks.it + Some pt -> SymbolTab.add_import_node pt n iks.it | None -> () ) ) in @@ -343,7 +343,7 @@ init_pack_mng_stabs (this: t) (pname: Ident.pack_name) (pm: pack_mng) = ( (* ... dans le body : *) Hashtbl.iter (SymbolTab.add_type pm.pm_body_stab) pg.pg_body.pk_type_table; Hashtbl.iter (SymbolTab.add_const pm.pm_body_stab) pg.pg_body.pk_const_table; - Hashtbl.iter (SymbolTab.add_oper pm.pm_body_stab) pg.pg_body.pk_oper_table; + Hashtbl.iter (SymbolTab.add_node pm.pm_body_stab) pg.pg_body.pk_node_table; (* ... dans le provide : *) match pg.pg_provides with | None -> () @@ -360,8 +360,8 @@ init_pack_mng_stabs (this: t) (pname: Ident.pack_name) (pm: pack_mng) = ( SymbolTab.add_type pptab s (Lxm.flagit xti lxm) | ConstInfo xci -> SymbolTab.add_const pptab s (Lxm.flagit xci lxm) - | OperInfo xoi -> - SymbolTab.add_oper pptab s (Lxm.flagit xoi lxm) + | NodeInfo xoi -> + SymbolTab.add_node pptab s (Lxm.flagit xoi lxm) ) in List.iter treat_prov spflg @@ -384,7 +384,7 @@ let find_const (genv: t) (pck: string) (idr: Ident.t) = print_string "*** not implemented.\n"; assert false -let find_oper (genv: t) (pck: string) (idr: Ident.t) = +let find_node (genv: t) (pck: string) (idr: Ident.t) = print_string "*** not implemented.\n"; assert false diff --git a/src/syntaxTree.ml b/src/syntaxTree.ml index 4751dd534695ce5d270c3e22ec0947abab335b3f..f213c45b8c4c29e796d44e280cd30ab1e3ac8142 100644 --- a/src/syntaxTree.ml +++ b/src/syntaxTree.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 07/02/2008 (at 11:27) by Erwan Jahier> *) +(** Time-stamp: <modified the 07/02/2008 (at 15:16) by Erwan Jahier> *) (** (Raw) Abstract syntax tree of source programs. @@ -67,7 +67,7 @@ and packbody = { pk_const_table : (Ident.t, const_info srcflagged ) Hashtbl.t ; pk_type_table : (Ident.t, type_info srcflagged ) Hashtbl.t ; - pk_oper_table : (Ident.t, oper_info srcflagged ) Hashtbl.t ; + pk_node_table : (Ident.t, node_info srcflagged ) Hashtbl.t ; pk_def_list : item_ident list ; } @@ -102,7 +102,7 @@ let make_packbody ctab ttab otab dlst = ( { pk_const_table = Hashtbl.copy ctab; pk_type_table = Hashtbl.copy ttab; - pk_oper_table = Hashtbl.copy otab; + pk_node_table = Hashtbl.copy otab; pk_def_list = dlst } ) diff --git a/src/syntaxTreeCore.ml b/src/syntaxTreeCore.ml index 4f4c22e79bbf3d672e64b0dcea913192bec568b4..72de1eb78b013ef308e2f153755d20473f861b83 100644 --- a/src/syntaxTreeCore.ml +++ b/src/syntaxTreeCore.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 07/02/2008 (at 11:31) by Erwan Jahier> *) +(** Time-stamp: <modified the 07/02/2008 (at 15:30) by Erwan Jahier> *) (** (Raw) Abstract syntax tree of source programs. *) @@ -22,31 +22,20 @@ and | Named_type_exp of Ident.idref | Array_type_exp of (type_exp * val_exp) and - (**************************************************) - (** Info associée à un identificateur d'operateur *) - (** - Soit un node, soit une fonction externe *) - (**************************************************) - oper_info = - | Node of node_info - | Func of func_info + node_info = + | Node of user_node_info + | ExtNode of extern_node_info and - (*************************************************) - (** Info associée à un identificateur de fonction *) - (*************************************************) - func_info = { - fn_name : Ident.t ; - fn_inpars : (Ident.t option * type_exp) list ; - fn_outpars : (Ident.t option * type_exp) list + extern_node_info = { + ename : Ident.t ; + inputs : (Ident.t option * type_exp) list ; + outputs : (Ident.t option * type_exp) list } and - (**********************************************) - (** Info associée à un identificateur de noeud *) - (** Soit une def complete, soit un alias *) - (**********************************************) - node_info = { - ni_name : Ident.t ; - ni_staticlist : static_param srcflagged list ; - ni_value : node_def + user_node_info = { + uname : Ident.t ; + static_args : static_param srcflagged list ; + def : node_def } and static_param = StaticParamType of Ident.t @@ -183,11 +172,9 @@ and val_exp = and operands = Oper of val_exp list - (* Toutes les opérations classiques *) and by_name_op = - STRUCT_n of Ident.idref - (* structure non typée *) + | STRUCT_n of Ident.idref | STRUCT_anonymous_n (* for backward compatibility with lv4 *) @@ -246,7 +233,7 @@ type item_ident = type item_info = ConstInfo of const_info | TypeInfo of type_info - | OperInfo of oper_info + | NodeInfo of node_info (**********************************************************************************) diff --git a/src/syntaxTreeDump.ml b/src/syntaxTreeDump.ml index f67ce6144cf8865e0f8748434bba4c65fc034f9d..212a47e7820117aa270bf0723bf16a1db32ab5b4 100644 --- a/src/syntaxTreeDump.ml +++ b/src/syntaxTreeDump.ml @@ -1,4 +1,4 @@ -(** Time-stamp: <modified the 07/02/2008 (at 11:31) by Erwan Jahier> *) +(** Time-stamp: <modified the 07/02/2008 (at 15:32) by Erwan Jahier> *) open Lxm @@ -79,11 +79,11 @@ let rec packbody (os: Format.formatter) (pkg: SyntaxTree.packbody) = ConstItem id -> dump_const os (Hashtbl.find pkg.pk_const_table id) | TypeItem id -> dump_type os (Hashtbl.find pkg.pk_type_table id) | OperItem id -> ( - match (Hashtbl.find pkg.pk_oper_table id) with + match (Hashtbl.find pkg.pk_node_table id) with | {src = lxm ; it = Node (ninfo) } -> dump_node os {src = lxm; it = ninfo} - | {src = lxm ; it = Func finfo } -> - dump_func os {src = lxm; it = finfo} + | {src = lxm ; it = ExtNode finfo } -> + dump_ext_node os {src = lxm; it = finfo} ) ) with Not_found -> @@ -180,14 +180,14 @@ and dump_field (os: Format.formatter) (finfo: field_info) = ( (**************************) (* dump d'une def de func *) (**************************) -and dump_func (os: Format.formatter) (x: func_info srcflagged) = ( +and dump_ext_node (os: Format.formatter) (x: extern_node_info srcflagged) = ( let lxm = x.src and info = x.it in fprintf os "-- %s" (Lxm.details lxm) ; fprintf os " (external function)@\n" ; fprintf os "function %s (@,@[<b 3>%a@]@,) returns (@,@[<b 3>%a@]@,);@\n" - (Ident.to_string info.fn_name) - dump_param_list info.fn_inpars - dump_param_list info.fn_outpars + (Ident.to_string info.ename) + dump_param_list info.inputs + dump_param_list info.outputs ) and dump_param_list (os: Format.formatter) @@ -222,10 +222,10 @@ and dump_item_info match ie.it with | ConstInfo ci -> dump_const os (Lxm.flagit ci ie.src) | TypeInfo ti -> dump_type os (Lxm.flagit ti ie.src) - | OperInfo oi -> ( + | NodeInfo oi -> ( match oi with | Node ninfo -> dump_node os (Lxm.flagit ninfo ie.src) - | Func finfo -> dump_func os (Lxm.flagit finfo ie.src) + | ExtNode finfo -> dump_ext_node os (Lxm.flagit finfo ie.src) ) ) @@ -254,17 +254,17 @@ and dump_static_param (**************************) (* dump d'une def de node *) (**************************) -and dump_node (os: Format.formatter) (x: node_info srcflagged) = ( +and dump_node (os: Format.formatter) (x: user_node_info srcflagged) = ( let lxm = x.src and ninfo = x.it in fprintf os "-- %s" (Lxm.details lxm) ; fprintf os " (node definition)@\n" ; - fprintf os "node %s" (Ident.to_string ninfo.ni_name); - if (ninfo.ni_staticlist != []) then ( + fprintf os "node %s" (Ident.to_string ninfo.uname); + if (ninfo.static_args != []) then ( fprintf os " <<@\n" ; - fprintf os "@[<b 3>@ %a@]@\n" dump_static_param_list ninfo.ni_staticlist ; + fprintf os "@[<b 3>@ %a@]@\n" dump_static_param_list ninfo.static_args ; fprintf os ">>\n" ) else () ; - match ninfo.ni_value with + match ninfo.def with NodeBody nbody -> dump_node_body os nbody | NodeAlias (_,{it = nexp; src = lxm}) -> fprintf os " = @,%a;@\n" dump_node_exp nexp