package lutin

  1. Overview
  2. Docs

SYNTAXE ABSTRAITE

*********************************************** NOTE SUR LA dÉCORATION DES NOEUDS SYNTAXIQUES ***********************************************

Tous les noeuds syntaxiques "importants" CONTIENNENT une info source : cette info est par construction UNIQUE on peut donc s'en servir pour associer des infos sémantiques au noeud via une table indexée par ces info sources (type lexeme)

--------------------------------------------------

type ident = string Lexeme.srcflaged
and except_tab = (string, except_info) Hashtbl.t
and package = {
  1. pck_lettab : (string, let_info) Hashtbl.t;
  2. pck_nodetab : (string, node_info) Hashtbl.t;
  3. pck_excepttab : except_tab;
  4. pck_deflist : def_item list;
  5. pck_included_files_to_handle : string list;
}
and def_item =
  1. | LetDef of ident
    (*

    key in pk_let_table

    *)
  2. | ExternDef of ident
    (*

    key in pk_let_table

    *)
  3. | NodeDef of ident
    (*

    key in pk_node_table

    *)
  4. | ExceptDef of ident
    (*

    key in pk_except_table

    *)
and except_info = ident
and let_info = {
  1. lti_ident : ident;
  2. lti_type : type_exp option;
  3. lti_inputs : (ident * type_exp) list option;
  4. lti_def : val_exp option;
}
and predef_type =
  1. | Bool
  2. | Int
  3. | Real
and type_exp =
  1. | TEXP_trace
  2. | TEXP_predef of predef_type
  3. | TEXP_ref of predef_type
and node_info = {
  1. ndi_ident : ident;
  2. ndi_inputs : (ident * type_exp * val_exp option * (val_exp * val_exp) option) list;
  3. ndi_outputs : (ident * type_exp * val_exp option * (val_exp * val_exp) option) list;
  4. ndi_def : val_exp;
}
and assert_flag =
  1. | Strong
  2. | Weak
and val_exp_node =
  1. | TRUE_n
  2. | FALSE_n
  3. | ICONST_n of ident
  4. | RCONST_n of ident
  5. | IDENT_n of ident
  6. | PRE_n of ident
  7. | FBY_n of val_exp * val_exp
  8. | CHOICE_n of (val_exp * val_exp Lexeme.srcflaged option) list
  9. | PRIO_n of val_exp list
  10. | LOOP_n of assert_flag * val_exp
  11. | LOOPI_n of val_exp * val_exp * val_exp
  12. | LOOPA_n of val_exp * val_exp option * val_exp
  13. | ASSERT_n of assert_flag * val_exp * val_exp
  14. | EXIST_n of (ident * type_exp * val_exp option * (val_exp * val_exp) option) list * val_exp
  15. | RAISE_n of ident
  16. | EXCEPT_n of ident list * val_exp
  17. | CATCH_n of ident * val_exp * val_exp option
  18. | TRAP_n of ident * val_exp * val_exp option
  19. | TRY_n of val_exp * val_exp option
  20. | PARA_n of val_exp list
  21. | CALL_n of ident * val_exp list
  22. | LET_n of let_info * val_exp
  23. | ERUN_n of (ident * type_exp option * val_exp option) list * val_exp * val_exp
  24. | RUN_n of ident list * val_exp * val_exp option
val pack_node_list : package -> string list
val pack_get_node : package -> string -> node_info
val pack_get_let : package -> string -> let_info
val pack_except_list : package -> except_info list
val empty_package : unit -> package
val union : package -> package -> package
OCaml

Innovation. Community. Security.