\doxysection{include/sphinxbase/jsgf.h File Reference}
\label{jsgf_8h}\index{include/sphinxbase/jsgf.h@{include/sphinxbase/jsgf.h}}


JSGF grammar compiler.  


{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$sphinxbase/sphinxbase\+\_\+export.\+h$>$}\newline
{\ttfamily \#include $<$sphinxbase/hash\+\_\+table.\+h$>$}\newline
{\ttfamily \#include $<$sphinxbase/fsg\+\_\+model.\+h$>$}\newline
{\ttfamily \#include $<$sphinxbase/logmath.\+h$>$}\newline
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ jsgf\+\_\+rule\+\_\+iter\+\_\+next}(itor)~\textbf{ hash\+\_\+table\+\_\+iter\+\_\+next}(itor)
\begin{DoxyCompactList}\small\item\em Advance an iterator to the next rule in the grammar. \end{DoxyCompactList}\item 
\#define \textbf{ jsgf\+\_\+rule\+\_\+iter\+\_\+rule}(itor)~((\textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$)(itor)-\/$>$ent-\/$>$val)
\begin{DoxyCompactList}\small\item\em Get the current rule in a rule iterator. \end{DoxyCompactList}\item 
\#define \textbf{ jsgf\+\_\+rule\+\_\+iter\+\_\+free}(itor)~\textbf{ hash\+\_\+table\+\_\+iter\+\_\+free}(itor)
\begin{DoxyCompactList}\small\item\em Free a rule iterator (if the end hasn\textquotesingle{}t been reached). \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \textbf{ jsgf\+\_\+s} \textbf{ jsgf\+\_\+t}
\item 
typedef struct \textbf{ jsgf\+\_\+rule\+\_\+s} \textbf{ jsgf\+\_\+rule\+\_\+t}
\item 
typedef \textbf{ hash\+\_\+iter\+\_\+t} \textbf{ jsgf\+\_\+rule\+\_\+iter\+\_\+t}
\begin{DoxyCompactList}\small\item\em Iterator over rules in a grammar. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ jsgf\+\_\+t} $\ast$ \textbf{ jsgf\+\_\+grammar\+\_\+new} (\textbf{ jsgf\+\_\+t} $\ast$parent)
\begin{DoxyCompactList}\small\item\em Create a new JSGF grammar. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ jsgf\+\_\+t} $\ast$ \textbf{ jsgf\+\_\+parse\+\_\+file} (const char $\ast$filename, \textbf{ jsgf\+\_\+t} $\ast$parent)
\begin{DoxyCompactList}\small\item\em Parse a JSGF grammar from a file. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT char const $\ast$ \textbf{ jsgf\+\_\+grammar\+\_\+name} (\textbf{ jsgf\+\_\+t} $\ast$jsgf)
\begin{DoxyCompactList}\small\item\em Get the grammar name from the file. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT void \textbf{ jsgf\+\_\+grammar\+\_\+free} (\textbf{ jsgf\+\_\+t} $\ast$jsgf)
\begin{DoxyCompactList}\small\item\em Free a JSGF grammar. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ jsgf\+\_\+rule\+\_\+iter\+\_\+t} $\ast$ \textbf{ jsgf\+\_\+rule\+\_\+iter} (\textbf{ jsgf\+\_\+t} $\ast$grammar)
\begin{DoxyCompactList}\small\item\em Get an iterator over all rules in a grammar. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$ \textbf{ jsgf\+\_\+get\+\_\+rule} (\textbf{ jsgf\+\_\+t} $\ast$grammar, char const $\ast$name)
\begin{DoxyCompactList}\small\item\em Get a rule by name from a grammar. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT char const $\ast$ \textbf{ jsgf\+\_\+rule\+\_\+name} (\textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$rule)
\begin{DoxyCompactList}\small\item\em Get the rule name from a rule. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT int \textbf{ jsgf\+\_\+rule\+\_\+public} (\textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$rule)
\begin{DoxyCompactList}\small\item\em Test if a rule is public or not. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ fsg\+\_\+model\+\_\+t} $\ast$ \textbf{ jsgf\+\_\+build\+\_\+fsg} (\textbf{ jsgf\+\_\+t} $\ast$grammar, \textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$rule, \textbf{ logmath\+\_\+t} $\ast$lmath, float32 lw)
\begin{DoxyCompactList}\small\item\em Build a Sphinx FSG object from a JSGF rule. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ fsg\+\_\+model\+\_\+t} $\ast$ \textbf{ jsgf\+\_\+build\+\_\+fsg\+\_\+raw} (\textbf{ jsgf\+\_\+t} $\ast$grammar, \textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$rule, \textbf{ logmath\+\_\+t} $\ast$lmath, float32 lw)
\begin{DoxyCompactList}\small\item\em Build a Sphinx FSG object from a JSGF rule. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT \textbf{ fsg\+\_\+model\+\_\+t} $\ast$ \textbf{ jsgf\+\_\+read\+\_\+file} (const char $\ast$file, \textbf{ logmath\+\_\+t} $\ast$lmath, float32 lw)
\begin{DoxyCompactList}\small\item\em Read JSGF from file and return FSG object from it. \end{DoxyCompactList}\item 
SPHINXBASE\+\_\+\+EXPORT int \textbf{ jsgf\+\_\+write\+\_\+fsg} (\textbf{ jsgf\+\_\+t} $\ast$grammar, \textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$rule, FILE $\ast$outfh)
\begin{DoxyCompactList}\small\item\em Convert a JSGF rule to Sphinx FSG text form. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
JSGF grammar compiler. 

