SphinxBase 5prealpha
jsgf_internal.h File Reference

Internal definitions for JSGF grammar compiler. More...

#include <stdio.h>
#include <sphinxbase/hash_table.h>
#include <sphinxbase/glist.h>
#include <sphinxbase/fsg_model.h>
#include <sphinxbase/logmath.h>
#include <sphinxbase/strfuncs.h>
#include <sphinxbase/jsgf.h>

Go to the source code of this file.

Data Structures

struct  jsgf_s
 
struct  jsgf_rule_stack_s
 
struct  jsgf_rule_s
 
struct  jsgf_rhs_s
 
struct  jsgf_atom_s
 
struct  jsgf_link_s
 

Macros

#define YY_NO_INPUT   /* Silence a compiler warning. */
 
#define jsgf_atom_is_rule(atom)   ((atom)->name[0] == '<')
 

Typedefs

typedef struct jsgf_rhs_s jsgf_rhs_t
 
typedef struct jsgf_atom_s jsgf_atom_t
 
typedef struct jsgf_link_s jsgf_link_t
 
typedef struct jsgf_rule_stack_s jsgf_rule_stack_t
 

Functions

void jsgf_add_link (jsgf_t *grammar, jsgf_atom_t *atom, int from, int to)
 
jsgf_atom_tjsgf_atom_new (char *name, float weight)
 
jsgf_atom_tjsgf_kleene_new (jsgf_t *jsgf, jsgf_atom_t *atom, int plus)
 
jsgf_rule_tjsgf_optional_new (jsgf_t *jsgf, jsgf_rhs_t *exp)
 
jsgf_rule_tjsgf_define_rule (jsgf_t *jsgf, char *name, jsgf_rhs_t *rhs, int is_public)
 
jsgf_rule_tjsgf_import_rule (jsgf_t *jsgf, char *name)
 
int jsgf_atom_free (jsgf_atom_t *atom)
 
int jsgf_rule_free (jsgf_rule_t *rule)
 
jsgf_rule_tjsgf_rule_retain (jsgf_rule_t *rule)
 

Detailed Description

Internal definitions for JSGF grammar compiler.

Definition in file jsgf_internal.h.

Macro Definition Documentation

◆ jsgf_atom_is_rule

#define jsgf_atom_is_rule (   atom)    ((atom)->name[0] == '<')

Definition at line 122 of file jsgf_internal.h.

◆ YY_NO_INPUT

#define YY_NO_INPUT   /* Silence a compiler warning. */

Definition at line 68 of file jsgf_internal.h.

Typedef Documentation

◆ jsgf_atom_t

typedef struct jsgf_atom_s jsgf_atom_t

Definition at line 71 of file jsgf_internal.h.

◆ jsgf_link_t

typedef struct jsgf_link_s jsgf_link_t

Definition at line 72 of file jsgf_internal.h.

◆ jsgf_rhs_t

typedef struct jsgf_rhs_s jsgf_rhs_t

Definition at line 70 of file jsgf_internal.h.

◆ jsgf_rule_stack_t

Definition at line 73 of file jsgf_internal.h.

Function Documentation

◆ jsgf_add_link()

void jsgf_add_link ( jsgf_t grammar,
jsgf_atom_t atom,
int  from,
int  to 
)

Definition at line 191 of file jsgf.c.

◆ jsgf_atom_free()

int jsgf_atom_free ( jsgf_atom_t atom)

Definition at line 76 of file jsgf.c.

◆ jsgf_atom_new()

jsgf_atom_t * jsgf_atom_new ( char *  name,
float  weight 
)

Definition at line 65 of file jsgf.c.

◆ jsgf_define_rule()

jsgf_rule_t * jsgf_define_rule ( jsgf_t jsgf,
char *  name,
jsgf_rhs_t rhs,
int  is_public 
)

Definition at line 681 of file jsgf.c.

◆ jsgf_import_rule()

jsgf_rule_t * jsgf_import_rule ( jsgf_t jsgf,
char *  name 
)

Definition at line 759 of file jsgf.c.

◆ jsgf_kleene_new()

jsgf_atom_t * jsgf_kleene_new ( jsgf_t jsgf,
jsgf_atom_t atom,
int  plus 
)

Definition at line 157 of file jsgf.c.

◆ jsgf_optional_new()

jsgf_rule_t * jsgf_optional_new ( jsgf_t jsgf,
jsgf_rhs_t exp 
)

Definition at line 181 of file jsgf.c.

◆ jsgf_rule_free()

int jsgf_rule_free ( jsgf_rule_t rule)

Definition at line 722 of file jsgf.c.

◆ jsgf_rule_retain()

jsgf_rule_t * jsgf_rule_retain ( jsgf_rule_t rule)

Definition at line 715 of file jsgf.c.