aboutsummaryrefslogtreecommitdiff
path: root/spec/syntax_error.go
diff options
context:
space:
mode:
Diffstat (limited to 'spec/syntax_error.go')
-rw-r--r--spec/syntax_error.go15
1 files changed, 9 insertions, 6 deletions
diff --git a/spec/syntax_error.go b/spec/syntax_error.go
index ad847a2..cf64e75 100644
--- a/spec/syntax_error.go
+++ b/spec/syntax_error.go
@@ -16,12 +16,15 @@ func (e *SyntaxError) Error() string {
var (
// lexical errors
- synErrAutoGenID = newSyntaxError("you cannot define an identifier beginning with an underscore")
- synErrUnclosedTerminal = newSyntaxError("unclosed terminal")
- synErrUnclosedString = newSyntaxError("unclosed string")
- synErrIncompletedEscSeq = newSyntaxError("incompleted escape sequence; unexpected EOF following a backslash")
- synErrEmptyPattern = newSyntaxError("a pattern must include at least one character")
- synErrEmptyString = newSyntaxError("a string must include at least one character")
+ synErrIDInvalidChar = newSyntaxError("an identifier can contain only the lower-case letter, the digits, and the underscore")
+ synErrIDInvalidUnderscorePos = newSyntaxError("the underscore cannot be placed at the beginning or end of an identifier")
+ synErrIDConsecutiveUnderscores = newSyntaxError("the underscore cannot be placed consecutively")
+ synErrIDInvalidDigitsPos = newSyntaxError("the digits cannot be placed at the biginning of an identifier")
+ synErrUnclosedTerminal = newSyntaxError("unclosed terminal")
+ synErrUnclosedString = newSyntaxError("unclosed string")
+ synErrIncompletedEscSeq = newSyntaxError("incompleted escape sequence; unexpected EOF following a backslash")
+ synErrEmptyPattern = newSyntaxError("a pattern must include at least one character")
+ synErrEmptyString = newSyntaxError("a string must include at least one character")
// syntax errors
synErrInvalidToken = newSyntaxError("invalid token")