added automaton to ast

This commit is contained in:
Antoine Grimod
2022-12-13 15:02:54 +01:00
parent ad1f529863
commit bb017afe39
6 changed files with 41 additions and 42 deletions

View File

@@ -48,16 +48,19 @@ type t_expression =
| EConst of full_ty * const
| ETuple of full_ty * (t_expression list)
| EApp of full_ty * t_node * t_expression
| EAuto of full_ty * t_state * t_state list (* initial state and transitions *)
and t_varlist = full_ty * (t_var list)
and t_equation = t_varlist * t_expression
and t_equation = t_varlist * t_expression
and t_eqlist = t_equation list
and t_state = | State of ident * t_eqlist * t_expression * ident
and t_automaton = t_state * t_state list
and t_autolist = t_automaton list
and t_node =
{
n_name : ident;
@@ -65,6 +68,7 @@ and t_node =
n_outputs: t_varlist;
n_local_vars: t_varlist;
n_equations: t_eqlist;
n_automata: t_autolist;
n_inputs_type : full_ty;
n_outputs_type : full_ty;
}