From 7271e46bbcb11acf860c91eddfe12dd7eed5ccad Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Thu, 26 Aug 2021 23:16:09 +0900 Subject: Add error symbol and #recover directive to recover from an error state --- spec/grammar.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'spec/grammar.go') diff --git a/spec/grammar.go b/spec/grammar.go index 002fac9..7901957 100644 --- a/spec/grammar.go +++ b/spec/grammar.go @@ -33,6 +33,9 @@ type ParsingTable struct { NonTerminals []string `json:"non_terminals"` NonTerminalCount int `json:"non_terminal_count"` EOFSymbol int `json:"eof_symbol"` + ErrorSymbol int `json:"error_symbol"` + ErrorTrapperStates []int `json:"error_trapper_states"` + RecoverProductions []int `json:"recover_productions"` ExpectedTerminals [][]int `json:"expected_terminals"` } -- cgit v1.2.3