diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-07-31 14:00:52 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-07-31 14:00:52 +0900 |
commit | 02ebb9bb630de5bc589e509e10c1d82629ab6487 (patch) | |
tree | 8905b07cdcfba957ecc86f9a4b0245f64409bbc0 /grammar/semantic_error.go | |
parent | Prevent terminals used in productions from being skipped (diff) | |
download | cotia-02ebb9bb630de5bc589e509e10c1d82629ab6487.tar.gz cotia-02ebb9bb630de5bc589e509e10c1d82629ab6487.tar.xz |
Detect duplicate names between terminals and non-terminals
Diffstat (limited to 'grammar/semantic_error.go')
-rw-r--r-- | grammar/semantic_error.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/grammar/semantic_error.go b/grammar/semantic_error.go index 4dcd313..2d722a8 100644 --- a/grammar/semantic_error.go +++ b/grammar/semantic_error.go @@ -21,7 +21,8 @@ var ( semErrNoProduction = newSemanticError("a grammar needs at least one production") semErrUndefinedSym = newSemanticError("undefined symbol") semErrDuplicateProduction = newSemanticError("duplicate production") - semErrDuplicateSym = newSemanticError("duplicate symbol") + semErrDuplicateTerminal = newSemanticError("duplicate terminal") + semErrDuplicateName = newSemanticError("duplicate names are not allowed between terminals and non-terminals") semErrDirInvalidName = newSemanticError("invalid directive name") semErrDirInvalidParam = newSemanticError("invalid parameter") ) |