policytree¶ class policytree.PolicyParser(verbose=False)[source]¶ Bases: object evalStack(stack)[source]¶ findDuplicates(tree, _dict)[source]¶ getBNF()[source]¶ labelDuplicates(tree, _dictLabel)[source]¶ parse(string)[source]¶ prune(tree, attributes)[source]¶ given policy tree and attributes, determine whether the attributes satisfy the policy. if not enough attributes to satisfy policy, return None otherwise, a pruned list of attributes to potentially recover the associated secret. requiredAttributes(tree, attrList)[source]¶ determines the required attributes to satisfy policy tree and returns a list of BinNode objects. policytree.createAttribute(s, loc, toks)[source]¶ policytree.createTree(op, node1, node2)[source]¶ policytree.downcaseTokens(s, loc, toks)[source]¶ policytree.parseNumConditional(s, loc, toks)[source]¶ policytree.printStuff(s, loc, toks)[source]¶ policytree.pushFirst(s, loc, toks)[source]¶