lustrec / src / annotations.ml @ 6394042a
History | View | Annotate | Download (1.16 KB)
1 |
(********************************************************************) |
---|---|
2 |
(* *) |
3 |
(* The LustreC compiler toolset / The LustreC Development Team *) |
4 |
(* Copyright 2012 - -- ONERA - CNRS - INPT *) |
5 |
(* *) |
6 |
(* LustreC is free software, distributed WITHOUT ANY WARRANTY *) |
7 |
(* under the terms of the GNU Lesser General Public License *) |
8 |
(* version 2.1. *) |
9 |
(* *) |
10 |
(********************************************************************) |
11 |
|
12 |
open LustreSpec |
13 |
|
14 |
|
15 |
(* Associate to each annotation key the pair (node, expr tag) *) |
16 |
let expr_annotations : (string list, ident * tag) Hashtbl.t= Hashtbl.create 13 |
17 |
let node_annotations : (string list, ident) Hashtbl.t= Hashtbl.create 13 |
18 |
|
19 |
let add_expr_ann node_id expr_tag key = Hashtbl.add expr_annotations key (node_id, expr_tag) |
20 |
let add_node_ann node_id key = Hashtbl.add node_annotations key node_id |
21 |
|
22 |
let get_expr_annotations key = Hashtbl.find_all expr_annotations key |