|
xorp
|
A policy semantic checker. More...
#include <visitor_semantic.hh>
Classes | |
| class | sem_error |
| Exception thrown on a semantic error. More... | |
Public Types | |
| enum | PolicyType { IMPORT, EXPORT } |
Public Member Functions | |
| VisitorSemantic (SemanticVarRW &varrw, VarMap &varmap, SetMap &setmap, PolicyMap &pmap, const string &protocol, PolicyType ptype) | |
| const Element * | visit (PolicyStatement &policy) |
| const Element * | visit (Term &term) |
| const Element * | visit (NodeUn &node) |
| const Element * | visit (NodeBin &node) |
| const Element * | visit (NodeAssign &node) |
| const Element * | visit (NodeVar &node) |
| const Element * | visit (NodeSet &node) |
| const Element * | visit (NodeElem &node) |
| const Element * | visit (NodeAccept &node) |
| const Element * | visit (NodeReject &node) |
| const Element * | visit (NodeProto &node) |
| const Element * | visit (NodeNext &node) |
| const Element * | visit (NodeSubr &node) |
| const set< string > & | sets () const |
Private Member Functions | |
| void | change_protocol (const string &proto) |
| const string & | semantic_protocol () |
| const Element * | do_bin (const Element &left, const Element &right, const BinOper &op, const Node &from) |
| void | do_policy_statement (PolicyStatement &ps) |
Private Attributes | |
| SemanticVarRW & | _varrw |
| VarMap & | _varmap |
| SetMap & | _setmap |
| PolicyMap & | _pmap |
| Dispatcher | _disp |
| set< string > | _sets |
| string | _protocol |
| string | _current_protocol |
| string | _semantic_protocol |
| PolicyType | _ptype |
| set< Element * > | _trash |
| bool | _reject |
A policy semantic checker.
A policy is instantiated by a protocol and policytype. Thus, semantic checking must be performed realtive to the instantiation. [Generic semantic checking may be accomplished too, but it is not done.]
| VisitorSemantic::VisitorSemantic | ( | SemanticVarRW & | varrw, |
| VarMap & | varmap, | ||
| SetMap & | setmap, | ||
| PolicyMap & | pmap, | ||
| const string & | protocol, | ||
| PolicyType | ptype | ||
| ) |
| const set<string>& VisitorSemantic::sets | ( | ) | const [inline] |