diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2021-07-31 01:48:16 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2021-07-31 01:48:16 +0900 |
commit | e9361ebd47bba3254c3d44f25f9942665b88db2f (patch) | |
tree | 7f037bde5ba11dd4a31f43344953b84072717d4b /grammar/semantic_error.go | |
parent | Detect unused-symbol error (diff) | |
download | urubu-e9361ebd47bba3254c3d44f25f9942665b88db2f.tar.gz urubu-e9361ebd47bba3254c3d44f25f9942665b88db2f.tar.xz |
Prevent terminals used in productions from being skipped
A terminal symbol used in productions cannot have the skip directive.
Diffstat (limited to 'grammar/semantic_error.go')
-rw-r--r-- | grammar/semantic_error.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/grammar/semantic_error.go b/grammar/semantic_error.go index 9006124..4dcd313 100644 --- a/grammar/semantic_error.go +++ b/grammar/semantic_error.go @@ -17,6 +17,7 @@ func (e *SemanticError) Error() string { var ( 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") |