This file defines the data structures for parsing JSGF grammars into Sphinx finite-\/state grammars. 

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



\doxysubsection{Macro Definition Documentation}
\label{jsgf_8h_a697875f60dede64c607180514e4ab2c4} 
\index{jsgf.h@{jsgf.h}!jsgf\_rule\_iter\_free@{jsgf\_rule\_iter\_free}}
\index{jsgf\_rule\_iter\_free@{jsgf\_rule\_iter\_free}!jsgf.h@{jsgf.h}}
\doxysubsubsection{jsgf\_rule\_iter\_free}
{\footnotesize\ttfamily \#define jsgf\+\_\+rule\+\_\+iter\+\_\+free(\begin{DoxyParamCaption}\item[{}]{itor }\end{DoxyParamCaption})~\textbf{ hash\+\_\+table\+\_\+iter\+\_\+free}(itor)}



Free a rule iterator (if the end hasn\textquotesingle{}t been reached). 



Definition at line \textbf{ 122} of file \textbf{ jsgf.\+h}.

\label{jsgf_8h_a7216bc3a99823fb509e0dd4f8ee02b75} 
\index{jsgf.h@{jsgf.h}!jsgf\_rule\_iter\_next@{jsgf\_rule\_iter\_next}}
\index{jsgf\_rule\_iter\_next@{jsgf\_rule\_iter\_next}!jsgf.h@{jsgf.h}}
\doxysubsubsection{jsgf\_rule\_iter\_next}
{\footnotesize\ttfamily \#define jsgf\+\_\+rule\+\_\+iter\+\_\+next(\begin{DoxyParamCaption}\item[{}]{itor }\end{DoxyParamCaption})~\textbf{ hash\+\_\+table\+\_\+iter\+\_\+next}(itor)}



Advance an iterator to the next rule in the grammar. 



Definition at line \textbf{ 112} of file \textbf{ jsgf.\+h}.

\label{jsgf_8h_a23b17eb0a92ba7e3c4aa086a33e3c5e6} 
\index{jsgf.h@{jsgf.h}!jsgf\_rule\_iter\_rule@{jsgf\_rule\_iter\_rule}}
\index{jsgf\_rule\_iter\_rule@{jsgf\_rule\_iter\_rule}!jsgf.h@{jsgf.h}}
\doxysubsubsection{jsgf\_rule\_iter\_rule}
{\footnotesize\ttfamily \#define jsgf\+\_\+rule\+\_\+iter\+\_\+rule(\begin{DoxyParamCaption}\item[{}]{itor }\end{DoxyParamCaption})~((\textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$)(itor)-\/$>$ent-\/$>$val)}



Get the current rule in a rule iterator. 



Definition at line \textbf{ 117} of file \textbf{ jsgf.\+h}.



\doxysubsection{Typedef Documentation}
\label{jsgf_8h_ac1e450c03748feb7e1db2a487b21c3fa} 
\index{jsgf.h@{jsgf.h}!jsgf\_rule\_iter\_t@{jsgf\_rule\_iter\_t}}
\index{jsgf\_rule\_iter\_t@{jsgf\_rule\_iter\_t}!jsgf.h@{jsgf.h}}
\doxysubsubsection{jsgf\_rule\_iter\_t}
{\footnotesize\ttfamily typedef \textbf{ hash\+\_\+iter\+\_\+t} \textbf{ jsgf\+\_\+rule\+\_\+iter\+\_\+t}}



Iterator over rules in a grammar. 



Definition at line \textbf{ 101} of file \textbf{ jsgf.\+h}.

\label{jsgf_8h_a3bb0c86e5f9ba2c29b1fa91e1583bf00} 
\index{jsgf.h@{jsgf.h}!jsgf\_rule\_t@{jsgf\_rule\_t}}
\index{jsgf\_rule\_t@{jsgf\_rule\_t}!jsgf.h@{jsgf.h}}
\doxysubsubsection{jsgf\_rule\_t}
{\footnotesize\ttfamily typedef struct \textbf{ jsgf\+\_\+rule\+\_\+s} \textbf{ jsgf\+\_\+rule\+\_\+t}}



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

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



Definition at line \textbf{ 64} of file \textbf{ jsgf.\+h}.



\doxysubsection{Function Documentation}
\label{jsgf_8h_a3ec1941c49bda651a69e224bdb8f2e65} 
\index{jsgf.h@{jsgf.h}!jsgf\_build\_fsg@{jsgf\_build\_fsg}}
\index{jsgf\_build\_fsg@{jsgf\_build\_fsg}!jsgf.h@{jsgf.h}}
\doxysubsubsection{jsgf\_build\_fsg()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ fsg\+\_\+model\+\_\+t} $\ast$ jsgf\+\_\+build\+\_\+fsg (\begin{DoxyParamCaption}\item[{\textbf{ jsgf\+\_\+t} $\ast$}]{grammar,  }\item[{\textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$}]{rule,  }\item[{\textbf{ logmath\+\_\+t} $\ast$}]{lmath,  }\item[{float32}]{lw }\end{DoxyParamCaption})}



Build a Sphinx FSG object from a JSGF rule. 



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



Referenced by \textbf{ jsgf\+\_\+read\+\_\+file()}.

\label{jsgf_8h_a443876d5b4fdea11f5c8634ee2ef3816} 
\index{jsgf.h@{jsgf.h}!jsgf\_build\_fsg\_raw@{jsgf\_build\_fsg\_raw}}
\index{jsgf\_build\_fsg\_raw@{jsgf\_build\_fsg\_raw}!jsgf.h@{jsgf.h}}
\doxysubsubsection{jsgf\_build\_fsg\_raw()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ fsg\+\_\+model\+\_\+t} $\ast$ jsgf\+\_\+build\+\_\+fsg\+\_\+raw (\begin{DoxyParamCaption}\item[{\textbf{ jsgf\+\_\+t} $\ast$}]{grammar,  }\item[{\textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$}]{rule,  }\item[{\textbf{ logmath\+\_\+t} $\ast$}]{lmath,  }\item[{float32}]{lw }\end{DoxyParamCaption})}



Build a Sphinx FSG object from a JSGF rule. 

This differs from \doxyref{jsgf\+\_\+build\+\_\+fsg()}{p.}{jsgf_8h_a3ec1941c49bda651a69e224bdb8f2e65} in that it does not do closure on epsilon transitions or any other postprocessing. For the time being this is necessary in order to write it to a file -\/ the FSG code will be fixed soon. 

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



Referenced by \textbf{ jsgf\+\_\+write\+\_\+fsg()}.

\label{jsgf_8h_a03419f3bd947826e94b3eb3789caeec8} 
\index{jsgf.h@{jsgf.h}!jsgf\_get\_rule@{jsgf\_get\_rule}}
\index{jsgf\_get\_rule@{jsgf\_get\_rule}!jsgf.h@{jsgf.h}}
\doxysubsubsection{jsgf\_get\_rule()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$ jsgf\+\_\+get\+\_\+rule (\begin{DoxyParamCaption}\item[{\textbf{ jsgf\+\_\+t} $\ast$}]{grammar,  }\item[{char const $\ast$}]{name }\end{DoxyParamCaption})}



Get a rule by name from a grammar. 



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



References \textbf{ hash\+\_\+table\+\_\+lookup()}, and \textbf{ jsgf\+\_\+s\+::rules}.

\label{jsgf_8h_a8bbbd8834e0248bd8c52252e93c9822b} 
\index{jsgf.h@{jsgf.h}!jsgf\_grammar\_free@{jsgf\_grammar\_free}}
\index{jsgf\_grammar\_free@{jsgf\_grammar\_free}!jsgf.h@{jsgf.h}}
\doxysubsubsection{jsgf\_grammar\_free()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT void jsgf\+\_\+grammar\+\_\+free (\begin{DoxyParamCaption}\item[{\textbf{ jsgf\+\_\+t} $\ast$}]{jsgf }\end{DoxyParamCaption})}



Free a JSGF grammar. 



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



References \textbf{ jsgf\+\_\+s\+::charset}, \textbf{ ckd\+\_\+free()}, \textbf{ hash\+\_\+iter\+\_\+s\+::ent}, \textbf{ glist\+\_\+free()}, \textbf{ gnode\+\_\+ptr}, \textbf{ hash\+\_\+table\+\_\+free()}, \textbf{ hash\+\_\+table\+\_\+iter()}, \textbf{ hash\+\_\+table\+\_\+iter\+\_\+next()}, \textbf{ jsgf\+\_\+s\+::imports}, \textbf{ jsgf\+\_\+grammar\+\_\+free()}, \textbf{ jsgf\+\_\+s\+::links}, \textbf{ jsgf\+\_\+s\+::locale}, \textbf{ jsgf\+\_\+s\+::name}, \textbf{ jsgf\+\_\+s\+::parent}, \textbf{ jsgf\+\_\+s\+::rules}, \textbf{ jsgf\+\_\+s\+::searchpath}, \textbf{ hash\+\_\+entry\+\_\+s\+::val}, and \textbf{ jsgf\+\_\+s\+::version}.



Referenced by \textbf{ jsgf\+\_\+grammar\+\_\+free()}, \textbf{ jsgf\+\_\+parse\+\_\+file()}, and \textbf{ jsgf\+\_\+read\+\_\+file()}.

\label{jsgf_8h_a3ea34a08ced23bb38c32db5b83d4f045} 
\index{jsgf.h@{jsgf.h}!jsgf\_grammar\_name@{jsgf\_grammar\_name}}
\index{jsgf\_grammar\_name@{jsgf\_grammar\_name}!jsgf.h@{jsgf.h}}
\doxysubsubsection{jsgf\_grammar\_name()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT char const  $\ast$ jsgf\+\_\+grammar\+\_\+name (\begin{DoxyParamCaption}\item[{\textbf{ jsgf\+\_\+t} $\ast$}]{jsgf }\end{DoxyParamCaption})}



Get the grammar name from the file. 



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



References \textbf{ jsgf\+\_\+s\+::name}.

\label{jsgf_8h_a2db23b4bc9f3ce4023a2125a7148494e} 
\index{jsgf.h@{jsgf.h}!jsgf\_grammar\_new@{jsgf\_grammar\_new}}
\index{jsgf\_grammar\_new@{jsgf\_grammar\_new}!jsgf.h@{jsgf.h}}
\doxysubsubsection{jsgf\_grammar\_new()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ jsgf\+\_\+t} $\ast$ jsgf\+\_\+grammar\+\_\+new (\begin{DoxyParamCaption}\item[{\textbf{ jsgf\+\_\+t} $\ast$}]{parent }\end{DoxyParamCaption})}



