diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2022-03-30 21:51:06 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2022-03-30 22:08:56 +0900 |
commit | 8a6cfbae9078c2095cb242e903dcac1c38c2fdb0 (patch) | |
tree | 7ff3b947e0ec69f292b0734c448ce5ab398702f6 | |
parent | Upgrade maleeni to v0.6.0 (diff) | |
download | urubu-8a6cfbae9078c2095cb242e903dcac1c38c2fdb0.tar.gz urubu-8a6cfbae9078c2095cb242e903dcac1c38c2fdb0.tar.xz |
Fix error messages
-rw-r--r-- | grammar/grammar.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/grammar/grammar.go b/grammar/grammar.go index 1a09a22..bc8cc6b 100644 --- a/grammar/grammar.go +++ b/grammar/grammar.go @@ -274,7 +274,7 @@ func findUsedAndUnusedSymbols(root *spec.RootNode) (*usedAndUnusedSymbols, error } continue } - return nil, fmt.Errorf("a definition of unused production was not found: %v", sym) + return nil, fmt.Errorf("unknown symbol: a symbol must be a terminal symbol or a non-terminal symbol: %v", sym) } return &usedAndUnusedSymbols{ @@ -816,7 +816,7 @@ func (b *GrammarBuilder) genProductionsAndActions(root *spec.RootNode, symTabAnd if len(dir.Parameters) == 0 { b.errs = append(b.errs, &verr.SpecError{ Cause: semErrDirInvalidParam, - Detail: "'ast' directive needs at least one symbol position parameter", + Detail: "'ast' directive needs at least one parameter", Row: dir.Pos.Row, Col: dir.Pos.Col, }) |