aboutsummaryrefslogtreecommitdiff
path: root/spec/syntax_error.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-06-30 23:44:50 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-06-30 23:54:01 +0900
commitb8b71860d7df5d06dd8a2b9ac62035e8ba8778a7 (patch)
treec0075cd6813085401dbaf44e62ca14ec2b93d30c /spec/syntax_error.go
parentAdd testing for the driver (diff)
downloadurubu-b8b71860d7df5d06dd8a2b9ac62035e8ba8778a7.tar.gz
urubu-b8b71860d7df5d06dd8a2b9ac62035e8ba8778a7.tar.xz
Simplify syntax of modifiers and semantic actions
Modifiers and semantic actions are represented by directives following the '#' symbol.
Diffstat (limited to 'spec/syntax_error.go')
-rw-r--r--spec/syntax_error.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/syntax_error.go b/spec/syntax_error.go
index d0e0dc5..cefde12 100644
--- a/spec/syntax_error.go
+++ b/spec/syntax_error.go
@@ -29,8 +29,9 @@ var (
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")
+ synErrNoDirectiveName = newSyntaxError("a directive needs a name")
+ synErrProdDirNoNewline = newSyntaxError("a production directive must be followed by a newline")
+ synErrSemicolonNoNewline = newSyntaxError("a semicolon must be followed by a newline")
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")