Create a new JSGF grammar. 


\begin{DoxyParams}{Parameters}
{\em parent} & optional parent grammar for this one (NULL, usually). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
new JSGF grammar object, or NULL on failure. 
\end{DoxyReturn}


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



References \textbf{ ckd\+\_\+calloc}, \textbf{ ckd\+\_\+salloc}, \textbf{ glist\+\_\+add\+\_\+ptr()}, \textbf{ glist\+\_\+reverse()}, \textbf{ hash\+\_\+table\+\_\+new()}, \textbf{ jsgf\+\_\+s\+::imports}, \textbf{ jsgf\+\_\+s\+::parent}, \textbf{ jsgf\+\_\+s\+::rules}, and \textbf{ jsgf\+\_\+s\+::searchpath}.



Referenced by \textbf{ jsgf\+\_\+parse\+\_\+file()}.

\label{jsgf_8h_ab3264da36f057f450b754e51db4f4db3} 
\index{jsgf.h@{jsgf.h}!jsgf\_parse\_file@{jsgf\_parse\_file}}
\index{jsgf\_parse\_file@{jsgf\_parse\_file}!jsgf.h@{jsgf.h}}
\doxysubsubsection{jsgf\_parse\_file()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ jsgf\+\_\+t} $\ast$ jsgf\+\_\+parse\+\_\+file (\begin{DoxyParamCaption}\item[{const char $\ast$}]{filename,  }\item[{\textbf{ jsgf\+\_\+t} $\ast$}]{parent }\end{DoxyParamCaption})}



