aboutsummaryrefslogtreecommitdiff
path: root/spec/syntax_error.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-06-28 01:25:54 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-06-28 02:59:34 +0900
commitf4bbd20fb97d6b91c9a53492fd945a4ac7ff4e5f (patch)
treed7c34a9521e130c6181e96d904fc02ef922e5991 /spec/syntax_error.go
parentAdd syntax of fragment (diff)
downloadcotia-f4bbd20fb97d6b91c9a53492fd945a4ac7ff4e5f.tar.gz
cotia-f4bbd20fb97d6b91c9a53492fd945a4ac7ff4e5f.tar.xz
Add ast action
Diffstat (limited to 'spec/syntax_error.go')
-rw-r--r--spec/syntax_error.go19
1 files changed, 11 insertions, 8 deletions
diff --git a/spec/syntax_error.go b/spec/syntax_error.go
index 371ddec..d0e0dc5 100644
--- a/spec/syntax_error.go
+++ b/spec/syntax_error.go
@@ -21,14 +21,17 @@ var (
synErrUnclosedTerminal = newSyntaxError("unclosed terminal")
synErrInvalidEscSeq = newSyntaxError("invalid escape sequence")
synErrIncompletedEscSeq = newSyntaxError("incompleted escape sequence; unexpected EOF following \\")
+ synErrZeroPos = newSyntaxError("a position must be greater than or equal to 1")
// syntax errors
- synErrInvalidToken = newSyntaxError("invalid token")
- synErrNoProduction = newSyntaxError("a grammar must have at least one production")
- synErrNoProductionName = newSyntaxError("a production name is missing")
- synErrNoColon = newSyntaxError("the colon must precede alternatives")
- synErrNoSemicolon = newSyntaxError("the semicolon is missing at the last of an alternative")
- synErrNoModifierName = newSyntaxError("a modifier needs a name")
- synErrNoActionName = newSyntaxError("an action needs a name")
- synErrFragmentNoPattern = newSyntaxError("a fragment needs one pattern element")
+ synErrInvalidToken = newSyntaxError("invalid token")
+ synErrNoProduction = newSyntaxError("a grammar must have at least one production")
+ synErrNoProductionName = newSyntaxError("a production name is missing")
+ synErrNoColon = newSyntaxError("the colon must precede alternatives")
+ synErrNoSemicolon = newSyntaxError("the semicolon is missing at the last of an alternative")
+ synErrNoModifierName = newSyntaxError("a modifier needs a name")
+ synErrNoActionName = newSyntaxError("an action needs a name")
+ synErrFragmentNoPattern = newSyntaxError("a fragment needs one pattern element")
+ synErrTreeInvalidFirstElem = newSyntaxError("the first element of a tree structure must be an ID")
+ synErrTreeUnclosed = newSyntaxError("unclosed tree structure")
)