aboutsummaryrefslogtreecommitdiff
path: root/grammar/semantic_error.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-07-28 01:54:39 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-07-28 01:54:39 +0900
commitadb12c2c1b2873d8775f55c02f54e6690687f1a2 (patch)
tree4715e03c051bfca3262b74046b79252d49c069b4 /grammar/semantic_error.go
parentAdd literal pattern syntax and change tree structure syntax (diff)
downloadurubu-adb12c2c1b2873d8775f55c02f54e6690687f1a2.tar.gz
urubu-adb12c2c1b2873d8775f55c02f54e6690687f1a2.tar.xz
Detect duplicate production errors
Diffstat (limited to 'grammar/semantic_error.go')
-rw-r--r--grammar/semantic_error.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/grammar/semantic_error.go b/grammar/semantic_error.go
index 63f9325..ca84cf0 100644
--- a/grammar/semantic_error.go
+++ b/grammar/semantic_error.go
@@ -15,9 +15,10 @@ func (e *SemanticError) Error() string {
}
var (
- semErrNoProduction = newSemanticError("a grammar needs at least one production")
- semErrUndefinedSym = newSemanticError("undefined symbol")
- semErrDuplicateSym = newSemanticError("duplicate symbol")
- semErrDirInvalidName = newSemanticError("invalid directive name")
- semErrDirInvalidParam = newSemanticError("invalid parameter")
+ semErrNoProduction = newSemanticError("a grammar needs at least one production")
+ semErrUndefinedSym = newSemanticError("undefined symbol")
+ semErrDuplicateProduction = newSemanticError("duplicate production")
+ semErrDuplicateSym = newSemanticError("duplicate symbol")
+ semErrDirInvalidName = newSemanticError("invalid directive name")
+ semErrDirInvalidParam = newSemanticError("invalid parameter")
)