From f4bbd20fb97d6b91c9a53492fd945a4ac7ff4e5f Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Mon, 28 Jun 2021 01:25:54 +0900 Subject: Add ast action --- spec/syntax_error.go | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'spec/syntax_error.go') 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") ) -- cgit v1.2.3