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_s
struct | jsgf_rhs_s
struct | jsgf_atom_s
struct | jsgf_link_s

## Macros

#define | YY_NO_UNISTD_H 1
#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

## Functions

void | jsgf_add_link (jsgf_t *grammar, jsgf_atom_t *atom, int from, int to)
jsgf_atom_t * | jsgf_atom_new (char *name, float weight)
jsgf_atom_t * | jsgf_kleene_new (jsgf_t *jsgf, jsgf_atom_t *atom, int plus)
jsgf_rule_t * | jsgf_optional_new (jsgf_t *jsgf, jsgf_rhs_t *exp)
jsgf_rule_t * | jsgf_define_rule (jsgf_t *jsgf, char *name, jsgf_rhs_t *rhs, int public)
jsgf_rule_t * | jsgf_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_t * | jsgf_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 113 of file jsgf_internal.h.

## YY_NO_INPUT

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

Definition at line 63 of file jsgf_internal.h.

## YY_NO_UNISTD_H

#define YY_NO_UNISTD_H 1

Definition at line 45 of file jsgf_internal.h.

## Typedef Documentation

## jsgf_atom_t

typedef struct jsgf_atom_s jsgf_atom_t

Definition at line 66 of file jsgf_internal.h.

## jsgf_link_t

typedef struct jsgf_link_s jsgf_link_t

Definition at line 67 of file jsgf_internal.h.

## jsgf_rhs_t

typedef struct jsgf_rhs_s jsgf_rhs_t

Definition at line 65 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 208 of file jsgf.c.

## jsgf_atom_free()

int jsgf_atom_free | ( | jsgf_atom_t * | atom | ) |

Definition at line 69 of file jsgf.c.

## jsgf_atom_new()

jsgf_atom_t * jsgf_atom_new | ( | char * | name,
|  | float | weight
| ) |  |

Definition at line 58 of file jsgf.c.

## jsgf_define_rule()

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

Definition at line 559 of file jsgf.c.

## jsgf_import_rule()

jsgf_rule_t * jsgf_import_rule | ( | jsgf_t * | jsgf,
|  | char * | name
| ) |  |

Definition at line 635 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 174 of file jsgf.c.

## jsgf_optional_new()

jsgf_rule_t * jsgf_optional_new | ( | jsgf_t * | jsgf,
|  | jsgf_rhs_t * | exp
| ) |  |

Definition at line 198 of file jsgf.c.

## jsgf_rule_free()

int jsgf_rule_free | ( | jsgf_rule_t * | rule | ) |

Definition at line 599 of file jsgf.c.

## jsgf_rule_retain()

jsgf_rule_t * jsgf_rule_retain | ( | jsgf_rule_t * | rule | ) |

Definition at line 592 of file jsgf.c.