aboutsummaryrefslogtreecommitdiff
path: root/grammar/semantic_error.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2022-05-10 01:34:23 +0900
committerRyo Nihei <nihei.dev@gmail.com>2022-05-10 23:14:52 +0900
commit3e1620a781fe0eb097a9624cffb408bfb32bd5c8 (patch)
treed9dbd22dfa3efbe1d709edc98d4c0ca37de5f71e /grammar/semantic_error.go
parentMake the identifier format strict (diff)
downloadurubu-3e1620a781fe0eb097a9624cffb408bfb32bd5c8.tar.gz
urubu-3e1620a781fe0eb097a9624cffb408bfb32bd5c8.tar.xz
Add spelling inconsistencies check
Diffstat (limited to 'grammar/semantic_error.go')
-rw-r--r--grammar/semantic_error.go47
1 files changed, 24 insertions, 23 deletions
diff --git a/grammar/semantic_error.go b/grammar/semantic_error.go
index 794d8da..589e324 100644
--- a/grammar/semantic_error.go
+++ b/grammar/semantic_error.go
@@ -15,27 +15,28 @@ func (e *SemanticError) Error() string {
}
var (
- semErrNoGrammarName = newSemanticError("name is missing")
- semErrDuplicateAssoc = newSemanticError("associativity and precedence cannot be specified multiple times for a symbol")
- semErrUndefinedPrec = newSemanticError("symbol must has precedence")
- semErrUndefinedOrdSym = newSemanticError("undefined ordered symbol")
- semErrUnusedProduction = newSemanticError("unused production")
- semErrUnusedTerminal = newSemanticError("unused terminal")
- semErrTermCannotBeSkipped = newSemanticError("a terminal used in productions cannot be skipped")
- semErrNoProduction = newSemanticError("a grammar needs at least one production")
- semErrUndefinedSym = newSemanticError("undefined symbol")
- semErrDuplicateProduction = newSemanticError("duplicate production")
- semErrDuplicateTerminal = newSemanticError("duplicate terminal")
- semErrDuplicateFragment = newSemanticError("duplicate fragment")
- semErrDuplicateName = newSemanticError("duplicate names are not allowed between terminals and non-terminals")
- semErrErrSymIsReserved = newSemanticError("symbol 'error' is reserved as a terminal symbol")
- semErrDuplicateLabel = newSemanticError("a label must be unique in an alternative")
- semErrInvalidLabel = newSemanticError("a label must differ from terminal symbols or non-terminal symbols")
- semErrDirInvalidName = newSemanticError("invalid directive name")
- semErrDirInvalidParam = newSemanticError("invalid parameter")
- semErrDuplicateDir = newSemanticError("a directive must not be duplicated")
- semErrDuplicateElem = newSemanticError("duplicate element")
- semErrAmbiguousElem = newSemanticError("ambiguous element")
- semErrInvalidProdDir = newSemanticError("invalid production directive")
- semErrInvalidAltDir = newSemanticError("invalid alternative directive")
+ semErrNoGrammarName = newSemanticError("name is missing")
+ semErrSpellingInconsistency = newSemanticError("the identifiers are treated as the same. please use the same spelling")
+ semErrDuplicateAssoc = newSemanticError("associativity and precedence cannot be specified multiple times for a symbol")
+ semErrUndefinedPrec = newSemanticError("symbol must has precedence")
+ semErrUndefinedOrdSym = newSemanticError("undefined ordered symbol")
+ semErrUnusedProduction = newSemanticError("unused production")
+ semErrUnusedTerminal = newSemanticError("unused terminal")
+ semErrTermCannotBeSkipped = newSemanticError("a terminal used in productions cannot be skipped")
+ semErrNoProduction = newSemanticError("a grammar needs at least one production")
+ semErrUndefinedSym = newSemanticError("undefined symbol")
+ semErrDuplicateProduction = newSemanticError("duplicate production")
+ semErrDuplicateTerminal = newSemanticError("duplicate terminal")
+ semErrDuplicateFragment = newSemanticError("duplicate fragment")
+ semErrDuplicateName = newSemanticError("duplicate names are not allowed between terminals and non-terminals")
+ semErrErrSymIsReserved = newSemanticError("symbol 'error' is reserved as a terminal symbol")
+ semErrDuplicateLabel = newSemanticError("a label must be unique in an alternative")
+ semErrInvalidLabel = newSemanticError("a label must differ from terminal symbols or non-terminal symbols")
+ semErrDirInvalidName = newSemanticError("invalid directive name")
+ semErrDirInvalidParam = newSemanticError("invalid parameter")
+ semErrDuplicateDir = newSemanticError("a directive must not be duplicated")
+ semErrDuplicateElem = newSemanticError("duplicate element")
+ semErrAmbiguousElem = newSemanticError("ambiguous element")
+ semErrInvalidProdDir = newSemanticError("invalid production directive")
+ semErrInvalidAltDir = newSemanticError("invalid alternative directive")
)