aboutsummaryrefslogtreecommitdiff
path: root/grammar/semantic_error.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-07-31 14:00:52 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-07-31 14:00:52 +0900
commit02ebb9bb630de5bc589e509e10c1d82629ab6487 (patch)
tree8905b07cdcfba957ecc86f9a4b0245f64409bbc0 /grammar/semantic_error.go
parentPrevent terminals used in productions from being skipped (diff)
downloadurubu-02ebb9bb630de5bc589e509e10c1d82629ab6487.tar.gz
urubu-02ebb9bb630de5bc589e509e10c1d82629ab6487.tar.xz
Detect duplicate names between terminals and non-terminals
Diffstat (limited to 'grammar/semantic_error.go')
-rw-r--r--grammar/semantic_error.go3
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")
)