Parse a JSGF grammar from a file. 


\begin{DoxyParams}{Parameters}
{\em filename} & the name of the file to parse. \\
\hline
{\em parent} & optional parent grammar for this one (NULL, usually). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
new JSGF grammar object, or NULL on failure. 
\end{DoxyReturn}


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



References \textbf{ E\+\_\+\+ERROR}, \textbf{ E\+\_\+\+ERROR\+\_\+\+SYSTEM}, \textbf{ jsgf\+\_\+grammar\+\_\+free()}, and \textbf{ jsgf\+\_\+grammar\+\_\+new()}.



Referenced by \textbf{ jsgf\+\_\+read\+\_\+file()}.

\label{jsgf_8h_a7b1f00209128437cf41feded5e2f40d4} 
\index{jsgf.h@{jsgf.h}!jsgf\_read\_file@{jsgf\_read\_file}}
\index{jsgf\_read\_file@{jsgf\_read\_file}!jsgf.h@{jsgf.h}}
\doxysubsubsection{jsgf\_read\_file()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ fsg\+\_\+model\+\_\+t} $\ast$ jsgf\+\_\+read\+\_\+file (\begin{DoxyParamCaption}\item[{const char $\ast$}]{file,  }\item[{\textbf{ logmath\+\_\+t} $\ast$}]{lmath,  }\item[{float32}]{lw }\end{DoxyParamCaption})}



