fsa_mngr.c File Reference

#include "sxversion.h"
#include "sxunix.h"
#include "varstr.h"
#include "XxY.h"
#include "XxYxZ.h"
#include "fsa.h"
#include "sxstack.h"
#include "XH.h"
#include "sxdico.h"
Include dependency graph for fsa_mngr.c:

Go to the source code of this file.

Data Structures

struct  state2attr
struct  part2attr
struct  node
struct  tree_area
struct  tete
struct  sets
struct  ints
struct  dag_attr
struct  nfa_intersection_struct
struct  nfa_intersection_struct::t2q_list

Defines

#define leaf   (SXINT)1
#define concat   (SXINT)2
#define star   (SXINT)3
#define or   (SXINT)4
#define plus   (SXINT)5
#define option   (SXINT)6
#define head_s_no   (SXINT)67
#define node_number_per_area   (SXINT)20
#define tete_pop(n)   (x_of_tete -= n)
#define sets_pop(n)   (x_of_sets -= n)
#define ints_pop(n)   (x_of_ints -= n)
#define ATOMIC_TRANS   (SXUINT)1
#define CAT_TRANS   (SXUINT)2
#define OR_TRANS   (SXUINT)3
#define OPTION_TRANS   (SXUINT)4
#define FOR_TRANS   (SXUINT)5
#define SHIFT   (SXBITS_PER_LONG-4)
#define ATOMIC_CODE   (ATOMIC_TRANS << SHIFT)
#define CAT_CODE   (CAT_TRANS << SHIFT)
#define OR_CODE   (OR_TRANS << SHIFT)
#define OPTION_CODE   (OPTION_TRANS << SHIFT)
#define FOR_CODE   (FOR_TRANS << SHIFT)
#define ID_CODE   (SXINT_MAX >> 3)
#define code2id(c)   (SXINT)((c) & ID_CODE)
#define code2trans(c)   ((c)>> SHIFT)

Functions

