\doxysection{src/libsphinxbase/lm/jsgf\+\_\+internal.h File Reference}
\label{jsgf__internal_8h}\index{src/libsphinxbase/lm/jsgf\_internal.h@{src/libsphinxbase/lm/jsgf\_internal.h}}


Internal definitions for JSGF grammar compiler.  


{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$sphinxbase/hash\+\_\+table.\+h$>$}\newline
{\ttfamily \#include $<$sphinxbase/glist.\+h$>$}\newline
{\ttfamily \#include $<$sphinxbase/fsg\+\_\+model.\+h$>$}\newline
{\ttfamily \#include $<$sphinxbase/logmath.\+h$>$}\newline
{\ttfamily \#include $<$sphinxbase/strfuncs.\+h$>$}\newline
{\ttfamily \#include $<$sphinxbase/jsgf.\+h$>$}\newline
\doxysubsubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ jsgf\+\_\+s}
\item 
struct \textbf{ jsgf\+\_\+rule\+\_\+s}
\item 
struct \textbf{ jsgf\+\_\+rhs\+\_\+s}
\item 
struct \textbf{ jsgf\+\_\+atom\+\_\+s}
\item 
struct \textbf{ jsgf\+\_\+link\+\_\+s}
\end{DoxyCompactItemize}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ YY\+\_\+\+NO\+\_\+\+UNISTD\+\_\+H}~1
\item 
\#define \textbf{ YY\+\_\+\+NO\+\_\+\+INPUT}~/$\ast$ Silence a compiler warning. $\ast$/
\item 
\#define \textbf{ jsgf\+\_\+atom\+\_\+is\+\_\+rule}(atom)~((atom)-\/$>$name[0] == \textquotesingle{}$<$\textquotesingle{})
\end{DoxyCompactItemize}
\doxysubsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \textbf{ jsgf\+\_\+rhs\+\_\+s} \textbf{ jsgf\+\_\+rhs\+\_\+t}
\item 
typedef struct \textbf{ jsgf\+\_\+atom\+\_\+s} \textbf{ jsgf\+\_\+atom\+\_\+t}
\item 
typedef struct \textbf{ jsgf\+\_\+link\+\_\+s} \textbf{ jsgf\+\_\+link\+\_\+t}
\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ jsgf\+\_\+add\+\_\+link} (\textbf{ jsgf\+\_\+t} $\ast$grammar, \textbf{ jsgf\+\_\+atom\+\_\+t} $\ast$atom, int from, int to)
\item 
\textbf{ jsgf\+\_\+atom\+\_\+t} $\ast$ \textbf{ jsgf\+\_\+atom\+\_\+new} (char $\ast$name, float weight)
\item 
\textbf{ jsgf\+\_\+atom\+\_\+t} $\ast$ \textbf{ jsgf\+\_\+kleene\+\_\+new} (\textbf{ jsgf\+\_\+t} $\ast$jsgf, \textbf{ jsgf\+\_\+atom\+\_\+t} $\ast$atom, int plus)
\item 
\textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$ \textbf{ jsgf\+\_\+optional\+\_\+new} (\textbf{ jsgf\+\_\+t} $\ast$jsgf, \textbf{ jsgf\+\_\+rhs\+\_\+t} $\ast$exp)
\item 
\textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$ \textbf{ jsgf\+\_\+define\+\_\+rule} (\textbf{ jsgf\+\_\+t} $\ast$jsgf, char $\ast$name, \textbf{ jsgf\+\_\+rhs\+\_\+t} $\ast$rhs, int public)
\item 
\textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$ \textbf{ jsgf\+\_\+import\+\_\+rule} (\textbf{ jsgf\+\_\+t} $\ast$jsgf, char $\ast$name)
\item 
int \textbf{ jsgf\+\_\+atom\+\_\+free} (\textbf{ jsgf\+\_\+atom\+\_\+t} $\ast$atom)
\item 
int \textbf{ jsgf\+\_\+rule\+\_\+free} (\textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$rule)
\item 
\textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$ \textbf{ jsgf\+\_\+rule\+\_\+retain} (\textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$rule)
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Internal definitions for JSGF grammar compiler. 



Definition in file \textbf{ jsgf\+\_\+internal.\+h}.



\doxysubsection{Macro Definition Documentation}
\label{jsgf__internal_8h_ac4452bbb59863e64d73f4fe2d6cd394f} 
\index{jsgf\_internal.h@{jsgf\_internal.h}!jsgf\_atom\_is\_rule@{jsgf\_atom\_is\_rule}}
\index{jsgf\_atom\_is\_rule@{jsgf\_atom\_is\_rule}!jsgf\_internal.h@{jsgf\_internal.h}}
\doxysubsubsection{jsgf\_atom\_is\_rule}
{\footnotesize\ttfamily \#define jsgf\+\_\+atom\+\_\+is\+\_\+rule(\begin{DoxyParamCaption}\item[{}]{atom }\end{DoxyParamCaption})~((atom)-\/$>$name[0] == \textquotesingle{}$<$\textquotesingle{})}



Definition at line \textbf{ 113} of file \textbf{ jsgf\+\_\+internal.\+h}.

\label{jsgf__internal_8h_a85523a0c7d95c059d251b4e9829947aa} 
\index{jsgf\_internal.h@{jsgf\_internal.h}!YY\_NO\_INPUT@{YY\_NO\_INPUT}}
\index{YY\_NO\_INPUT@{YY\_NO\_INPUT}!jsgf\_internal.h@{jsgf\_internal.h}}
\doxysubsubsection{YY\_NO\_INPUT}
{\footnotesize\ttfamily \#define YY\+\_\+\+NO\+\_\+\+INPUT~/$\ast$ Silence a compiler warning. $\ast$/}



Definition at line \textbf{ 63} of file \textbf{ jsgf\+\_\+internal.\+h}.

\label{jsgf__internal_8h_ae78ac56cd1f29572e967ed7636952d15} 
\index{jsgf\_internal.h@{jsgf\_internal.h}!YY\_NO\_UNISTD\_H@{YY\_NO\_UNISTD\_H}}
\index{YY\_NO\_UNISTD\_H@{YY\_NO\_UNISTD\_H}!jsgf\_internal.h@{jsgf\_internal.h}}
\doxysubsubsection{YY\_NO\_UNISTD\_H}
{\footnotesize\ttfamily \#define YY\+\_\+\+NO\+\_\+\+UNISTD\+\_\+H~1}



Definition at line \textbf{ 45} of file \textbf{ jsgf\+\_\+internal.\+h}.



\doxysubsection{Typedef Documentation}
\label{jsgf__internal_8h_a439a04913bdb6a58d86ad152b952f0ee} 
\index{jsgf\_internal.h@{jsgf\_internal.h}!jsgf\_atom\_t@{jsgf\_atom\_t}}
\index{jsgf\_atom\_t@{jsgf\_atom\_t}!jsgf\_internal.h@{jsgf\_internal.h}}
\doxysubsubsection{jsgf\_atom\_t}
{\footnotesize\ttfamily typedef struct \textbf{ jsgf\+\_\+atom\+\_\+s} \textbf{ jsgf\+\_\+atom\+\_\+t}}



Definition at line \textbf{ 66} of file \textbf{ jsgf\+\_\+internal.\+h}.

\label{jsgf__internal_8h_a5b84ef71c936d856751f19992a7245eb} 
\index{jsgf\_internal.h@{jsgf\_internal.h}!jsgf\_link\_t@{jsgf\_link\_t}}
\index{jsgf\_link\_t@{jsgf\_link\_t}!jsgf\_internal.h@{jsgf\_internal.h}}
\doxysubsubsection{jsgf\_link\_t}
{\footnotesize\ttfamily typedef struct \textbf{ jsgf\+\_\+link\+\_\+s} \textbf{ jsgf\+\_\+link\+\_\+t}}



Definition at line \textbf{ 67} of file \textbf{ jsgf\+\_\+internal.\+h}.

\label{jsgf__internal_8h_ad8fc00ae94c7a558005de3e89c35142f} 
\index{jsgf\_internal.h@{jsgf\_internal.h}!jsgf\_rhs\_t@{jsgf\_rhs\_t}}
\index{jsgf\_rhs\_t@{jsgf\_rhs\_t}!jsgf\_internal.h@{jsgf\_internal.h}}
\doxysubsubsection{jsgf\_rhs\_t}
{\footnotesize\ttfamily typedef struct \textbf{ jsgf\+\_\+rhs\+\_\+s} \textbf{ jsgf\+\_\+rhs\+\_\+t}}



Definition at line \textbf{ 65} of file \textbf{ jsgf\+\_\+internal.\+h}.



\doxysubsection{Function Documentation}
\label{jsgf__internal_8h_acb5af4a04abc56a8584eba9b937f8154} 
\index{jsgf\_internal.h@{jsgf\_internal.h}!jsgf\_add\_link@{jsgf\_add\_link}}
\index{jsgf\_add\_link@{jsgf\_add\_link}!jsgf\_internal.h@{jsgf\_internal.h}}
\doxysubsubsection{jsgf\_add\_link()}
{\footnotesize\ttfamily void jsgf\+\_\+add\+\_\+link (\begin{DoxyParamCaption}\item[{\textbf{ jsgf\+\_\+t} $\ast$}]{grammar,  }\item[{\textbf{ jsgf\+\_\+atom\+\_\+t} $\ast$}]{atom,  }\item[{int}]{from,  }\item[{int}]{to }\end{DoxyParamCaption})}



Definition at line \textbf{ 208} of file \textbf{ jsgf.\+c}.

\label{jsgf__internal_8h_a289d683bf62d1a5aaac6917fa64f54f2} 
\index{jsgf\_internal.h@{jsgf\_internal.h}!jsgf\_atom\_free@{jsgf\_atom\_free}}
\index{jsgf\_atom\_free@{jsgf\_atom\_free}!jsgf\_internal.h@{jsgf\_internal.h}}
\doxysubsubsection{jsgf\_atom\_free()}
{\footnotesize\ttfamily int jsgf\+\_\+atom\+\_\+free (\begin{DoxyParamCaption}\item[{\textbf{ jsgf\+\_\+atom\+\_\+t} $\ast$}]{atom }\end{DoxyParamCaption})}



Definition at line \textbf{ 69} of file \textbf{ jsgf.\+c}.

\label{jsgf__internal_8h_a3088c3df99f8eb09774214d7ecabcc47} 
\index{jsgf\_internal.h@{jsgf\_internal.h}!jsgf\_atom\_new@{jsgf\_atom\_new}}
\index{jsgf\_atom\_new@{jsgf\_atom\_new}!jsgf\_internal.h@{jsgf\_internal.h}}
\doxysubsubsection{jsgf\_atom\_new()}
{\footnotesize\ttfamily \textbf{ jsgf\+\_\+atom\+\_\+t} $\ast$ jsgf\+\_\+atom\+\_\+new (\begin{DoxyParamCaption}\item[{char $\ast$}]{name,  }\item[{float}]{weight }\end{DoxyParamCaption})}



Definition at line \textbf{ 58} of file \textbf{ jsgf.\+c}.

\label{jsgf__internal_8h_a0302bb081e44feaeb44071ac16f2459b} 
\index{jsgf\_internal.h@{jsgf\_internal.h}!jsgf\_define\_rule@{jsgf\_define\_rule}}
\index{jsgf\_define\_rule@{jsgf\_define\_rule}!jsgf\_internal.h@{jsgf\_internal.h}}
\doxysubsubsection{jsgf\_define\_rule()}
{\footnotesize\ttfamily \textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$ jsgf\+\_\+define\+\_\+rule (\begin{DoxyParamCaption}\item[{\textbf{ jsgf\+\_\+t} $\ast$}]{jsgf,  }\item[{char $\ast$}]{name,  }\item[{\textbf{ jsgf\+\_\+rhs\+\_\+t} $\ast$}]{rhs,  }\item[{int}]{public }\end{DoxyParamCaption})}



Definition at line \textbf{ 559} of file \textbf{ jsgf.\+c}.

\label{jsgf__internal_8h_a4873306f82d8c3028b788f9d2072038c} 
\index{jsgf\_internal.h@{jsgf\_internal.h}!jsgf\_import\_rule@{jsgf\_import\_rule}}
\index{jsgf\_import\_rule@{jsgf\_import\_rule}!jsgf\_internal.h@{jsgf\_internal.h}}
\doxysubsubsection{jsgf\_import\_rule()}
{\footnotesize\ttfamily \textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$ jsgf\+\_\+import\+\_\+rule (\begin{DoxyParamCaption}\item[{\textbf{ jsgf\+\_\+t} $\ast$}]{jsgf,  }\item[{char $\ast$}]{name }\end{DoxyParamCaption})}



Definition at line \textbf{ 635} of file \textbf{ jsgf.\+c}.

\label{jsgf__internal_8h_aa9d355a69b184cb5260e88f41af76d88} 
\index{jsgf\_internal.h@{jsgf\_internal.h}!jsgf\_kleene\_new@{jsgf\_kleene\_new}}
\index{jsgf\_kleene\_new@{jsgf\_kleene\_new}!jsgf\_internal.h@{jsgf\_internal.h}}
\doxysubsubsection{jsgf\_kleene\_new()}
{\footnotesize\ttfamily \textbf{ jsgf\+\_\+atom\+\_\+t} $\ast$ jsgf\+\_\+kleene\+\_\+new (\begin{DoxyParamCaption}\item[{\textbf{ jsgf\+\_\+t} $\ast$}]{jsgf,  }\item[{\textbf{ jsgf\+\_\+atom\+\_\+t} $\ast$}]{atom,  }\item[{int}]{plus }\end{DoxyParamCaption})}



Definition at line \textbf{ 174} of file \textbf{ jsgf.\+c}.

\label{jsgf__internal_8h_a1df897e930221f198fa069f9eb2e7572} 
\index{jsgf\_internal.h@{jsgf\_internal.h}!jsgf\_optional\_new@{jsgf\_optional\_new}}
\index{jsgf\_optional\_new@{jsgf\_optional\_new}!jsgf\_internal.h@{jsgf\_internal.h}}
\doxysubsubsection{jsgf\_optional\_new()}
{\footnotesize\ttfamily \textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$ jsgf\+\_\+optional\+\_\+new (\begin{DoxyParamCaption}\item[{\textbf{ jsgf\+\_\+t} $\ast$}]{jsgf,  }\item[{\textbf{ jsgf\+\_\+rhs\+\_\+t} $\ast$}]{exp }\end{DoxyParamCaption})}



Definition at line \textbf{ 198} of file \textbf{ jsgf.\+c}.

\label{jsgf__internal_8h_af2faf6fb74ad1e4d43cf990c1bcec672} 
\index{jsgf\_internal.h@{jsgf\_internal.h}!jsgf\_rule\_free@{jsgf\_rule\_free}}
\index{jsgf\_rule\_free@{jsgf\_rule\_free}!jsgf\_internal.h@{jsgf\_internal.h}}
\doxysubsubsection{jsgf\_rule\_free()}
{\footnotesize\ttfamily int jsgf\+\_\+rule\+\_\+free (\begin{DoxyParamCaption}\item[{\textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$}]{rule }\end{DoxyParamCaption})}



Definition at line \textbf{ 599} of file \textbf{ jsgf.\+c}.

\label{jsgf__internal_8h_aa439cbe2e9002f5e74638f9af249aa36} 
\index{jsgf\_internal.h@{jsgf\_internal.h}!jsgf\_rule\_retain@{jsgf\_rule\_retain}}
\index{jsgf\_rule\_retain@{jsgf\_rule\_retain}!jsgf\_internal.h@{jsgf\_internal.h}}
\doxysubsubsection{jsgf\_rule\_retain()}
{\footnotesize\ttfamily \textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$ jsgf\+\_\+rule\+\_\+retain (\begin{DoxyParamCaption}\item[{\textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$}]{rule }\end{DoxyParamCaption})}



Definition at line \textbf{ 592} of file \textbf{ jsgf.\+c}.