Read JSGF from file and return FSG object from it. 

This function looks for a first public rule in jsgf and constructs JSGF from it. 

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



References \textbf{ E\+\_\+\+ERROR}, \textbf{ jsgf\+\_\+build\+\_\+fsg()}, \textbf{ jsgf\+\_\+grammar\+\_\+free()}, \textbf{ jsgf\+\_\+parse\+\_\+file()}, \textbf{ jsgf\+\_\+rule\+\_\+iter()}, \textbf{ jsgf\+\_\+rule\+\_\+iter\+\_\+free}, \textbf{ jsgf\+\_\+rule\+\_\+iter\+\_\+next}, \textbf{ jsgf\+\_\+rule\+\_\+iter\+\_\+rule}, and \textbf{ jsgf\+\_\+rule\+\_\+public()}.

\label{jsgf_8h_ae58b20b9bb332124676ff1f3f6111e9a} 
\index{jsgf.h@{jsgf.h}!jsgf\_rule\_iter@{jsgf\_rule\_iter}}
\index{jsgf\_rule\_iter@{jsgf\_rule\_iter}!jsgf.h@{jsgf.h}}
\doxysubsubsection{jsgf\_rule\_iter()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT \textbf{ jsgf\+\_\+rule\+\_\+iter\+\_\+t} $\ast$ jsgf\+\_\+rule\+\_\+iter (\begin{DoxyParamCaption}\item[{\textbf{ jsgf\+\_\+t} $\ast$}]{grammar }\end{DoxyParamCaption})}