static void fill_old_state2max_path_lgth (SXINT prev_old_state, SXINT t, SXINT next_old_state)
static int cmp_old_state (const void *p1, const void *p2)
static void save_a_trans (SXINT t, SXINT q)
static void output_from_prev (void)
static SXINT output_new_trans (SXINT from_old_state, SXINT t, SXINT to_old_state)
void fsa_normalize (SXINT init_state, SXINT final_state, SXINT eof_ste, void(*fsa_forward_trans)(SXINT, void(*)(SXINT, SXINT, SXINT)), void(*fsa_fill_trans)(SXINT, SXINT, SXINT))
static void move (SXINT state, SXINT part)
static void init_set (SXINT state, SXINT part)
static SXBOOLEAN epsilon_closure (SXBA cur_state_set)
static void dfa_extract_trans (SXINT dfa_state, void(*dfa_fill_trans)(SXINT, SXINT, SXINT))
static void dfa_fill_t_trans (SXINT dfa_state, SXINT t, SXINT next_dfa_state)
static void dfa_fill_full_trans (SXINT dfa_state, SXINT t, SXINT next_dfa_state)
static void dfa_fill_dfa_state2pred_stack (SXINT dfa_state, SXINT t, SXINT next_dfa_state)
static void fill_init_min (SXINT state, void(*cur_dfa_extract_trans)(SXINT, void(*dfa_fill_t_trans)(SXINT dfa_state, SXINT t, SXINT next_dfa_state)))
static void XH_part_set_oflw (SXINT old_size, SXINT new_size)
static void forward (SXINT part, void(*f)(SXINT p, SXINT t, SXINT q))
void dfa_minimize (SXINT cur_dfa_init_state, SXINT cur_dfa_final_state, SXINT eof_ste, void(*cur_dfa_extract_trans)(SXINT, void(*dfa_fill_dfa_state2pred_stack)(SXINT dfa_state, SXINT t, SXINT next_dfa_state)), void(*mindfa_fill_trans)(SXINT, SXINT, SXINT), SXBOOLEAN to_be_normalized)
static SXBOOLEAN get_state (SXBA old_state_set, SXINT *new_state)
static void nfa_fill_trans (SXINT nfa_state, SXINT t, SXINT next_nfa_state)
static void XxY_out_trans_oflw (SXINT old_size, SXINT new_size)
void nfa2dfa (SXINT init_state, SXINT final_state, SXINT max_state, SXINT eof_ste, SXBOOLEAN(*empty_trans)(SXINT, SXBA), void(*nfa_extract_trans)(SXINT, void(*nfa_fill_trans)(SXINT, SXINT, SXINT)), void(*dfa_fill_trans)(SXINT, SXINT, SXINT, SXBOOLEAN), void(*mindfa_fill_trans)(SXINT, SXINT, SXINT), SXBOOLEAN to_be_normalized)
static struct nodecanon (SXINT oper, struct node *left, struct node *right)
static struct nodereduce_or_son (struct node *visited)
static struct nodegen_prefixe (struct node ***p_s, SXBA set, struct node *node_ptr, SXINT or_no, SXINT *min_s, SXINT *MAX_s)
static struct nodegen_suffixe (struct node ***p_s, SXBA set, struct node *node_ptr, SXINT or_no, SXINT *min_s, SXINT *MAX_s)
static struct node ** tete_open (SXINT size)
static SXVOID tete_free (void)
static SXINT * ints_open (SXINT size)
static SXVOID ints_free (void)
static SXBA sets_open (SXINT size)
static SXVOID sets_free (void)
static struct nodealloc_a_node (void)
static SXVOID free_tree_areas (void)
static struct nodecreate_leaf (SXBA_INDEX i, SXBA_INDEX j, SXINT(*get_name_refs)(SXBA_INDEX, SXBA_INDEX, char **))
static struct nodecreate_op (SXINT op, struct node *l, struct node *r)
static struct nodecreate_list (struct node **p_s, SXINT m, SXINT create_list_M, SXINT op)
static SXBOOLEAN is_tail (struct node *p1, struct node *p2)
static SXINT nb_op_sons (struct node *p, SXINT op)
static SXVOID gather_op_sons (struct node **p_s, SXINT *xp, struct node *p, SXINT op)
static SXVOID process_substr (struct node **p_s, SXINT xstar, SXINT xconc, SXINT process_substr_M)
static SXBOOLEAN is_an_element (struct node *head_ptr, struct node *elem_ptr, SXINT oper)
static SXBOOLEAN is_a_subset (struct node **p_s, SXINT m1, SXINT M1, struct node **q_s, SXINT m2, SXINT M2)
static SXBOOLEAN is_a_member (struct node *p1, struct node *p2)
static SXBOOLEAN is_a_staror_elem (struct node *node_ptr, struct node **result_ptr)
static SXBOOLEAN is_a_sublanguage (struct node *left, struct node *right)
static SXVOID transform (struct node **left, struct node **right)
static SXBOOLEAN less (SXINT i, SXINT j)
static struct nodecreate_or_list (struct node **p_s, SXINT m, SXINT create_or_list_M)
static SXBA_INDEX get_a_pred (SXBA_INDEX n)
static SXVOID gen_a_loop (SXBA_INDEX pred, SXBA_INDEX next, SXBA_INDEX loop)
static SXVOID gen_splits (SXBA_INDEX pred, SXBA_INDEX next)
static SXVOID erase (SXBA_INDEX pred, SXBA_INDEX next)
static SXBA_INDEX get_current_node (SXBA get_current_node_to_be_processed)
static void chose_larger_set (struct node ***p_s, SXBA set, SXINT *mM, SXINT *best_card, SXBA best_set, struct node **best_p, SXINT or_no)
static struct nodeprocess (struct node ***p_s, SXBA set, SXINT or_no, SXINT *min_s, SXINT *MAX_s)
static struct nodefactorize (struct node *or_ptr)
static struct nodereduce (struct node *visited)
static struct nodecut (struct node *node_ptr)
static VARSTR tree_to_string (VARSTR varstr_ptr, struct node *node_ptr)
static VARSTR fsa2re_body (VARSTR varstr_ptr, SXBA *R, SXBA *R_plus, SXINT size, SXINT initial_s, SXINT final_s, SXINT(*get_name_refs)(SXBA_INDEX, SXBA_INDEX, char **))
VARSTR fsa2re (VARSTR varstr_ptr, SXBA *R, SXBA *R_plus, SXINT size, SXINT initial_s, SXINT final_s, SXINT(*get_name_refs)(SXBA_INDEX, SXBA_INDEX, char **), char *op[6])
VARSTR fsa_to_re (VARSTR varstr_ptr, SXBA *R, SXBA *R_plus, SXINT size, SXINT initial_s, SXINT final_s, SXINT(*get_name_refs)(SXBA_INDEX, SXBA_INDEX, char **))
static VARSTR print_code (VARSTR vstr, SXUINT code)
static void branches_oflw (SXINT old_size, SXINT new_size)
static void paths_oflw (SXINT old_size, SXINT new_size)
static void trees_oflw (SXINT old_size, SXINT new_size)
static SXBOOLEAN set_code (SXUINT *id)
static SXINT gen_branch (SXINT branch, SXINT path, SXBA set, SXBA final_set)
static SXINT gen_tree (SXINT tree, SXINT path, SXBA set, SXBA final_set)
static SXINT factorize_branch (SXINT branch)
static void expand_paths (void)
static SXINT path2cost (SXINT path)
static SXINT factorize_tree (SXINT tree)
static SXINT make_tree (SXINT path)
static void erase_paths (SXBA cur_paths_set)
static SXBOOLEAN valid_paths (SXINT path)
static SXBOOLEAN remake_structures (void)
static void clear_path (SXINT path)
static SXBOOLEAN clear_tree (SXINT tree)
static SXBOOLEAN clear_branch (SXINT branch)
static void extract_factor (void)
static SXUINT factorize_OR (SXINT or_code)
static SXUINT make_code (SXUINT code1, SXUINT code2, SXUINT what_to_do)
static void fill_dag_hd (SXINT p, SXINT t, SXINT q)
static SXINT make_a_new_trans (SXINT dag1_id, SXINT dag2_id)
static SXINT dag_reduce (void)
static void code_hd_oflw (SXINT old_size, SXINT new_size)
static void dag_hd_oflw (SXINT old_size, SXINT new_size)
VARSTR dag2re (VARSTR varstr_ptr, SXINT dag_init_state, SXINT dag_final_state, SXINT eof_ste, void(*dag_extract_trans)(SXINT, void(*fill_dag_hd)(SXINT p, SXINT t, SXINT q)), char *(*get_trans_name)(SXINT))
void word_tree_oflw (struct word_tree_struct *word_tree_ptr, SXINT old_size, SXINT new_size)
void word_tree_alloc (struct word_tree_struct *word_tree_ptr, char *name, SXINT word_nb, SXINT word_lgth, SXINT Xforeach, SXINT Yforeach, SXBOOLEAN from_left_to_right, SXBOOLEAN with_path2id, void(*oflw)(SXINT, SXINT), FILE *stats)
void word_tree_free (struct word_tree_struct *word_tree_ptr)
static SXUINT string_get_next_symb (struct sxdfa_private *sxdfa_private_ptr)
static SXUINT word_get_next_symb (struct sxdfa_private *sxdfa_private_ptr)
SXINT word_tree_add_a_string (struct word_tree_struct *word_tree_ptr, char *string, SXINT string_lgth, SXINT id)
SXINT word_tree_add_a_word (struct word_tree_struct *word_tree_ptr, SXINT *input_stack, SXINT id)
SXINT word_tree_add (struct word_tree_struct *word_tree_ptr, SXUINT(*get_next_symb)(struct sxdfa_private *), SXINT lgth, SXINT id)
SXINT word_tree_seek_a_string (struct word_tree_struct *word_tree_ptr, char *kw, SXINT *kwl)
static void sxdfa_lp_push (SXINT path, SXINT lgth)
static void sxdfa_lgth_alloc (SXINT max_path_lgth, SXINT max_path_nb)
static void sxdfa_lgth_free (void)
void word_tree2sxdfa (struct word_tree_struct *word_tree_ptr, struct sxdfa_struct *sxdfa_ptr, char *name, FILE *stats, SXBOOLEAN to_be_minimized)
void sxdfa_alloc (struct sxdfa_struct *sxdfa_ptr, SXINT state_nb, SXINT trans_nb, char *name, FILE *stats)
void sxdfa_free (struct sxdfa_struct *sxdfa_ptr)
void sxdfa_tree2min_dag (struct sxdfa_struct *sxdfa_ptr)
static void sxnfa_fill_trans (SXINT nfa_state, SXINT t, SXINT next_nfa_state)
void nfa2sxdfa (SXINT init_state, SXINT cur_final_state, SXINT cur_max_state, SXINT eof_ste, SXINT trans_nb, SXBOOLEAN(*empty_trans)(SXINT, SXBA), void(*nfa_extract_trans)(SXINT, void(*sxnfa_fill_trans)(SXINT nfa_state, SXINT t, SXINT next_nfa_state)), struct sxdfa_struct *sxdfa_ptr, SXBOOLEAN to_be_minimized, SXBOOLEAN to_be_normalized)
void sxdfa_minimize (struct sxdfa_struct *sxdfa_ptr, SXBOOLEAN to_be_normalized)
static void sxdfa_fill_old_state2max_path_lgth (struct sxdfa_struct *sxdfa_ptr, SXINT state)
void sxdfa_normalize (struct sxdfa_struct *sxdfa_ptr)
static SXBOOLEAN sxdfa_fill_dag_hd (struct sxdfa_struct *sxdfa_ptr, SXINT p, SXINT t, SXINT q)
void sxdfa_extract_trans (struct sxdfa_struct *sxdfa_ptr, SXINT state, SXBOOLEAN(*f)(struct sxdfa_struct *, SXINT, SXINT, SXINT))
VARSTR sxdfadag2re (VARSTR varstr_ptr, struct sxdfa_struct *sxdfa_ptr, char *(*get_trans_name)(SXINT))
void sxdfa2c (struct sxdfa_struct *sxdfa_ptr, FILE *file, char *name, SXBOOLEAN is_static)
SXINT sxdfa_seek_a_string (struct sxdfa_struct *sxdfa_ptr, char *kw, SXINT *kwl)
SXINT sxdfa_seek_a_word (struct sxdfa_struct *sxdfa_ptr, SXINT *input_stack)
SXINT sxdfa_seek (struct sxdfa_struct *sxdfa_ptr, SXUINT(*get_next_symb)(struct sxdfa_private *), SXINT *input_lgth)
static SXINT install_a_comb (SXBA *comb_vector_ptr, SXBA comb, SXBA *base_pos_set_ptr)
void sxdfa2comb_vector (struct sxdfa_struct *sxdfa_ptr, SXINT optim_kind, SXINT comb_vector_threshold, struct sxdfa_comb *sxdfa_comb_ptr)
void sxdfa_comb2c (struct sxdfa_comb *sxdfa_comb_ptr, FILE *file, char *dico_name, SXBOOLEAN is_static)
SXINT sxdfa_comb_seek_a_string (struct sxdfa_comb *sxdfa_comb_ptr, char *kw, SXINT *kwl)
SXINT sxdfa_comb_seek_a_word (struct sxdfa_comb *sxdfa_comb_ptr, SXINT *input_stack)
SXINT sxdfa_comb_seek (struct sxdfa_comb *sxdfa_comb_ptr, SXUINT(*get_next_symb)(struct sxdfa_private *), SXINT *input_lgth)
void sxdfa_comb_free (struct sxdfa_comb *sxdfa_comb_ptr)
void sxdfa2sxdfa_packed (struct sxdfa_struct *sxdfa_ptr, struct sxdfa_packed_struct *sxdfa_packed_ptr, char *name, FILE *stats)
SXINT sxdfa_packed_seek_a_string (struct sxdfa_packed_struct *sxdfa_packed_ptr, char *kw, SXINT *kwl)
SXINT sxdfa_packed_seek_a_word (struct sxdfa_packed_struct *sxdfa_packed_ptr, SXINT *input_stack)
SXINT sxdfa_packed_seek (struct sxdfa_packed_struct *sxdfa_packed_ptr, SXUINT(*get_next_symb)(struct sxdfa_private *), SXINT *input_lgth)
void sxdfa_packed2c (struct sxdfa_packed_struct *sxdfa_packed_ptr, FILE *file, char *name, SXBOOLEAN is_static)
void sxdfa_packed_free (struct sxdfa_packed_struct *sxdfa_packed_ptr)
static void nfa_intersection_process_a_non_eps_trans (SXINT p, SXINT t, SXINT q)
static void nfa_intersection_fill_non_eps_trans (SXINT nfa_list, void(*nfa1_extract_non_eps_trans)(SXINT, void(*)(SXINT, SXINT, SXINT)))
static SXINT nfa_intersection_make_eps_closure (SXINT t, SXBOOLEAN(*nfa_extract_empty_trans)(SXINT, SXBA), SXBOOLEAN *contains_the_final_state)
static void XxY_nfa_intersection_states_oflw (SXINT old_size, SXINT new_size)
SXBOOLEAN nfa_intersection (SXINT nfa1_init_state, SXINT nfa1_final_state, SXINT nfa1_max_state, SXINT nfa1_eof_ste, SXINT nfa2_init_state, SXINT nfa2_final_state, SXINT nfa2_max_state, SXINT nfa2_eof_ste, SXBOOLEAN(*nfa1_empty_trans)(SXINT, SXBA), SXBOOLEAN(*nfa2_empty_trans)(SXINT, SXBA), void(*nfa1_extract_non_eps_trans)(SXINT, void(*)(SXINT, SXINT, SXINT)), void(*nfa2_extract_non_eps_trans)(SXINT, void(*)(SXINT, SXINT, SXINT)), void(*nfa_intersection_fill_trans)(SXINT, SXINT, SXINT, SXBOOLEAN))
SXINT dico_seek (struct dico *dico, unsigned char *word, SXINT lgth)
SXINT sxdfa_comb_get (struct sxdfa_comb *dico, char *word, SXINT lgth)
SXINT sxdfa_comb_get_bounded (struct sxdfa_comb *dico, char **word_ptr, SXINT *lgth_ptr)

