function parse_rule()
{
$rule = trim($this->rule);
/* If this is a regex end-token, just mark it and return */
if (substr($rule, 0, 1) == '/') {
$this->parsed = new TokenRegex($rule);
} else {
$tokens = [];
$this->tokenize($rule, $tokens);
$this->parsed = count($tokens) == 1 ? array_pop($tokens) : new TokenSequence($tokens);
}
}