From e9361ebd47bba3254c3d44f25f9942665b88db2f Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Sat, 31 Jul 2021 01:48:16 +0900 Subject: Prevent terminals used in productions from being skipped A terminal symbol used in productions cannot have the skip directive. --- grammar/semantic_error.go | 1 + 1 file changed, 1 insertion(+) (limited to 'grammar/semantic_error.go') 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") -- cgit v1.2.3