Variables

char WHAT_SXDAG_MNGR [] = "@(#)SYNTAX - $Id: fsa_mngr.c 1743 2009-06-08 13:32:55Z sagot $" WHAT_DEBUG
static char ME [] = "fsa_mngr"
static SXINT * old_state2max_path_lgth
static SXINT * old_state2new_state
static SXBA state_set
static void(* normalized_fsa_fill_trans )(SXINT, SXINT, SXINT)
static void(* normalized_fsa_forward_trans )(SXINT, void(*fill_old_state2max_path_lgth)(SXINT, SXINT, SXINT))
static SXBOOLEAN normalized_is_cyclic
static SXINT prev_from_new_state
static SXBA to_new_state_set
static SXBA * to_new_state2t_set
static SXINT * to_new_state2t
static SXINT dfa_init_state
static SXINT dfa_final_state
static SXBOOLEAN(* nfa_empty_trans )(SXINT, SXBA)
static SXINT last_partition
static SXINT dfa_state_nb
static SXINT * nfa_ec_stack
static SXINT * nfa_t_stack
static SXINT * nfa_state_stack
static SXBA nfa_wstate_set
static SXBA t_set
static SXBA * t2nfa_state_set
static XH_header XH_dfa_states
static SXINT * t2pos
static SXINT * pos2state
static SXINT * part_set_id2part
static XH_header XH_trans_list_id
static XH_header XH_t_trans
static XH_header XH_part_set
static SXINT * dfa_state2pred_nb
static XxY_header XxY_out_trans
static SXINT * XxY_out_trans2next_state
static SXINT ** dfa_state2pred_stack
static SXINT ** forward_stacks
char WHAT_FSA_TO_RE [] = "@(#)SYNTAX - $Id: fsa_mngr.c 1743 2009-06-08 13:32:55Z sagot $" WHAT_DEBUG
static char ** meta_op
static SXINT S [7][7]
static SXINT SIZE
static SXINT INITIAL_S
static SXBA * M
static struct tree_areatree_area_ptr
static SXINT cur_node_no
static struct node *** re_ptrs
static SXINT * in
static SXINT * out
static SXBA to_be_processed
static SXBA reached_set
static SXBA loop_set
static struct node ** P_S
static struct tetetete
static SXINT size_of_tete
static SXINT top_of_tete
static SXINT x_of_tete
static struct setssets
static SXINT size_of_sets
static SXINT top_of_sets
static SXINT x_of_sets
static struct intsints
static SXINT size_of_ints
static SXINT top_of_ints
static SXINT x_of_ints
static SXINT * to_be_sorted
static SXINT size_of_to_be_sorted
static SXBA succ_set
static SXBA_INDEX prev
static SXBA_INDEX current
static struct nodehead_s [head_s_no]
static struct nodeleafs_hd [head_s_no]
static SXUINT eof_trans
static SXINT dag_hd_trans_nb
static SXINT final_state
static XxY_header dag_hd
static XH_header code_hd
static SXINT * code2size
static struct dag_attrdag_id2attr
static char *(* dag_get_trans_name )(SXINT)
static XxY_header paths
static XxY_header branches
static XxY_header pathXbranch
static XxY_header pathXtree
static XH_header trees
static SXINT * path2lgth
static SXINT * path2tree
static SXINT * branch2occur_nb
static SXINT * tree2size
static SXINT * tree2occur_nb
static SXINT * code_stack
static SXINT * paths_stack
static SXBA branches_set
static SXBA paths_set
static SXBA final_paths_set
static SXINT * sxdfa_lgth2path
static SXINT * sxdfa_path2next
static SXINT max_class_value
static SXBA_INDEX_OR_ERROR base_comb_vector
static SXINT * base2stack
static SXINT char_stack_list_size
static SXINT char_stack_list_top
static unsigned charchar_stack_list
static struct
nfa_intersection_struct 
nfa_intersection_struct_nfa1
static struct
nfa_intersection_struct 
nfa_intersection_struct_nfa2
static struct
nfa_intersection_struct
nfa_intersection_struct_ptr
static XH_header XH_intersection_state_list_hd
static SXBA nfa_intersection_ec_set
static SXINT * nfa_intersection_ec_stack
static SXINT * nfa_intersection_tbp_stack
static SXBA nfa_intersection_final_state_set

Define Documentation

#define ATOMIC_CODE   (ATOMIC_TRANS << SHIFT)

Definition at line 3275 of file fsa_mngr.c.

Referenced by fill_dag_hd(), make_a_new_trans(), make_code(), and sxdfa_fill_dag_hd().

#define ATOMIC_TRANS   (SXUINT)1

Definition at line 3266 of file fsa_mngr.c.

Referenced by extract_factor(), factorize_OR(), make_code(), make_tree(), print_code(), and set_code().

#define CAT_CODE   (CAT_TRANS << SHIFT)

Definition at line 3276 of file fsa_mngr.c.

Referenced by extract_factor(), gen_tree(), and make_code().

#define CAT_TRANS   (SXUINT)2

Definition at line 3267 of file fsa_mngr.c.

Referenced by make_a_new_trans(), make_code(), and print_code().

#define code2id (  )     (SXINT)((c) & ID_CODE)

Definition at line 3285 of file fsa_mngr.c.

Referenced by extract_factor(), factorize_OR(), make_code(), make_tree(), print_code(), and set_code().

#define code2trans (  )     ((c)>> SHIFT)
#define concat   (SXINT)2
#define FOR_CODE   (FOR_TRANS << SHIFT)

Definition at line 3279 of file fsa_mngr.c.

Referenced by factorize_OR(), and gen_tree().

#define FOR_TRANS   (SXUINT)5

Definition at line 3270 of file fsa_mngr.c.

Referenced by make_code(), and print_code().

#define head_s_no   (SXINT)67

Definition at line 1551 of file fsa_mngr.c.

Referenced by create_leaf(), create_op(), and fsa2re_body().

#define ID_CODE   (SXINT_MAX >> 3)

Definition at line 3283 of file fsa_mngr.c.

#define ints_pop ( n   )     (x_of_ints -= n)

Definition at line 1616 of file fsa_mngr.c.

Referenced by factorize().

#define leaf   (SXINT)1

Definition at line 1544 of file fsa_mngr.c.

Referenced by canon(), create_leaf(), cut(), reduce(), and tree_to_string().

#define node_number_per_area   (SXINT)20

Definition at line 1552 of file fsa_mngr.c.

Referenced by alloc_a_node(), and fsa2re_body().

#define option   (SXINT)6
#define OPTION_CODE   (OPTION_TRANS << SHIFT)

Definition at line 3278 of file fsa_mngr.c.

Referenced by gen_tree(), and make_code().

#define OPTION_TRANS   (SXUINT)4

Definition at line 3269 of file fsa_mngr.c.

Referenced by factorize_OR(), make_a_new_trans(), make_code(), and print_code().

#define or   (SXINT)4
#define OR_CODE   (OR_TRANS << SHIFT)

Definition at line 3277 of file fsa_mngr.c.

Referenced by make_code().

#define OR_TRANS   (SXUINT)3
#define plus   (SXINT)5

Definition at line 1548 of file fsa_mngr.c.

Referenced by canon(), cut(), gen_a_loop(), process_substr(), reduce(), and tree_to_string().

#define sets_pop ( n   )     (x_of_sets -= n)

Definition at line 1608 of file fsa_mngr.c.

Referenced by chose_larger_set(), factorize(), gen_prefixe(), gen_suffixe(), and process().

#define SHIFT   (SXBITS_PER_LONG-4)

Definition at line 3272 of file fsa_mngr.c.

#define star   (SXINT)3
#define tete_pop ( n   )     (x_of_tete -= n)

Function Documentation

static struct node* alloc_a_node ( void   )  [static, read]

Definition at line 1768 of file fsa_mngr.c.

References tree_area::lnk, node_number_per_area, tree_area::node_s, and p.

Referenced by create_leaf(), and create_op().

static void branches_oflw ( SXINT  old_size,
SXINT  new_size 
) [static]

Definition at line 3388 of file fsa_mngr.c.

References sxba_resize().

Referenced by dag2re(), and sxdfadag2re().

