\section{token\_\-ops Struct Reference}
\label{structtoken__ops}\index{token\_\-ops@{token\_\-ops}}
{\tt \#include $<$parse.h$>$}

\subsection*{Data Fields}
\begin{CompactItemize}
\item 
int8\_\-t($\ast$ {\bf parse} )({\bf parse\_\-pgm\_\-token\_\-hdr\_\-t} $\ast$, const char $\ast$, void $\ast$)
\item 
int8\_\-t($\ast$ {\bf complete\_\-get\_\-nb} )({\bf parse\_\-pgm\_\-token\_\-hdr\_\-t} $\ast$)
\item 
int8\_\-t($\ast$ {\bf complete\_\-get\_\-elt} )({\bf parse\_\-pgm\_\-token\_\-hdr\_\-t} $\ast$, int8\_\-t, char $\ast$, uint8\_\-t)
\item 
int8\_\-t($\ast$ {\bf get\_\-help} )({\bf parse\_\-pgm\_\-token\_\-hdr\_\-t} $\ast$, char $\ast$, uint8\_\-t)
\end{CompactItemize}


\subsection{Detailed Description}
A token is defined by this structure.

\doxyref{parse()}{p.}{structtoken__ops_0b07419394f1d4947411eee558b19c00} takes the token as first argument, then the source buffer starting at the token we want to parse. The 3rd arg is a pointer where we store the parsed data (as binary). It returns the number of parsed chars on success and a negative value on \doxyref{error}{p.}{structerror}.

\doxyref{complete\_\-get\_\-nb()}{p.}{structtoken__ops_1f43d77d268b4ebfec6b3397b4f9ed97} returns the number of possible values for this token if completion is possible. If it is NULL or if it returns 0, no completion is possible.

\doxyref{complete\_\-get\_\-elt()}{p.}{structtoken__ops_06f21dc6031636b2a200fdd06c1afcc0} copy in dstbuf (the size is specified in the parameter) the i-th possible completion for this token. returns 0 on success or and a negative value on \doxyref{error}{p.}{structerror}.

\doxyref{get\_\-help()}{p.}{structtoken__ops_aa423e1a27c96bea9d5dbf50d19ad473} fills the dstbuf with the help for the token. It returns -1 on \doxyref{error}{p.}{structerror} and 0 on success. 

Definition at line 74 of file parse.h.

\subsection{Field Documentation}
\index{token\_\-ops@{token\_\-ops}!parse@{parse}}
\index{parse@{parse}!token_ops@{token\_\-ops}}
\subsubsection[parse]{\setlength{\rightskip}{0pt plus 5cm}int8\_\-t($\ast$ {\bf token\_\-ops::parse})({\bf parse\_\-pgm\_\-token\_\-hdr\_\-t} $\ast$, const char $\ast$, void $\ast$)}\label{structtoken__ops_0b07419394f1d4947411eee558b19c00}


parse(token ptr, buf, res pts) \index{token\_\-ops@{token\_\-ops}!complete\_\-get\_\-nb@{complete\_\-get\_\-nb}}
\index{complete\_\-get\_\-nb@{complete\_\-get\_\-nb}!token_ops@{token\_\-ops}}
\subsubsection[complete\_\-get\_\-nb]{\setlength{\rightskip}{0pt plus 5cm}int8\_\-t($\ast$ {\bf token\_\-ops::complete\_\-get\_\-nb})({\bf parse\_\-pgm\_\-token\_\-hdr\_\-t} $\ast$)}\label{structtoken__ops_1f43d77d268b4ebfec6b3397b4f9ed97}


return the num of possible choices for this token 

Referenced by complete().\index{token\_\-ops@{token\_\-ops}!complete\_\-get\_\-elt@{complete\_\-get\_\-elt}}
\index{complete\_\-get\_\-elt@{complete\_\-get\_\-elt}!token_ops@{token\_\-ops}}
\subsubsection[complete\_\-get\_\-elt]{\setlength{\rightskip}{0pt plus 5cm}int8\_\-t($\ast$ {\bf token\_\-ops::complete\_\-get\_\-elt})({\bf parse\_\-pgm\_\-token\_\-hdr\_\-t} $\ast$, int8\_\-t, char $\ast$, uint8\_\-t)}\label{structtoken__ops_06f21dc6031636b2a200fdd06c1afcc0}


return the elt x for this token (token, idx, dstbuf, size) 

Referenced by complete().\index{token\_\-ops@{token\_\-ops}!get\_\-help@{get\_\-help}}
\index{get\_\-help@{get\_\-help}!token_ops@{token\_\-ops}}
\subsubsection[get\_\-help]{\setlength{\rightskip}{0pt plus 5cm}int8\_\-t($\ast$ {\bf token\_\-ops::get\_\-help})({\bf parse\_\-pgm\_\-token\_\-hdr\_\-t} $\ast$, char $\ast$, uint8\_\-t)}\label{structtoken__ops_aa423e1a27c96bea9d5dbf50d19ad473}


get help for this token (token, dstbuf, size) 

Referenced by complete().

The documentation for this struct was generated from the following file:\begin{CompactItemize}
\item 
aversive\_\-10-03-12/modules/ihm/parse/{\bf parse.h}\end{CompactItemize}
