aboutsummaryrefslogtreecommitdiff
path: root/driver/syntax_error_test.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-10-28 01:41:21 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-10-28 01:41:21 +0900
commit83bc2b1307d0e73424437649d26b804f20a83c38 (patch)
tree1abb5a6067a66548917fb6cb38335aafc5cd4fe1 /driver/syntax_error_test.go
parentUse maleeni v0.5.1 (diff)
downloadcotia-83bc2b1307d0e73424437649d26b804f20a83c38.tar.gz
cotia-83bc2b1307d0e73424437649d26b804f20a83c38.tar.xz
Add name directive to specify a grammar name
Diffstat (limited to 'driver/syntax_error_test.go')
-rw-r--r--driver/syntax_error_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/driver/syntax_error_test.go b/driver/syntax_error_test.go
index a019b61..579ead1 100644
--- a/driver/syntax_error_test.go
+++ b/driver/syntax_error_test.go
@@ -19,6 +19,8 @@ func TestParserWithSyntaxErrors(t *testing.T) {
{
caption: "the parser can report a syntax error",
specSrc: `
+%name test
+
s
: foo
;
@@ -31,6 +33,8 @@ foo: 'foo';
{
caption: "when the parser reduced a production having the reduce directive, the parser will recover from an error state",
specSrc: `
+%name test
+
seq
: seq elem ';'
| elem ';'
@@ -51,6 +55,8 @@ c: 'c';
{
caption: "After the parser shifts the error symbol, symbols are ignored until a symbol the parser can perform shift appears",
specSrc: `
+%name test
+
seq
: seq elem ';'
| elem ';'
@@ -73,6 +79,8 @@ c: 'c';
{
caption: "when the parser performs shift three times, the parser recovers from the error state",
specSrc: `
+%name test
+
seq
: seq elem ';'
| elem ';'