clang-format
This commit is contained in:
parent
5073af0d03
commit
7415c623aa
3 changed files with 9 additions and 9 deletions
|
|
@ -86,12 +86,11 @@ class LexTableBuilder {
|
|||
for (const rule_ptr &separator_rule : separator_rules)
|
||||
result.entries.insert(LexItem(
|
||||
symbol, rules::Seq::build({
|
||||
rules::Metadata::build(
|
||||
separator_rule,
|
||||
{
|
||||
{ rules::START_TOKEN, 1 },
|
||||
{ rules::PRECEDENCE, -99999 },
|
||||
}),
|
||||
rules::Metadata::build(separator_rule,
|
||||
{
|
||||
{ rules::START_TOKEN, 1 },
|
||||
{ rules::PRECEDENCE, -99999 },
|
||||
}),
|
||||
rule,
|
||||
})));
|
||||
}
|
||||
|
|
@ -136,7 +135,8 @@ class LexTableBuilder {
|
|||
LexItem::CompletionStatus completion_status = item.completion_status();
|
||||
if (completion_status.is_done) {
|
||||
auto current_action = lex_table.state(state_id).default_action;
|
||||
auto action = LexAction::Accept(item.lhs, completion_status.precedence, completion_status.is_string);
|
||||
auto action = LexAction::Accept(item.lhs, completion_status.precedence,
|
||||
completion_status.is_string);
|
||||
if (conflict_manager.resolve(action, current_action))
|
||||
lex_table.state(state_id).default_action = action;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ class ParseItem {
|
|||
int variable_index;
|
||||
const Production *production;
|
||||
unsigned int step_index;
|
||||
|
||||
};
|
||||
|
||||
class ParseItemSet {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,8 @@ LexAction LexAction::Advance(size_t state_index,
|
|||
}
|
||||
|
||||
LexAction LexAction::Accept(Symbol symbol, int precedence, bool is_string) {
|
||||
return LexAction(LexActionTypeAccept, -1, symbol, { precedence, precedence }, is_string);
|
||||
return LexAction(LexActionTypeAccept, -1, symbol, { precedence, precedence },
|
||||
is_string);
|
||||
}
|
||||
|
||||
bool LexAction::operator==(const LexAction &other) const {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue