Select Git revision
-
Fort Frédéric authoredFort Frédéric authored
anflang.ml 25.71 KiB
open Common
type prog = decl list
and decl =
{
decl_desc: decl_desc;
decl_loc: Location.t;
}
and decl_desc =
| Node of node_desc
| EnumDecl of enum_desc
and node_desc =
{
node_name: String.t;
node_inputs: vdecl list;
node_outputs: vdecl list;
node_locals: vdecl list;
node_eqs: eq list;
}
and enum_desc = String.t * StringSet.t
and eq =
{
eq_lhs: String.t list;
eq_rhs: expr;
eq_loc: Location.t;
}
and 'desc expr_base =
{
expr_desc: 'desc;
expr_loc: Location.t
}
and expr = expr_desc expr_base
(* and atom_expr = atom_expr_desc expr_base *)
and const_expr = const_expr_desc expr_base
and ident_expr = ident_expr_desc expr_base
and expr_desc =
[
| `ExprConst of const
| `ExprIdent of String.t
| `ExprApply of ident_expr * ident_expr List.t
| `ExprPckUp of rate_op_desc
| `ExprFby of const_expr * rate_op_desc
| `ExprWhen of when_desc
| `ExprMerge of merge_desc
| `ExprITE of ite_desc
]
(* and atom_expr_desc = *)
(* [ *)
(* | `ExprConst of const *)
(* | `ExprIdent of String.t *)
(* ] *)
and const_expr_desc =
[
| `ExprConst of const
]
and ident_expr_desc =