Get an iterator over all rules in a grammar. 



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



References \textbf{ hash\+\_\+table\+\_\+iter()}, and \textbf{ jsgf\+\_\+s\+::rules}.



Referenced by \textbf{ jsgf\+\_\+read\+\_\+file()}.

\label{jsgf_8h_af703b7242e11b3899ea442d9a0827673} 
\index{jsgf.h@{jsgf.h}!jsgf\_rule\_name@{jsgf\_rule\_name}}
\index{jsgf\_rule\_name@{jsgf\_rule\_name}!jsgf.h@{jsgf.h}}
\doxysubsubsection{jsgf\_rule\_name()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT char const  $\ast$ jsgf\+\_\+rule\+\_\+name (\begin{DoxyParamCaption}\item[{\textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$}]{rule }\end{DoxyParamCaption})}



Get the rule name from a rule. 



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



References \textbf{ jsgf\+\_\+rule\+\_\+s\+::name}.

\label{jsgf_8h_a85d7895c7a11d82c85b4529f6009c213} 
\index{jsgf.h@{jsgf.h}!jsgf\_rule\_public@{jsgf\_rule\_public}}
\index{jsgf\_rule\_public@{jsgf\_rule\_public}!jsgf.h@{jsgf.h}}
\doxysubsubsection{jsgf\_rule\_public()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT int jsgf\+\_\+rule\+\_\+public (\begin{DoxyParamCaption}\item[{\textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$}]{rule }\end{DoxyParamCaption})}



Test if a rule is public or not. 



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



References \textbf{ jsgf\+\_\+rule\+\_\+s\+::public}.



Referenced by \textbf{ jsgf\+\_\+read\+\_\+file()}.

\label{jsgf_8h_abc18712a5a7bda442a8afba38f5827e7} 
\index{jsgf.h@{jsgf.h}!jsgf\_write\_fsg@{jsgf\_write\_fsg}}
\index{jsgf\_write\_fsg@{jsgf\_write\_fsg}!jsgf.h@{jsgf.h}}
\doxysubsubsection{jsgf\_write\_fsg()}
{\footnotesize\ttfamily SPHINXBASE\+\_\+\+EXPORT int jsgf\+\_\+write\+\_\+fsg (\begin{DoxyParamCaption}\item[{\textbf{ jsgf\+\_\+t} $\ast$}]{grammar,  }\item[{\textbf{ jsgf\+\_\+rule\+\_\+t} $\ast$}]{rule,  }\item[{FILE $\ast$}]{outfh }\end{DoxyParamCaption})}



Convert a JSGF rule to Sphinx FSG text form. 

This does a direct conversion without doing transitive closure on null transitions and so forth. 

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



References \textbf{ jsgf\+\_\+build\+\_\+fsg\+\_\+raw()}, \textbf{ logmath\+\_\+free()}, and \textbf{ logmath\+\_\+init()}.

