diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-08-02 01:42:50 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-08-02 01:42:50 +0900 |
commit | 74b51fb8cc2945af10da841a2ff901f4d3046977 (patch) | |
tree | c4f3d5e2f3fb4969cd7393107210e22649240f06 /spec | |
parent | Use maleeni v0.3.0 (diff) | |
download | urubu-74b51fb8cc2945af10da841a2ff901f4d3046977.tar.gz urubu-74b51fb8cc2945af10da841a2ff901f4d3046977.tar.xz |
Print expected terminals on a parse error
Diffstat (limited to 'spec')
-rw-r--r-- | spec/grammar.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/grammar.go b/spec/grammar.go index eeeb372..002fac9 100644 --- a/spec/grammar.go +++ b/spec/grammar.go @@ -16,6 +16,7 @@ type LexicalSpecification struct { type Maleeni struct { Spec *mlspec.CompiledLexSpec `json:"spec"` KindToTerminal []int `json:"kind_to_terminal"` + TerminalToKind []int `json:"terminal_to_kind"` Skip []int `json:"skip"` } @@ -32,6 +33,7 @@ type ParsingTable struct { NonTerminals []string `json:"non_terminals"` NonTerminalCount int `json:"non_terminal_count"` EOFSymbol int `json:"eof_symbol"` + ExpectedTerminals [][]int `json:"expected_terminals"` } type ASTAction struct { |