Skip to content

Commit

Permalink
Fix error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
nihei9 committed Mar 30, 2022
1 parent b565c7d commit 8a6cfba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grammar/grammar.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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,
})
Expand Down

0 comments on commit 8a6cfba

Please sign in to comment.