diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-09-01 23:57:02 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-09-02 00:01:35 +0900 |
commit | 8832b64b4227245e45f9a24d543c1b80168c489d (patch) | |
tree | 20ed014caa923254d8e7870241225d8c20f7d2b4 /grammar/parsing_table.go | |
parent | Remove the expected terminals field from the parsing table (diff) | |
download | urubu-8832b64b4227245e45f9a24d543c1b80168c489d.tar.gz urubu-8832b64b4227245e45f9a24d543c1b80168c489d.tar.xz |
Support LAC (lookahead correction)
Diffstat (limited to 'grammar/parsing_table.go')
-rw-r--r-- | grammar/parsing_table.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/grammar/parsing_table.go b/grammar/parsing_table.go index aa88ad5..28f6392 100644 --- a/grammar/parsing_table.go +++ b/grammar/parsing_table.go @@ -136,6 +136,7 @@ func (t *ParsingTable) writeGoTo(state stateNum, sym symbol, nextState stateNum) } type lrTableBuilder struct { + class Class automaton *lr0Automaton prods *productionSet termCount int @@ -552,6 +553,7 @@ func (b *lrTableBuilder) genDescription(tab *ParsingTable, gram *Grammar) (*spec } return &spec.Description{ + Class: string(b.class), Terminals: terms, NonTerminals: nonTerms, Productions: prods, |