Do not consider any symbols to be 'in-progress' in out-of-context states
This commit is contained in:
parent
76d072545d
commit
b68f7212c8
2 changed files with 8 additions and 5 deletions
|
|
@ -269,14 +269,17 @@ class CCodeGenerator {
|
|||
}
|
||||
|
||||
void add_in_progress_symbol_table() {
|
||||
line("static unsigned short ts_in_progress_symbol_table[] = {");
|
||||
add_in_progress_symbol_list_id({});
|
||||
line("static unsigned short ts_in_progress_symbol_table[STATE_COUNT] = {");
|
||||
|
||||
indent([&]() {
|
||||
size_t state_id = 0;
|
||||
for (const ParseState &state : parse_table.states) {
|
||||
line("[" + to_string(state_id) + "] = ");
|
||||
add(to_string(add_in_progress_symbol_list_id(state.in_progress_symbols)));
|
||||
add(",");
|
||||
if (!state.in_progress_symbols.empty()) {
|
||||
line("[" + to_string(state_id) + "] = ");
|
||||
add(to_string(add_in_progress_symbol_list_id(state.in_progress_symbols)));
|
||||
add(",");
|
||||
}
|
||||
state_id++;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue