Librarian routines for automata. More...
Go to the source code of this file.
Data Structures | |
struct | gfsmAutomatonHeader |
Header info for binary files. More... | |
struct | gfsmStoredState |
Type for a stored state. More... | |
struct | gfsmStoredArc |
Type for a stored arc (no 'source' field) More... |
Variables | |
const gchar | gfsm_header_magic [16] |
const gfsmVersionInfo | gfsm_version_bincompat_min_store |
const gfsmVersionInfo | gfsm_version_bincompat_min_check |
Automaton Methods: Text I/O | |
#define | gfsm_automaton_compile_file(fsm, filep, errp) gfsm_automaton_compile_file_full((fsm),(filep),NULL,NULL,NULL,(errp)) |
#define | gfsm_automaton_compile_filename(fsm, filename, errp) gfsm_automaton_compile_filename_full((fsm),(filename),NULL,NULL,NULL,(errp)) |
#define | gfsm_automaton_print_file(fsm, filep, errp) gfsm_automaton_print_file_full((fsm),(filep),NULL,NULL,NULL,0,(errp)) |
#define | gfsm_automaton_print_filename(fsm, filep, errp) gfsm_automaton_print_filename_full((fsm),(filep),NULL,NULL,NULL,0,(errp)) |
gboolean | gfsm_automaton_compile_handle (gfsmAutomaton *fsm, gfsmIOHandle *ioh, gfsmAlphabet *lo_alphabet, gfsmAlphabet *hi_alphabet, gfsmAlphabet *state_alphabet, gfsmError **errp) |
gboolean | gfsm_automaton_compile_file_full (gfsmAutomaton *fsm, FILE *f, gfsmAlphabet *lo_alphabet, gfsmAlphabet *hi_alphabet, gfsmAlphabet *state_alphabet, gfsmError **errp) |
gboolean | gfsm_automaton_compile_filename_full (gfsmAutomaton *fsm, const gchar *filename, gfsmAlphabet *lo_alphabet, gfsmAlphabet *hi_alphabet, gfsmAlphabet *state_alphabet, gfsmError **errp) |
gboolean | gfsm_automaton_compile_gstring_full (gfsmAutomaton *fsm, GString *gs, gfsmAlphabet *lo_alphabet, gfsmAlphabet *hi_alphabet, gfsmAlphabet *state_alphabet, gfsmError **errp) |
gboolean | gfsm_automaton_print_handle (gfsmAutomaton *fsm, gfsmIOHandle *ioh, gfsmAlphabet *lo_alphabet, gfsmAlphabet *hi_alphabet, gfsmAlphabet *state_alphabet, gfsmError **errp) |
gboolean | gfsm_automaton_print_file_full (gfsmAutomaton *fsm, FILE *f, gfsmAlphabet *lo_alphabet, gfsmAlphabet *hi_alphabet, gfsmAlphabet *state_alphabet, int zlevel, gfsmError **errp) |
gboolean | gfsm_automaton_print_filename_full (gfsmAutomaton *fsm, const gchar *filename, gfsmAlphabet *lo_alphabet, gfsmAlphabet *hi_alphabet, gfsmAlphabet *state_alphabet, int zlevel, gfsmError **errp) |
gboolean | gfsm_automaton_print_gstring_full (gfsmAutomaton *fsm, GString *gs, gfsmAlphabet *lo_alphabet, gfsmAlphabet *hi_alphabet, gfsmAlphabet *state_alphabet, gfsmError **errp) |
#define gfsm_automaton_compile_file | ( | fsm, | |
filep, | |||
errp | |||
) | gfsm_automaton_compile_file_full((fsm),(filep),NULL,NULL,NULL,(errp)) |
Convenience macro for compiling all-numeric-id text streams
#define gfsm_automaton_compile_filename | ( | fsm, | |
filename, | |||
errp | |||
) | gfsm_automaton_compile_filename_full((fsm),(filename),NULL,NULL,NULL,(errp)) |
Convenience macro for compiling all-numeric-id named text files
#define gfsm_automaton_print_file | ( | fsm, | |
filep, | |||
errp | |||
) | gfsm_automaton_print_file_full((fsm),(filep),NULL,NULL,NULL,0,(errp)) |
Convenience macro for printing to uncompresed all-numeric-id text streams
#define gfsm_automaton_print_filename | ( | fsm, | |
filep, | |||
errp | |||
) | gfsm_automaton_print_filename_full((fsm),(filep),NULL,NULL,NULL,0,(errp)) |
Convenience macro for printing to uncompressed all-numeric-id named text files
gboolean gfsm_automaton_load_header | ( | gfsmAutomatonHeader * | hdr, |
gfsmIOHandle * | ioh, | ||
gfsmError ** | errp | ||
) |
Load an automaton header from a stored binary file. Returns TRUE iff the header looks valid.
gboolean gfsm_automaton_load_bin_handle | ( | gfsmAutomaton * | fsm, |
gfsmIOHandle * | ioh, | ||
gfsmError ** | errp | ||
) |
Load an automaton from a named binary file (implicitly clear()s fsm)
gboolean gfsm_automaton_load_bin_file | ( | gfsmAutomaton * | fsm, |
FILE * | f, | ||
gfsmError ** | errp | ||
) |
Load an automaton from a stored binary file (implicitly clear()s fsm)
gboolean gfsm_automaton_load_bin_filename | ( | gfsmAutomaton * | fsm, |
const gchar * | filename, | ||
gfsmError ** | errp | ||
) |
Load an automaton from a named binary file (implicitly clear()s fsm)
gboolean gfsm_automaton_load_bin_gstring | ( | gfsmAutomaton * | fsm, |
GString * | gs, | ||
gfsmError ** | errp | ||
) |
Load an automaton from an in-memory buffer
gboolean gfsm_automaton_save_bin_handle | ( | gfsmAutomaton * | fsm, |
gfsmIOHandle * | ioh, | ||
gfsmError ** | errp | ||
) |
Store an automaton in binary form to a gfsmIOHandle*
gboolean gfsm_automaton_save_bin_file | ( | gfsmAutomaton * | fsm, |
FILE * | f, | ||
gfsmError ** | errp | ||
) |
Store an automaton in binary form to a file
gboolean gfsm_automaton_save_bin_filename_nc | ( | gfsmAutomaton * | fsm, |
const gchar * | filename, | ||
gfsmError ** | errp | ||
) |
Store an automaton to a named binary file (no compression)
gboolean gfsm_automaton_save_bin_filename | ( | gfsmAutomaton * | fsm, |
const gchar * | filename, | ||
int | zlevel, | ||
gfsmError ** | errp | ||
) |
Store an automaton to a named binary file, possibly compressing. Set zlevel=-1 for default compression, and set zlevel=0 for no compression, otherwise should be as for zlib (1 <= zlevel <= 9)
gboolean gfsm_automaton_save_bin_gstring | ( | gfsmAutomaton * | fsm, |
GString * | gs, | ||
gfsmError ** | errp | ||
) |
Append an uncompressed binary automaton to an in-memory buffer
gboolean gfsm_automaton_compile_handle | ( | gfsmAutomaton * | fsm, |
gfsmIOHandle * | ioh, | ||
gfsmAlphabet * | lo_alphabet, | ||
gfsmAlphabet * | hi_alphabet, | ||
gfsmAlphabet * | state_alphabet, | ||
gfsmError ** | errp | ||
) |
Load an automaton in Ma-Bell-compatible text-format from a gfsmIOHandle*
gboolean gfsm_automaton_compile_file_full | ( | gfsmAutomaton * | fsm, |
FILE * | f, | ||
gfsmAlphabet * | lo_alphabet, | ||
gfsmAlphabet * | hi_alphabet, | ||
gfsmAlphabet * | state_alphabet, | ||
gfsmError ** | errp | ||
) |
Load an automaton in Ma-Bell-compatible text-format from a FILE*
gboolean gfsm_automaton_compile_filename_full | ( | gfsmAutomaton * | fsm, |
const gchar * | filename, | ||
gfsmAlphabet * | lo_alphabet, | ||
gfsmAlphabet * | hi_alphabet, | ||
gfsmAlphabet * | state_alphabet, | ||
gfsmError ** | errp | ||
) |
Load an automaton in Ma-Bell-compatible text-format from a named file, possibly compressed.
gboolean gfsm_automaton_compile_gstring_full | ( | gfsmAutomaton * | fsm, |
GString * | gs, | ||
gfsmAlphabet * | lo_alphabet, | ||
gfsmAlphabet * | hi_alphabet, | ||
gfsmAlphabet * | state_alphabet, | ||
gfsmError ** | errp | ||
) |
Load an automaton in Ma-Bell-compatible text-format from an in-memory buffer
gboolean gfsm_automaton_print_handle | ( | gfsmAutomaton * | fsm, |
gfsmIOHandle * | ioh, | ||
gfsmAlphabet * | lo_alphabet, | ||
gfsmAlphabet * | hi_alphabet, | ||
gfsmAlphabet * | state_alphabet, | ||
gfsmError ** | errp | ||
) |
Print an automaton in Ma-Bell-compatible text-format to a gfsmIOHandle*
gboolean gfsm_automaton_print_file_full | ( | gfsmAutomaton * | fsm, |
FILE * | f, | ||
gfsmAlphabet * | lo_alphabet, | ||
gfsmAlphabet * | hi_alphabet, | ||
gfsmAlphabet * | state_alphabet, | ||
int | zlevel, | ||
gfsmError ** | errp | ||
) |
Print an automaton in Ma-Bell-compatible text-format to a FILE*
gboolean gfsm_automaton_print_filename_full | ( | gfsmAutomaton * | fsm, |
const gchar * | filename, | ||
gfsmAlphabet * | lo_alphabet, | ||
gfsmAlphabet * | hi_alphabet, | ||
gfsmAlphabet * | state_alphabet, | ||
int | zlevel, | ||
gfsmError ** | errp | ||
) |
Print an automaton in Ma-Bell-compatible text-format to a named file
gboolean gfsm_automaton_print_gstring_full | ( | gfsmAutomaton * | fsm, |
GString * | gs, | ||
gfsmAlphabet * | lo_alphabet, | ||
gfsmAlphabet * | hi_alphabet, | ||
gfsmAlphabet * | state_alphabet, | ||
gfsmError ** | errp | ||
) |
Print an automaton in Ma-Bell-compatible text-format to an in-memory buffer
const gchar gfsm_header_magic[16] |
Magic header string for stored gfsm files
const gfsmVersionInfo gfsm_version_bincompat_min_store |
Minimum libgfsm version required for loading files stored by this version of libgfsm
const gfsmVersionInfo gfsm_version_bincompat_min_check |
Minimum libgfsm version whose binary files this version of libgfsm can read