Fix TODO comment in build_lex_table
This commit is contained in:
parent
6415690738
commit
9fd2821389
1 changed files with 4 additions and 2 deletions
|
|
@ -129,17 +129,19 @@ class LexTableBuilder {
|
|||
rule, });
|
||||
}
|
||||
|
||||
// TODO - remove this hack. right now, nested repeats cause
|
||||
// item sets which are equivalent to appear unequal.
|
||||
rules::rule_ptr separator_rule() const {
|
||||
vector<rules::rule_ptr> separators;
|
||||
for (const auto &rule : lex_grammar.separators) {
|
||||
|
||||
// TODO - remove this hack. right now, nested repeats cause
|
||||
// item sets which are equivalent to appear unequal.
|
||||
auto repeat = dynamic_pointer_cast<const rules::Repeat>(rule);
|
||||
if (repeat.get())
|
||||
separators.push_back(repeat->content);
|
||||
else
|
||||
separators.push_back(rule);
|
||||
}
|
||||
|
||||
return rules::repeat(rules::choice(separators));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue