\hypertarget{namespacepolicy__backend__parser}{
\section{policy\_\-backend\_\-parser Namespace Reference}
\label{namespacepolicy__backend__parser}\index{policy\_\-backend\_\-parser@{policy\_\-backend\_\-parser}}
}


Minimises global namespace pollution of yacc/lex variables.  


\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{namespacepolicy__backend__parser_aab174e0145dca83a6f81276b6093f4d0}{
typedef vector$<$ \hyperlink{classPolicyInstr}{PolicyInstr} $\ast$ $>$ {\bfseries POLICIES}}
\label{namespacepolicy__backend__parser_aab174e0145dca83a6f81276b6093f4d0}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \hyperlink{namespacepolicy__backend__parser_a811b56702b5b456f27bf4cce6f4ebce1}{policy\_\-backend\_\-parse} (vector$<$ \hyperlink{classPolicyInstr}{PolicyInstr} $\ast$ $>$ \&outpolicies, map$<$ string, \hyperlink{classElement}{Element} $\ast$ $>$ \&outsets, SUBR \&outsubr, const string \&conf, string \&outerr)
\begin{DoxyCompactList}\small\item\em Parses a backend policy configuration. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{namespacepolicy__backend__parser_ac2539e63b85881ffe46d446a1322c110}{
vector$<$ \hyperlink{classPolicyInstr}{PolicyInstr} $\ast$ $>$ $\ast$ {\bfseries \_\-yy\_\-policies}}
\label{namespacepolicy__backend__parser_ac2539e63b85881ffe46d446a1322c110}

\item 
\hypertarget{namespacepolicy__backend__parser_ae21f83600e91e9600fcf95aea993d26f}{
map$<$ string, \hyperlink{classElement}{Element} $\ast$ $>$ $\ast$ {\bfseries \_\-yy\_\-sets}}
\label{namespacepolicy__backend__parser_ae21f83600e91e9600fcf95aea993d26f}

\item 
\hypertarget{namespacepolicy__backend__parser_aa9572c53006b47f25d36e6e9cd93c3ef}{
vector$<$ \hyperlink{classTermInstr}{TermInstr} $\ast$ $>$ $\ast$ {\bfseries \_\-yy\_\-terms}}
\label{namespacepolicy__backend__parser_aa9572c53006b47f25d36e6e9cd93c3ef}

\item 
\hypertarget{namespacepolicy__backend__parser_a8f5480c295122c70951076d1c75e4fa2}{
vector$<$ \hyperlink{classInstruction}{Instruction} $\ast$ $>$ $\ast$ {\bfseries \_\-yy\_\-instructions}}
\label{namespacepolicy__backend__parser_a8f5480c295122c70951076d1c75e4fa2}

\item 
\hypertarget{namespacepolicy__backend__parser_aa086a1413591bc546b4467fbfd4068fa}{
bool {\bfseries \_\-yy\_\-trace}}
\label{namespacepolicy__backend__parser_aa086a1413591bc546b4467fbfd4068fa}

\item 
\hypertarget{namespacepolicy__backend__parser_a072ee33e3ccc562fc50e39a7f6582b3b}{
SUBR $\ast$ {\bfseries \_\-yy\_\-subr}}
\label{namespacepolicy__backend__parser_a072ee33e3ccc562fc50e39a7f6582b3b}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Minimises global namespace pollution of yacc/lex variables. The nature of lex and yacc causes global variables / functions to be present. Here such methods and functions are grouped under one namespace. 

\subsection{Function Documentation}
\hypertarget{namespacepolicy__backend__parser_a811b56702b5b456f27bf4cce6f4ebce1}{
\index{policy\_\-backend\_\-parser@{policy\_\-backend\_\-parser}!policy\_\-backend\_\-parse@{policy\_\-backend\_\-parse}}
\index{policy\_\-backend\_\-parse@{policy\_\-backend\_\-parse}!policy_backend_parser@{policy\_\-backend\_\-parser}}
\subsubsection[{policy\_\-backend\_\-parse}]{\setlength{\rightskip}{0pt plus 5cm}int policy\_\-backend\_\-parser::policy\_\-backend\_\-parse (
\begin{DoxyParamCaption}
\item[{vector$<$ {\bf PolicyInstr} $\ast$ $>$ \&}]{outpolicies, }
\item[{map$<$ string, {\bf Element} $\ast$ $>$ \&}]{outsets, }
\item[{SUBR \&}]{outsubr, }
\item[{const string \&}]{conf, }
\item[{string \&}]{outerr}
\end{DoxyParamCaption}
)}}
\label{namespacepolicy__backend__parser_a811b56702b5b456f27bf4cce6f4ebce1}


Parses a backend policy configuration. 

Caller is responsible for deleting partially parsed policies and sets.

\begin{DoxyReturn}{Returns}
0 on success. Otherwise, outerr is filled with error message. 
\end{DoxyReturn}

\begin{DoxyParams}{Parameters}
{\em outpolicies} & \hyperlink{protocolthe-p}{the} parse tree of all policies. \\
\hline
{\em outsets} & \hyperlink{protocolthe-p}{the} pair of set-\/name / content. \\
\hline
{\em conf} & \hyperlink{protocolthe-p}{the} configuration to parse. \\
\hline
{\em outerr} & string filled with parse error message, on error. \\
\hline
\end{DoxyParams}
