Add axiom to ruleset
This commit is contained in:
parent
03d9de7b1a
commit
ec0fb04f7b
@ -100,7 +100,10 @@ private:
|
|||||||
|
|
||||||
etl::vector<branch_rule_t, g_max_branch_rules> m_branch_rules;
|
etl::vector<branch_rule_t, g_max_branch_rules> m_branch_rules;
|
||||||
|
|
||||||
|
group_id_t m_axiom = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Checks if the maximum number of tokens has been reached
|
* @brief Checks if the maximum number of tokens has been reached
|
||||||
*
|
*
|
||||||
@ -219,6 +222,14 @@ public:
|
|||||||
*/
|
*/
|
||||||
branch_rule_id_t add_branch_rule_weighted(token_id_t match, weighted_group_id_t wgroup);
|
branch_rule_id_t add_branch_rule_weighted(token_id_t match, weighted_group_id_t wgroup);
|
||||||
|
|
||||||
|
/** @brief Sets the axiom
|
||||||
|
*
|
||||||
|
* @exception @c mtl::invalid_argument if an invalid group ID was supplied
|
||||||
|
*/
|
||||||
|
void set_axiom(group_id_t axiom) {
|
||||||
|
m_axiom = valid_group_characteristic(axiom) ? axiom : throw mtl::invalid_argument();
|
||||||
|
}
|
||||||
|
group_id_t get_axiom() const { return m_axiom; }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user