xorp

policy_backend_parser Namespace Reference

Minimises global namespace pollution of yacc/lex variables. More...

Typedefs

typedef vector< PolicyInstr * > POLICIES

Functions

int policy_backend_parse (vector< PolicyInstr * > &outpolicies, map< string, Element * > &outsets, SUBR &outsubr, const string &conf, string &outerr)
 Parses a backend policy configuration.

Variables

vector< PolicyInstr * > * _yy_policies
map< string, Element * > * _yy_sets
vector< TermInstr * > * _yy_terms
vector< Instruction * > * _yy_instructions
bool _yy_trace
SUBR * _yy_subr

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.


Function Documentation

int policy_backend_parser::policy_backend_parse ( vector< PolicyInstr * > &  outpolicies,
map< string, Element * > &  outsets,
SUBR &  outsubr,
const string &  conf,
string &  outerr 
)

Parses a backend policy configuration.

Caller is responsible for deleting partially parsed policies and sets.

Returns:
0 on success. Otherwise, outerr is filled with error message.
Parameters:
outpoliciesthe parse tree of all policies.
outsetsthe pair of set-name / content.
confthe configuration to parse.
outerrstring filled with parse error message, on error.
 All Classes Namespaces Functions Variables Typedefs Enumerations