#include <Expression.h>
Collaboration diagram for Tagcoll::TagexprContext:
Public Member Functions | |
TagexprContext (const OpSet< std::string > &tags, const std::map< std::string, Expression > &derivedTags) | |
Create a context for recursive tagset evaluation. | |
bool | eval (const std::string &tag) const |
Evaluates the input tags on the contents to see if they contain the given tag, or if they match its associated tag expression if tag is a derived tag. | |
Protected Attributes | |
const OpSet< std::string > & | tags |
const std::map< std::string, Expression > & | derivedTags |
OpSet< std::string > | seen |
A derived tag is a tag which is automatically inferred when a tag expression is matched on a tagset.
TagexprContext allows the inference engine to distinguish between a normal tag or a derived tag.
This class is mainly used to support DerivedTags and has probably little applications elsewhere.
|
Create a context for recursive tagset evaluation. Evaluation happens using a derivation table, which can list a tag as an alias for another tag expression. Whenever a tag is matched for equality with a derived tag, the match is performed with the derived tag expression instead.
|
|
Evaluates the input tags on the contents to see if they contain the given tag, or if they match its associated tag expression if tag is a derived tag.
|
|
|
|
|
|
|