From b8b71860d7df5d06dd8a2b9ac62035e8ba8778a7 Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Wed, 30 Jun 2021 23:44:50 +0900 Subject: Simplify syntax of modifiers and semantic actions Modifiers and semantic actions are represented by directives following the '#' symbol. --- spec/syntax_error.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'spec/syntax_error.go') 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") -- cgit v1.2.3