I am not yet sure about how to approach the parsing entirely, the
structure may prove to be quite useless.
ft_printf("An error has occured.\n");
return (1);
}
+ //parse_into_logic(parse_tree);
ft_parse_tree_print(parse_tree);
ft_parse_tree_free(parse_tree);
return (0);
--- /dev/null
+#include "libft.h"
+
+typedef double (*probability_function)(double time);
+
+typedef struct s_atom
+{
+ int state;
+ char *name;
+ double failure_probability;
+ probability_function func;
+} t_atom;
+
+typedef enum e_gate_type
+{
+ and_gate,
+ or_gate,
+ nook_gate,
+} t_gate_type;
+
+typedef struct s_gate
+{
+ int state;
+ int n; // for NooK gate
+ int k; // for NooK gate
+ t_gate_type type;
+} t_gate;
+
+typedef struct s_fta_member
+{
+ t_tree_node *parent;
+ union
+ {
+ t_atom atom;
+ t_gate gate;
+ }
+} t_fta_member;
+
+typedef struct s_fta_object
+{
+ char *name;
+ char *class_name;
+}
+
+typedef struct s_fta_class
+{
+ char *class_name;
+ t_vec objects_used;
+}
+
+t_tree *parse_into_logic(const t_parse_tree_node *tree)
+{
+
+}