static struct node * canon ( SXINT  oper,
struct node left,
struct node right 
) [static, read]
static void chose_larger_set ( struct node ***  p_s,
SXBA  set,
SXINT *  mM,
SXINT *  best_card,
SXBA  best_set,
struct node **  best_p,
SXINT  or_no 
) [static]

Definition at line 2803 of file fsa_mngr.c.

References sets_open(), sets_pop, sxba_copy(), sxba_empty(), sxba_scan(), and sxba_scan_reset().

Referenced by process().

static SXBOOLEAN clear_branch ( SXINT  branch  )  [static]

Definition at line 3882 of file fsa_mngr.c.

References clear_path(), remake_structures(), SXBOOLEAN, SXTRUE, and XxY_is_set().

Referenced by extract_factor().

static void clear_path ( SXINT  path  )  [static]

Definition at line 3828 of file fsa_mngr.c.

Referenced by clear_branch(), and clear_tree().

static SXBOOLEAN clear_tree ( SXINT  tree  )  [static]

Definition at line 3857 of file fsa_mngr.c.

References clear_path(), remake_structures(), SXBOOLEAN, and SXTRUE.

Referenced by extract_factor().

static int cmp_old_state ( const void *  p1,
const void *  p2 
) [static]

Definition at line 89 of file fsa_mngr.c.

References old_state2max_path_lgth.

Referenced by fsa_normalize(), and sxdfa_normalize().

static void code_hd_oflw ( SXINT  old_size,
SXINT  new_size 
) [static]

Definition at line 4566 of file fsa_mngr.c.

Referenced by dag2re(), and sxdfadag2re().

static struct node* create_leaf ( SXBA_INDEX  i,
SXBA_INDEX  j,
SXINT(*)(SXBA_INDEX, SXBA_INDEX, char **)  get_name_refs 
) [static, read]

Definition at line 1796 of file fsa_mngr.c.

References alloc_a_node(), node::body, head_s_no, leaf, node::link, node::name, p, and node::string_ptr.

Referenced by fsa2re_body().

static struct node* create_list ( struct node **  p_s,
SXINT  m,
SXINT  create_list_M,
SXINT  op 
) [static, read]

Definition at line 1836 of file fsa_mngr.c.

References create_op(), p, and q.

Referenced by canon(), create_or_list(), is_a_staror_elem(), is_a_sublanguage(), process_substr(), and transform().

static struct node* create_op ( SXINT  op,
struct node l,
struct node r 
) [static, read]

Definition at line 1817 of file fsa_mngr.c.

References alloc_a_node(), node::body, node::brother, head_s_no, node::link, node::name, and p.

Referenced by canon(), create_list(), and is_a_staror_elem().

static struct node* create_or_list ( struct node **  p_s,
SXINT  m,
SXINT  create_or_list_M 
) [static, read]

Definition at line 2284 of file fsa_mngr.c.

References create_list(), less(), or, and sort_by_tree().

Referenced by canon().

static struct node* cut ( struct node node_ptr  )  [static, read]

Definition at line 2952 of file fsa_mngr.c.

References node::body, node::brother, concat, leaf, node::name, option, or, plus, star, and node::string_ptr.

Referenced by fsa2re_body().

VARSTR dag2re ( VARSTR  varstr_ptr,
SXINT  dag_init_state,
SXINT  dag_final_state,
SXINT  eof_ste,
void(*)(SXINT, void(*fill_dag_hd)(SXINT p, SXINT t, SXINT q))  dag_extract_trans,
char *(*)(SXINT)  get_trans_name 
)
static void dag_hd_oflw ( SXINT  old_size,
SXINT  new_size 
) [static]

Definition at line 4574 of file fsa_mngr.c.

References dag_id2attr.

Referenced by dag2re(), and sxdfadag2re().

static SXINT dag_reduce ( void   )  [static]

Definition at line 4521 of file fsa_mngr.c.

References make_a_new_trans(), and q.

Referenced by dag2re(), and sxdfadag2re().

static void dfa_extract_trans ( SXINT  dfa_state,
void(*)(SXINT, SXINT, SXINT)  dfa_fill_trans 
) [static]

Definition at line 444 of file fsa_mngr.c.

Referenced by nfa2dfa().

static void dfa_fill_dfa_state2pred_stack ( SXINT  dfa_state,
SXINT  t,
SXINT  next_dfa_state 
) [static]

Definition at line 474 of file fsa_mngr.c.

References PUSH.

Referenced by dfa_minimize(), and sxdfa_minimize().

static void dfa_fill_full_trans ( SXINT  dfa_state,
SXINT  t,
SXINT  next_dfa_state 
) [static]

Definition at line 461 of file fsa_mngr.c.

Referenced by fill_init_min().

static void dfa_fill_t_trans ( SXINT  dfa_state,
SXINT  t,
SXINT  next_dfa_state 
) [static]

Definition at line 453 of file fsa_mngr.c.

Referenced by fill_init_min().

void dfa_minimize ( SXINT  cur_dfa_init_state,
SXINT  cur_dfa_final_state,
SXINT  eof_ste,
void(*)(SXINT, void(*dfa_fill_dfa_state2pred_stack)(SXINT dfa_state, SXINT t, SXINT next_dfa_state))  cur_dfa_extract_trans,
void(*)(SXINT, SXINT, SXINT)  mindfa_fill_trans,
SXBOOLEAN  to_be_normalized 
)
SXINT dico_seek ( struct dico *  dico,
unsigned char word,
SXINT  lgth 
)

Definition at line 8954 of file fsa_mngr.c.

References sxdico_get().

static SXBOOLEAN epsilon_closure ( SXBA  cur_state_set  )  [static]

Definition at line 414 of file fsa_mngr.c.

References IS_EMPTY, nfa_empty_trans, POP, PUSH, part2attr::state, sxba_scan(), sxba_scan_reset(), SXBOOLEAN, SXFALSE, and SXTRUE.

Referenced by nfa2dfa(), and nfa2sxdfa().

static SXVOID erase ( SXBA_INDEX  pred,
SXBA_INDEX  next 
) [static]

Definition at line 2635 of file fsa_mngr.c.

Referenced by fsa2re_body().

static void erase_paths ( SXBA  cur_paths_set  )  [static]

Definition at line 3775 of file fsa_mngr.c.

References sxba_0_rlscan().

Referenced by remake_structures().

static void expand_paths ( void   )  [static]

Definition at line 3658 of file fsa_mngr.c.

References IS_EMPTY, POP, and PUSH.

Referenced by extract_factor().

static void extract_factor ( void   )  [static]
static struct node* factorize ( struct node or_ptr  )  [static, read]
static SXINT factorize_branch ( SXINT  branch  )  [static]

Definition at line 3644 of file fsa_mngr.c.

References gen_branch(), and gen_tree().

Referenced by extract_factor().

static SXUINT factorize_OR ( SXINT  or_code  )  [static]
static SXINT factorize_tree ( SXINT  tree  )  [static]

Definition at line 3695 of file fsa_mngr.c.

References gen_tree().

Referenced by extract_factor().

static void fill_dag_hd ( SXINT  p,
SXINT  t,
SXINT  q 
) [static]

Definition at line 4434 of file fsa_mngr.c.

References ATOMIC_CODE, dag_id2attr, make_code(), OR_TRANS, SXBOOLEAN, dag_attr::trans, and XxY_set().

Referenced by dag2re().

static void fill_init_min ( SXINT  state,
void(*)(SXINT, void(*dfa_fill_t_trans)(SXINT dfa_state, SXINT t, SXINT next_dfa_state))  cur_dfa_extract_trans 
) [static]

Definition at line 481 of file fsa_mngr.c.

References dfa_fill_full_trans(), dfa_fill_t_trans(), sxba_scan_reset(), and XH_set().

Referenced by dfa_minimize().

static void fill_old_state2max_path_lgth ( SXINT  prev_old_state,
SXINT  t,
SXINT  next_old_state 
) [static]

Definition at line 45 of file fsa_mngr.c.

References normalized_is_cyclic, old_state2max_path_lgth, state_set, and SXTRUE.

Referenced by fsa_normalize().

