aboutsummaryrefslogtreecommitdiff
path: root/driver/parser_test.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2021-07-31 01:48:16 +0900
committerRyo Nihei <nihei.dev@gmail.com>2021-07-31 01:48:16 +0900
commite9361ebd47bba3254c3d44f25f9942665b88db2f (patch)
tree7f037bde5ba11dd4a31f43344953b84072717d4b /driver/parser_test.go
parentDetect unused-symbol error (diff)
downloadurubu-e9361ebd47bba3254c3d44f25f9942665b88db2f.tar.gz
urubu-e9361ebd47bba3254c3d44f25f9942665b88db2f.tar.xz
Prevent terminals used in productions from being skipped
A terminal symbol used in productions cannot have the skip directive.
Diffstat (limited to 'driver/parser_test.go')
-rw-r--r--driver/parser_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/driver/parser_test.go b/driver/parser_test.go
index e32e34c..8145d7b 100644
--- a/driver/parser_test.go
+++ b/driver/parser_test.go
@@ -188,6 +188,17 @@ bar: "bar";
src: `foo`,
specErr: true,
},
+ // A terminal used in productions cannot have the skip directive.
+ {
+ specSrc: `
+a
+ : foo
+ ;
+foo: "foo" #skip;
+`,
+ src: `foo`,
+ specErr: true,
+ },
{
specSrc: `
mode_tran_seq