diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-07-28 01:54:39 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-07-28 01:54:39 +0900 |
commit | adb12c2c1b2873d8775f55c02f54e6690687f1a2 (patch) | |
tree | 4715e03c051bfca3262b74046b79252d49c069b4 /grammar/semantic_error.go | |
parent | Add literal pattern syntax and change tree structure syntax (diff) | |
download | urubu-adb12c2c1b2873d8775f55c02f54e6690687f1a2.tar.gz urubu-adb12c2c1b2873d8775f55c02f54e6690687f1a2.tar.xz |
Detect duplicate production errors
Diffstat (limited to 'grammar/semantic_error.go')
-rw-r--r-- | grammar/semantic_error.go | 11 |
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") ) |