static void forward ( SXINT  part,
void(*)(SXINT p, SXINT t, SXINT q f 
) [static]

Definition at line 550 of file fsa_mngr.c.

References TOP.

Referenced by dfa_minimize().

static SXVOID free_tree_areas ( void   )  [static]

Definition at line 1784 of file fsa_mngr.c.

References tree_area::lnk, and p.

Referenced by fsa2re_body().

VARSTR fsa2re ( VARSTR  varstr_ptr,
SXBA *  R,
SXBA *  R_plus,
SXINT  size,
SXINT  initial_s,
SXINT  final_s,
SXINT(*)(SXBA_INDEX, SXBA_INDEX, char **)  get_name_refs,
char op[6] 
)

Definition at line 3233 of file fsa_mngr.c.

References fsa2re_body().

static VARSTR fsa2re_body ( VARSTR  varstr_ptr,
SXBA *  R,
SXBA *  R_plus,
SXINT  size,
SXINT  initial_s,
SXINT  final_s,
SXINT(*)(SXBA_INDEX, SXBA_INDEX, char **)  get_name_refs 
) [static]
void fsa_normalize ( SXINT  init_state,
SXINT  final_state,
SXINT  eof_ste,
void(*)(SXINT, void(*)(SXINT, SXINT, SXINT))  fsa_forward_trans,
void(*)(SXINT, SXINT, SXINT)  fsa_fill_trans 
)
VARSTR fsa_to_re ( VARSTR  varstr_ptr,
SXBA *  R,
SXBA *  R_plus,
SXINT  size,
SXINT  initial_s,
SXINT  final_s,
SXINT(*)(SXBA_INDEX, SXBA_INDEX, char **)  get_name_refs 
)

Definition at line 3242 of file fsa_mngr.c.

References fsa2re_body().

static SXVOID gather_op_sons ( struct node **  p_s,
SXINT *  xp,
struct node p,
SXINT  op 
) [static]
static SXVOID gen_a_loop ( SXBA_INDEX  pred,
SXBA_INDEX  next,
SXBA_INDEX  loop 
) [static]

Definition at line 2565 of file fsa_mngr.c.

References canon(), concat, plus, and star.

Referenced by fsa2re_body().

static SXINT gen_branch ( SXINT  branch,
SXINT  path,
SXBA  set,
SXBA  final_set 
) [static]

Definition at line 3612 of file fsa_mngr.c.

References gen_tree(), and XxY_is_set().

Referenced by factorize_branch(), and gen_tree().

static struct node * gen_prefixe ( struct node ***  p_s,
SXBA  set,
struct node node_ptr,
SXINT  or_no,
SXINT *  min_s,
SXINT *  MAX_s 
) [static, read]

Definition at line 2845 of file fsa_mngr.c.

References canon(), concat, option, process(), sets_open(), sets_pop, sxba_copy(), sxba_is_empty(), sxba_scan(), SXBOOLEAN, SXFALSE, and SXTRUE.

Referenced by process().

static SXVOID gen_splits ( SXBA_INDEX  pred,
SXBA_INDEX  next 
) [static]

Definition at line 2592 of file fsa_mngr.c.

References canon(), concat, option, or, q, sxba_calloc(), sxba_copy(), and sxba_scan().

Referenced by fsa2re_body().

static struct node * gen_suffixe ( struct node ***  p_s,
SXBA  set,
struct node node_ptr,
SXINT  or_no,
SXINT *  min_s,
SXINT *  MAX_s 
) [static, read]

Definition at line 2898 of file fsa_mngr.c.

References canon(), concat, option, process(), sets_open(), sets_pop, sxba_copy(), sxba_is_empty(), sxba_scan(), SXBOOLEAN, SXFALSE, and SXTRUE.

Referenced by process().

static SXINT gen_tree ( SXINT  tree,
SXINT  path,
SXBA  set,
SXBA  final_set 
) [static]
static SXBA_INDEX get_a_pred ( SXBA_INDEX  n  )  [static]

Definition at line 2551 of file fsa_mngr.c.

References sxba_scan().

Referenced by fsa2re_body().

static SXBA_INDEX get_current_node ( SXBA  get_current_node_to_be_processed  )  [static]

Definition at line 2645 of file fsa_mngr.c.

References n, and sxba_scan().

Referenced by fsa2re_body().

static SXBOOLEAN get_state ( SXBA  old_state_set,
SXINT *  new_state 
) [static]

Definition at line 1255 of file fsa_mngr.c.

References sxba_scan_reset(), and XH_set().

Referenced by nfa2dfa(), and nfa2sxdfa().

static void init_set ( SXINT  state,
SXINT  part 
) [static]
static SXINT install_a_comb ( SXBA *  comb_vector_ptr,
SXBA  comb,
SXBA *  base_pos_set_ptr 
) [static]

Definition at line 6783 of file fsa_mngr.c.

References comb_vector, sxba_0_lrscan(), sxba_resize(), sxba_scan(), and SXBITS_PER_LONG.

Referenced by sxdfa2comb_vector().

static SXVOID ints_free ( void   )  [static]

Definition at line 1707 of file fsa_mngr.c.

References ints::T.

Referenced by fsa2re_body().

static SXINT* ints_open ( SXINT  size  )  [static]

Definition at line 1677 of file fsa_mngr.c.

References ints::size, and ints::T.

Referenced by factorize().

static SXBOOLEAN is_a_member ( struct node p1,
struct node p2 
) [static]
static SXBOOLEAN is_a_staror_elem ( struct node node_ptr,
struct node **  result_ptr 
) [static]
static SXBOOLEAN is_a_sublanguage ( struct node left,
struct node right 
) [static]
static SXBOOLEAN is_a_subset ( struct node **  p_s,
SXINT  m1,
SXINT  M1,
struct node **  q_s,
SXINT  m2,
SXINT  M2 
) [static]

Definition at line 1986 of file fsa_mngr.c.

References SXFALSE, and SXTRUE.

Referenced by is_a_member(), and is_a_sublanguage().

static SXBOOLEAN is_an_element ( struct node head_ptr,
struct node elem_ptr,
SXINT  oper 
) [static]

Definition at line 1972 of file fsa_mngr.c.

References node::body, node::brother, node::name, p, and SXTRUE.

Referenced by is_a_member(), is_a_sublanguage(), and transform().

static SXBOOLEAN is_tail ( struct node p1,
struct node p2 
) [static]

Definition at line 1859 of file fsa_mngr.c.

References node::body, node::brother, concat, node::name, p, and SXFALSE.

Referenced by canon().

static SXBOOLEAN less ( SXINT  i,
SXINT  j 
) [static]

Definition at line 2277 of file fsa_mngr.c.

Referenced by create_or_list().

static SXINT make_a_new_trans ( SXINT  dag1_id,
SXINT  dag2_id 
) [static]
static SXUINT make_code ( SXUINT  code1,
SXUINT  code2,
SXUINT  what_to_do 
) [static]
static SXINT make_tree ( SXINT  path  )  [static]
static void move ( SXINT  state,
SXINT  part 
) [static]
static SXINT nb_op_sons ( struct node p,
SXINT  op 
) [static]
void nfa2dfa ( SXINT  init_state,
SXINT  final_state,
SXINT  max_state,
SXINT  eof_ste,
SXBOOLEAN(*)(SXINT, SXBA)  empty_trans,
void(*)(SXINT, void(*nfa_fill_trans)(SXINT, SXINT, SXINT))  nfa_extract_trans,
void(*)(SXINT, SXINT, SXINT, SXBOOLEAN)  dfa_fill_trans,
void(*)(SXINT, SXINT, SXINT)  mindfa_fill_trans,
SXBOOLEAN  to_be_normalized 
)
void nfa2sxdfa ( SXINT  init_state,
SXINT  cur_final_state,
SXINT  cur_max_state,
SXINT  eof_ste,
SXINT  trans_nb,
SXBOOLEAN(*)(SXINT, SXBA)  empty_trans,
void(*)(SXINT, void(*sxnfa_fill_trans)(SXINT nfa_state, SXINT t, SXINT next_nfa_state))  nfa_extract_trans,
struct sxdfa_struct *  sxdfa_ptr,
SXBOOLEAN  to_be_minimized,
SXBOOLEAN  to_be_normalized 
)
static void nfa_fill_trans ( SXINT  nfa_state,
SXINT  t,
SXINT  next_nfa_state 
) [static]

Definition at line 1267 of file fsa_mngr.c.

References PUSH.

Referenced by nfa2dfa().

SXBOOLEAN nfa_intersection ( SXINT  nfa1_init_state,
SXINT  nfa1_final_state,
SXINT  nfa1_max_state,
SXINT  nfa1_eof_ste,
SXINT  nfa2_init_state,
SXINT  nfa2_final_state,
SXINT  nfa2_max_state,
SXINT  nfa2_eof_ste,
SXBOOLEAN(*)(SXINT, SXBA)  nfa1_empty_trans,
SXBOOLEAN(*)(SXINT, SXBA)  nfa2_empty_trans,
void(*)(SXINT, void(*)(SXINT, SXINT, SXINT))  nfa1_extract_non_eps_trans,
void(*)(SXINT, void(*)(SXINT, SXINT, SXINT))  nfa2_extract_non_eps_trans,
void(*)(SXINT, SXINT, SXINT, SXBOOLEAN)  nfa_intersection_fill_trans 
)
static void nfa_intersection_fill_non_eps_trans ( SXINT  nfa_list,
void(*)(SXINT, void(*)(SXINT, SXINT, SXINT))  nfa1_extract_non_eps_trans 
) [static]

Definition at line 8527 of file fsa_mngr.c.

References nfa_intersection_process_a_non_eps_trans(), and top.

Referenced by nfa_intersection().

static SXINT nfa_intersection_make_eps_closure ( SXINT  t,
SXBOOLEAN(*)(SXINT, SXBA)  nfa_extract_empty_trans,
SXBOOLEAN *  contains_the_final_state 
) [static]

Definition at line 8548 of file fsa_mngr.c.

References IS_EMPTY, POP, PUSH, sxba_scan_reset(), SXBOOLEAN, SXTRUE, and XH_set().

Referenced by nfa_intersection().

static void nfa_intersection_process_a_non_eps_trans ( SXINT  p,
SXINT  t,
SXINT  q 
) [static]

Definition at line 8492 of file fsa_mngr.c.

References top.

Referenced by nfa_intersection(), and nfa_intersection_fill_non_eps_trans().

static void output_from_prev ( void   )  [static]

Definition at line 137 of file fsa_mngr.c.

References normalized_fsa_fill_trans, q, sxba_scan_reset(), and t_set.

Referenced by fsa_normalize(), and output_new_trans().

static SXINT output_new_trans ( SXINT  from_old_state,
SXINT  t,
SXINT  to_old_state 
) [static]

Definition at line 159 of file fsa_mngr.c.

References old_state2new_state, output_from_prev(), and save_a_trans().

Referenced by fsa_normalize().

static SXINT path2cost ( SXINT  path  )  [static]

Definition at line 3673 of file fsa_mngr.c.

Referenced by extract_factor().

static void paths_oflw ( SXINT  old_size,
SXINT  new_size 
) [static]

Definition at line 3396 of file fsa_mngr.c.

References sxba_resize().

Referenced by dag2re(), and sxdfadag2re().

static VARSTR print_code ( VARSTR  vstr,
SXUINT  code 
) [static]
static struct node* process ( struct node ***  p_s,
SXBA  set,
SXINT  or_no,
SXINT *  min_s,
SXINT *  MAX_s 
) [static, read]
static SXVOID process_substr ( struct node **  p_s,
SXINT  xstar,
SXINT  xconc,
SXINT  process_substr_M 
) [static]
static struct node* reduce ( struct node visited  )  [static, read]
static struct node * reduce_or_son ( struct node visited  )  [static, read]

Definition at line 2793 of file fsa_mngr.c.

References node::body, node::brother, canon(), node::name, or, and reduce().

Referenced by reduce().

static SXBOOLEAN remake_structures ( void   )  [static]

Definition at line 3805 of file fsa_mngr.c.

References erase_paths(), make_tree(), sxba_empty(), SXFALSE, SXTRUE, valid_paths(), XH_clear(), and XxY_clear().

Referenced by clear_branch(), and clear_tree().

static void save_a_trans ( SXINT  t,
SXINT  q 
) [static]

Definition at line 113 of file fsa_mngr.c.

References t_set.

Referenced by output_new_trans().

static SXBOOLEAN set_code ( SXUINT *  id  )  [static]

Definition at line 3415 of file fsa_mngr.c.

References ATOMIC_TRANS, code2id, code2trans, SXBOOLEAN, top, and XH_set().

Referenced by extract_factor(), factorize_OR(), gen_tree(), and make_code().

static SXVOID sets_free ( void   )  [static]

Definition at line 1754 of file fsa_mngr.c.

References sets::set.

Referenced by fsa2re_body().

static SXBA sets_open ( SXINT  size  )  [static]
static SXUINT string_get_next_symb ( struct sxdfa_private *  sxdfa_private_ptr  )  [static]
void sxdfa2c ( struct sxdfa_struct *  sxdfa_ptr,
FILE *  file,
char name,
SXBOOLEAN  is_static 
)

Definition at line 6496 of file fsa_mngr.c.

void sxdfa2comb_vector ( struct sxdfa_struct *  sxdfa_ptr,
SXINT  optim_kind,
SXINT  comb_vector_threshold,
struct sxdfa_comb *  sxdfa_comb_ptr 
)
void sxdfa2sxdfa_packed ( struct sxdfa_struct *  sxdfa_ptr,
struct sxdfa_packed_struct *  sxdfa_packed_ptr,
char name,
FILE *  stats 
)

Definition at line 8114 of file fsa_mngr.c.

References base_shift, ME, stop_mask, sxdfa_free(), SXFALSE, sxlast_bit(), sxtrap(), and top.

void sxdfa_alloc ( struct sxdfa_struct *  sxdfa_ptr,
SXINT  state_nb,
SXINT  trans_nb,
char name,
FILE *  stats 
)

Definition at line 5216 of file fsa_mngr.c.

References SXFALSE.

Referenced by nfa2sxdfa(), sxdfa_minimize(), sxdfa_normalize(), sxdfa_tree2min_dag(), and word_tree2sxdfa().

void sxdfa_comb2c ( struct sxdfa_comb *  sxdfa_comb_ptr,
FILE *  file,
char dico_name,
SXBOOLEAN  is_static 
)

Definition at line 7854 of file fsa_mngr.c.

References SXCHAR_TO_STRING.

void sxdfa_comb_free ( struct sxdfa_comb *  sxdfa_comb_ptr  ) 

Definition at line 8102 of file fsa_mngr.c.

SXINT sxdfa_comb_get ( struct sxdfa_comb *  dico,
char word,
SXINT  lgth 
)

Definition at line 8961 of file fsa_mngr.c.

References sxdfa_comb_seek_a_string().

SXINT sxdfa_comb_get_bounded ( struct sxdfa_comb *  dico,
char **  word_ptr,
SXINT *  lgth_ptr 
)

Definition at line 8968 of file fsa_mngr.c.

References sxdfa_comb_seek_a_string().

SXINT sxdfa_comb_seek ( struct sxdfa_comb *  sxdfa_comb_ptr,
SXUINT(*)(struct sxdfa_private *)  get_next_symb,
SXINT *  input_lgth 
)
SXINT sxdfa_comb_seek_a_string ( struct sxdfa_comb *  sxdfa_comb_ptr,
char kw,
SXINT *  kwl 
)
SXINT sxdfa_comb_seek_a_word ( struct sxdfa_comb *  sxdfa_comb_ptr,
SXINT *  input_stack 
)

Definition at line 7951 of file fsa_mngr.c.

References sxdfa_comb_seek(), and word_get_next_symb().

void sxdfa_extract_trans ( struct sxdfa_struct *  sxdfa_ptr,
SXINT  state,
SXBOOLEAN(*)(struct sxdfa_struct *, SXINT, SXINT, SXINT)  f 
)

Definition at line 6335 of file fsa_mngr.c.

References ME, sxtrap(), and top.

Referenced by sxdfadag2re().

static SXBOOLEAN sxdfa_fill_dag_hd ( struct sxdfa_struct *  sxdfa_ptr,
SXINT  p,
SXINT  t,
SXINT  q 
) [static]

Definition at line 6290 of file fsa_mngr.c.

References ATOMIC_CODE, dag_id2attr, make_code(), OR_TRANS, SXBOOLEAN, SXTRUE, dag_attr::trans, and XxY_set().

Referenced by sxdfadag2re().

static void sxdfa_fill_old_state2max_path_lgth ( struct sxdfa_struct *  sxdfa_ptr,
SXINT  state 
) [static]

Definition at line 6157 of file fsa_mngr.c.

References normalized_is_cyclic, old_state2max_path_lgth, state_set, SXTRUE, and top.

Referenced by sxdfa_normalize().

void sxdfa_free ( struct sxdfa_struct *  sxdfa_ptr  ) 

Definition at line 5232 of file fsa_mngr.c.

Referenced by sxdfa2sxdfa_packed(), sxdfa_minimize(), and sxdfa_tree2min_dag().

static void sxdfa_lgth_alloc ( SXINT  max_path_lgth,
SXINT  max_path_nb 
) [static]

Definition at line 4888 of file fsa_mngr.c.

References sxdfa_lp_push().

Referenced by word_tree2sxdfa().

static void sxdfa_lgth_free ( void   )  [static]

Definition at line 4900 of file fsa_mngr.c.

Referenced by word_tree2sxdfa().

static void sxdfa_lp_push ( SXINT  path,
SXINT  lgth 
) [static]

Definition at line 4880 of file fsa_mngr.c.

Referenced by sxdfa_lgth_alloc(), and word_tree2sxdfa().

void sxdfa_minimize ( struct sxdfa_struct *  sxdfa_ptr,
SXBOOLEAN  to_be_normalized 
)
void sxdfa_normalize ( struct sxdfa_struct *  sxdfa_ptr  ) 
void sxdfa_packed2c ( struct sxdfa_packed_struct *  sxdfa_packed_ptr,
FILE *  file,
char name,
SXBOOLEAN  is_static 
)

Definition at line 8408 of file fsa_mngr.c.

void sxdfa_packed_free ( struct sxdfa_packed_struct *  sxdfa_packed_ptr  ) 

Definition at line 8462 of file fsa_mngr.c.

SXINT sxdfa_packed_seek ( struct sxdfa_packed_struct *  sxdfa_packed_ptr,
SXUINT(*)(struct sxdfa_private *)  get_next_symb,
SXINT *  input_lgth 
)

Definition at line 8266 of file fsa_mngr.c.

References base_shift, last_final_id, stop_mask, and tooth.

Referenced by sxdfa_packed_seek_a_string(), and sxdfa_packed_seek_a_word().

SXINT sxdfa_packed_seek_a_string ( struct sxdfa_packed_struct *  sxdfa_packed_ptr,
char kw,
SXINT *  kwl 
)

Definition at line 8241 of file fsa_mngr.c.

References string_get_next_symb(), and sxdfa_packed_seek().

SXINT sxdfa_packed_seek_a_word ( struct sxdfa_packed_struct *  sxdfa_packed_ptr,
SXINT *  input_stack 
)

Definition at line 8251 of file fsa_mngr.c.

References sxdfa_packed_seek(), and word_get_next_symb().

SXINT sxdfa_seek ( struct sxdfa_struct *  sxdfa_ptr,
SXUINT(*)(struct sxdfa_private *)  get_next_symb,
SXINT *  input_lgth 
)

Definition at line 6623 of file fsa_mngr.c.

References last_final_id, ME, and sxtrap().

Referenced by sxdfa_seek_a_string(), and sxdfa_seek_a_word().

SXINT sxdfa_seek_a_string ( struct sxdfa_struct *  sxdfa_ptr,
char kw,
SXINT *  kwl 
)

Definition at line 6589 of file fsa_mngr.c.

References string_get_next_symb(), and sxdfa_seek().

SXINT sxdfa_seek_a_word ( struct sxdfa_struct *  sxdfa_ptr,
SXINT *  input_stack 
)

Definition at line 6599 of file fsa_mngr.c.

References sxdfa_seek(), and word_get_next_symb().

void sxdfa_tree2min_dag ( struct sxdfa_struct *  sxdfa_ptr  ) 

Definition at line 5259 of file fsa_mngr.c.

References ME, PUSH, sxdfa_alloc(), sxdfa_free(), sxtrap(), TOP, top, XH_alloc(), XH_free(), and XH_set().

Referenced by word_tree2sxdfa().

VARSTR sxdfadag2re ( VARSTR  varstr_ptr,
struct sxdfa_struct *  sxdfa_ptr,
char *(*)(SXINT)  get_trans_name 
)
static void sxnfa_fill_trans ( SXINT  nfa_state,
SXINT  t,
SXINT  next_nfa_state 
) [static]

Definition at line 5414 of file fsa_mngr.c.

Referenced by nfa2sxdfa().

static SXVOID tete_free ( void   )  [static]

Definition at line 1664 of file fsa_mngr.c.

References tete::T.

Referenced by fsa2re_body().

static struct node** tete_open ( SXINT  size  )  [static, read]
static SXVOID transform ( struct node **  left,
struct node **  right 
) [static]
static VARSTR tree_to_string ( VARSTR  varstr_ptr,
struct node node_ptr 
) [static]

Definition at line 2983 of file fsa_mngr.c.

References node::body, node::brother, concat, leaf, node::left, node::name, option, or, plus, node::right, star, node::string_ptr, and sxtrap().

Referenced by fsa2re_body().

static void trees_oflw ( SXINT  old_size,
SXINT  new_size 
) [static]

Definition at line 3407 of file fsa_mngr.c.

Referenced by dag2re(), and sxdfadag2re().

static SXBOOLEAN valid_paths ( SXINT  path  )  [static]

Definition at line 3789 of file fsa_mngr.c.

References SXBOOLEAN, SXFALSE, and SXTRUE.

Referenced by remake_structures().

static SXUINT word_get_next_symb ( struct sxdfa_private *  sxdfa_private_ptr  )  [static]
void word_tree2sxdfa ( struct word_tree_struct *  word_tree_ptr,
struct sxdfa_struct *  sxdfa_ptr,
char name,
FILE *  stats,
SXBOOLEAN  to_be_minimized 
)
SXINT word_tree_add ( struct word_tree_struct *  word_tree_ptr,
SXUINT(*)(struct sxdfa_private *)  get_next_symb,
SXINT  lgth,
SXINT  id 
)

Definition at line 4795 of file fsa_mngr.c.

References XxY_set().

Referenced by word_tree_add_a_string(), and word_tree_add_a_word().

SXINT word_tree_add_a_string ( struct word_tree_struct *  word_tree_ptr,
char string,
SXINT  string_lgth,
SXINT  id 
)

Definition at line 4777 of file fsa_mngr.c.

References string_get_next_symb(), and word_tree_add().

SXINT word_tree_add_a_word ( struct word_tree_struct *  word_tree_ptr,
SXINT *  input_stack,
SXINT  id 
)

Definition at line 4787 of file fsa_mngr.c.

References word_get_next_symb(), and word_tree_add().

void word_tree_alloc ( struct word_tree_struct *  word_tree_ptr,
char name,
SXINT  word_nb,
SXINT  word_lgth,
SXINT  Xforeach,
SXINT  Yforeach,
SXBOOLEAN  from_left_to_right,
SXBOOLEAN  with_path2id,
void(*)(SXINT, SXINT)  oflw,
FILE *  stats 
)

Definition at line 4695 of file fsa_mngr.c.

References sxba_calloc(), SXFALSE, XxY_alloc(), and XxY_set().

void word_tree_free ( struct word_tree_struct *  word_tree_ptr  ) 

Definition at line 4737 of file fsa_mngr.c.

References XxY_free().

Referenced by word_tree2sxdfa().

void word_tree_oflw ( struct word_tree_struct *  word_tree_ptr,
SXINT  old_size,
SXINT  new_size 
)

Definition at line 4683 of file fsa_mngr.c.

References sxba_resize().

SXINT word_tree_seek_a_string ( struct word_tree_struct *  word_tree_ptr,
char kw,
SXINT *  kwl 
)

Definition at line 4837 of file fsa_mngr.c.

References XxY_is_set().

static void XH_part_set_oflw ( SXINT  old_size,
SXINT  new_size 
) [static]

Definition at line 515 of file fsa_mngr.c.

Referenced by dfa_minimize(), and sxdfa_minimize().

static void XxY_nfa_intersection_states_oflw ( SXINT  old_size,
SXINT  new_size 
) [static]

Definition at line 8661 of file fsa_mngr.c.

References sxba_resize().

Referenced by nfa_intersection().

static void XxY_out_trans_oflw ( SXINT  old_size,
SXINT  new_size 
) [static]

Definition at line 1277 of file fsa_mngr.c.

Referenced by nfa2dfa().


Variable Documentation

SXINT* base2stack [static]

Definition at line 6776 of file fsa_mngr.c.

SXBA_INDEX_OR_ERROR base_comb_vector [static]

Definition at line 6775 of file fsa_mngr.c.

SXINT * branch2occur_nb [static]

Definition at line 3383 of file fsa_mngr.c.

XxY_header branches [static]

Definition at line 3381 of file fsa_mngr.c.

SXBA branches_set [static]

Definition at line 3385 of file fsa_mngr.c.

unsigned char* char_stack_list [static]

Definition at line 6777 of file fsa_mngr.c.

SXINT char_stack_list_size [static]

Definition at line 6776 of file fsa_mngr.c.

SXINT char_stack_list_top [static]

Definition at line 6776 of file fsa_mngr.c.

SXINT* code2size [static]

Definition at line 3258 of file fsa_mngr.c.

XH_header code_hd [static]

Definition at line 3257 of file fsa_mngr.c.

SXINT * code_stack [static]

Definition at line 3383 of file fsa_mngr.c.

SXINT cur_node_no [static]

Definition at line 1581 of file fsa_mngr.c.

SXBA_INDEX current [static]

Definition at line 1623 of file fsa_mngr.c.

Referenced by decompose_matrice_x(), decompose_matrice_y(), and is_a_right_ctxt().

char*(* dag_get_trans_name)(SXINT) [static]

Referenced by dag2re(), and sxdfadag2re().

XxY_header dag_hd [static]

Definition at line 3256 of file fsa_mngr.c.

Referenced by fill_CYK_ij(), and sxearley_parse_it().

SXINT dag_hd_trans_nb [static]

Definition at line 3251 of file fsa_mngr.c.

struct dag_attr * dag_id2attr [static]
SXINT dfa_final_state [static]

Definition at line 322 of file fsa_mngr.c.

SXINT dfa_init_state [static]

Definition at line 322 of file fsa_mngr.c.

SXINT* dfa_state2pred_nb [static]

Definition at line 333 of file fsa_mngr.c.

SXINT** dfa_state2pred_stack [static]

Definition at line 336 of file fsa_mngr.c.

SXINT dfa_state_nb [static]

Definition at line 324 of file fsa_mngr.c.

SXUINT eof_trans [static]

Definition at line 3250 of file fsa_mngr.c.

SXBA final_paths_set [static]

Definition at line 3385 of file fsa_mngr.c.

SXINT final_state [static]

Definition at line 3251 of file fsa_mngr.c.

Referenced by _lfsa_if(), and _rfsa_if().

SXINT** forward_stacks [static]

Definition at line 547 of file fsa_mngr.c.

struct node* head_s[head_s_no] [static]

Definition at line 1624 of file fsa_mngr.c.

SXINT* in [static]

Definition at line 1587 of file fsa_mngr.c.

Referenced by sxlist_set(), and sxpart_doit().

SXINT INITIAL_S [static]

Definition at line 1563 of file fsa_mngr.c.

struct ints* ints [static]

Definition at line 1614 of file fsa_mngr.c.

SXINT last_partition [static]

Definition at line 324 of file fsa_mngr.c.

struct node* leafs_hd[head_s_no] [static]

Definition at line 1625 of file fsa_mngr.c.

SXBA loop_set [static]

Definition at line 1591 of file fsa_mngr.c.

SXBA* M [static]

Definition at line 1564 of file fsa_mngr.c.

SXINT max_class_value [static]

Definition at line 6774 of file fsa_mngr.c.

char ME[] = "fsa_mngr" [static]
char** meta_op [static]

Definition at line 1554 of file fsa_mngr.c.

SXINT* nfa_ec_stack [static]

Definition at line 325 of file fsa_mngr.c.

SXBOOLEAN(* nfa_empty_trans)(SXINT, SXBA) [static]

Referenced by epsilon_closure(), nfa2dfa(), and nfa2sxdfa().

SXBA nfa_intersection_ec_set [static]

Definition at line 8488 of file fsa_mngr.c.

SXINT* nfa_intersection_ec_stack [static]

Definition at line 8489 of file fsa_mngr.c.

Definition at line 8658 of file fsa_mngr.c.

Referenced by nfa_intersection().

SXINT* nfa_intersection_tbp_stack [static]

Definition at line 8657 of file fsa_mngr.c.

SXINT * nfa_state_stack [static]

Definition at line 325 of file fsa_mngr.c.

SXINT * nfa_t_stack [static]

Definition at line 325 of file fsa_mngr.c.

SXBA nfa_wstate_set [static]

Definition at line 326 of file fsa_mngr.c.

void(* normalized_fsa_fill_trans)(SXINT, SXINT, SXINT) [static]

Referenced by fsa_normalize(), and output_from_prev().

void(* normalized_fsa_forward_trans)(SXINT, void(*fill_old_state2max_path_lgth)(SXINT, SXINT, SXINT)) [static]

Referenced by fsa_normalize().

SXBOOLEAN normalized_is_cyclic [static]
SXINT* old_state2max_path_lgth [static]
SXINT * old_state2new_state [static]

Definition at line 38 of file fsa_mngr.c.

Referenced by fsa_normalize(), output_new_trans(), and sxdfa_normalize().

SXINT * out [static]

Definition at line 1587 of file fsa_mngr.c.

struct node** P_S [static]

Definition at line 1592 of file fsa_mngr.c.

SXINT * part_set_id2part [static]

Definition at line 331 of file fsa_mngr.c.

SXINT* path2lgth [static]

Definition at line 3383 of file fsa_mngr.c.

SXINT * path2tree [static]

Definition at line 3383 of file fsa_mngr.c.

XxY_header paths [static]

Definition at line 3381 of file fsa_mngr.c.

SXBA paths_set [static]

Definition at line 3385 of file fsa_mngr.c.

SXINT* paths_stack [static]

Definition at line 3384 of file fsa_mngr.c.

XxY_header pathXbranch [static]

Definition at line 3381 of file fsa_mngr.c.

XxY_header pathXtree [static]

Definition at line 3381 of file fsa_mngr.c.

SXINT * pos2state [static]

Definition at line 331 of file fsa_mngr.c.

SXBA_INDEX prev [static]

Definition at line 1623 of file fsa_mngr.c.

Referenced by free_areas(), X_root_is_set(), and XH_set().

SXINT prev_from_new_state [static]

Definition at line 107 of file fsa_mngr.c.

struct node*** re_ptrs [static]

Definition at line 1582 of file fsa_mngr.c.

SXBA reached_set [static]

Definition at line 1591 of file fsa_mngr.c.

SXINT S[7][7] [static]
Initial value:
 {{0, 0, 0, 0, 0, 0, 0},
                 {  0, 1, 0, 2, 1, 1, 1},
                 {  0, 0, 0, 0, 0, 0, 0},
                 {  0, 3, 0, 4, 3, 5, 6},
                 {  0, 1, 0, 2, 1, 1, 1},
                 {  0, 1, 0, 6, 1, 1, 6},
                 {  0, 1, 0, 5, 1, 5, 1}  }

Definition at line 1556 of file fsa_mngr.c.

struct sets* sets [static]

Definition at line 1606 of file fsa_mngr.c.

SXINT SIZE [static]

Definition at line 1563 of file fsa_mngr.c.

Referenced by sxindparser().

SXINT size_of_ints [static]

Definition at line 1615 of file fsa_mngr.c.

SXINT size_of_sets [static]

Definition at line 1607 of file fsa_mngr.c.

SXINT size_of_tete [static]

Definition at line 1599 of file fsa_mngr.c.

SXINT size_of_to_be_sorted [static]

Definition at line 1619 of file fsa_mngr.c.

SXBA state_set [static]
SXBA succ_set [static]

Definition at line 1621 of file fsa_mngr.c.

SXINT* sxdfa_lgth2path [static]

Definition at line 4873 of file fsa_mngr.c.

SXINT * sxdfa_path2next [static]

Definition at line 4873 of file fsa_mngr.c.

SXBA* t2nfa_state_set [static]

Definition at line 327 of file fsa_mngr.c.

SXINT* t2pos [static]

Definition at line 331 of file fsa_mngr.c.

SXBA t_set [static]

Definition at line 326 of file fsa_mngr.c.

Referenced by _lfsa_if(), _rfsa_if(), output_from_prev(), and save_a_trans().

struct tete* tete [static]

Definition at line 1598 of file fsa_mngr.c.

SXBA to_be_processed [static]

Definition at line 1591 of file fsa_mngr.c.

Referenced by is_valid(), and models_dag().

SXINT* to_be_sorted [static]

Definition at line 1618 of file fsa_mngr.c.

Referenced by extract_dfa(), and fsa_normalize().

SXINT* to_new_state2t [static]

Definition at line 109 of file fsa_mngr.c.

SXBA * to_new_state2t_set [static]

Definition at line 108 of file fsa_mngr.c.

SXBA to_new_state_set [static]

Definition at line 108 of file fsa_mngr.c.

SXINT top_of_ints [static]

Definition at line 1615 of file fsa_mngr.c.

SXINT top_of_sets [static]

Definition at line 1607 of file fsa_mngr.c.

SXINT top_of_tete [static]

Definition at line 1599 of file fsa_mngr.c.

SXINT * tree2occur_nb [static]

Definition at line 3383 of file fsa_mngr.c.

SXINT * tree2size [static]

Definition at line 3383 of file fsa_mngr.c.

struct tree_area* tree_area_ptr [static]

Definition at line 1580 of file fsa_mngr.c.

XH_header trees [static]

Definition at line 3382 of file fsa_mngr.c.

char WHAT_FSA_TO_RE[] = "@(#)SYNTAX - $Id: fsa_mngr.c 1743 2009-06-08 13:32:55Z sagot $" WHAT_DEBUG

Definition at line 1541 of file fsa_mngr.c.

char WHAT_SXDAG_MNGR[] = "@(#)SYNTAX - $Id: fsa_mngr.c 1743 2009-06-08 13:32:55Z sagot $" WHAT_DEBUG

Definition at line 25 of file fsa_mngr.c.

SXINT x_of_ints [static]

Definition at line 1615 of file fsa_mngr.c.

SXINT x_of_sets [static]

Definition at line 1607 of file fsa_mngr.c.

SXINT x_of_tete [static]

Definition at line 1599 of file fsa_mngr.c.

XH_header XH_dfa_states [static]

Definition at line 328 of file fsa_mngr.c.

XH_header XH_intersection_state_list_hd [static]

Definition at line 8487 of file fsa_mngr.c.

XH_header XH_part_set [static]

Definition at line 332 of file fsa_mngr.c.

XH_header XH_t_trans [static]

Definition at line 332 of file fsa_mngr.c.

XH_header XH_trans_list_id [static]

Definition at line 332 of file fsa_mngr.c.

XxY_header XxY_out_trans [static]

Definition at line 334 of file fsa_mngr.c.

SXINT* XxY_out_trans2next_state [static]

Definition at line 335 of file fsa_mngr.c.


Generated on Wed Apr 21 16:39:35 2010 for syntax-6.0b7 by  doxygen 1.6.1