aboutsummaryrefslogtreecommitdiff
path: root/grammar/grammar_test.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2022-11-05 16:52:37 +0900
committerRyo Nihei <nihei.dev@gmail.com>2022-11-05 16:52:37 +0900
commita6001b32cf805c4e72e05adc37ee60272a600bf1 (patch)
treebcee870f1008689adfa104fb1e97e6414201eb94 /grammar/grammar_test.go
parentRemove alias system (diff)
downloadcotia-a6001b32cf805c4e72e05adc37ee60272a600bf1.tar.gz
cotia-a6001b32cf805c4e72e05adc37ee60272a600bf1.tar.xz
Remove anonymous symbol system
Remove unimportant features to tidy up the specification.
Diffstat (limited to 'grammar/grammar_test.go')
-rw-r--r--grammar/grammar_test.go46
1 files changed, 12 insertions, 34 deletions
diff --git a/grammar/grammar_test.go b/grammar/grammar_test.go
index 80613aa..f6cb681 100644
--- a/grammar/grammar_test.go
+++ b/grammar/grammar_test.go
@@ -1723,12 +1723,14 @@ foo
);
s
- : foo ';'
- | error ';'
+ : foo semi_colon
+ | error semi_colon
;
foo
: 'foo';
+semi_colon
+ : ';';
`,
errs: []*SemanticError{semErrDirInvalidParam},
},
@@ -1965,12 +1967,14 @@ foo
);
s
- : foo ';'
- | error ';'
+ : foo semi_colon
+ | error semi_colon
;
foo
: 'foo';
+semi_colon
+ : ';';
`,
errs: []*SemanticError{semErrDirInvalidParam},
},
@@ -2207,12 +2211,14 @@ foo
);
s
- : foo ';'
- | error ';'
+ : foo semi_colon
+ | error semi_colon
;
foo
: 'foo';
+semi_colon
+ : ';';
`,
errs: []*SemanticError{semErrDirInvalidParam},
},
@@ -2680,34 +2686,6 @@ foo
`,
errs: []*SemanticError{semErrDirInvalidParam},
},
- {
- caption: "the expansion operator cannot be applied to a pattern",
- specSrc: `
-#name test;
-
-s
- : foo 'bar'@b #ast foo b...
- ;
-
-foo
- : "foo";
-`,
- errs: []*SemanticError{semErrDirInvalidParam},
- },
- {
- caption: "the expansion operator cannot be applied to a string",
- specSrc: `
-#name test;
-
-s
- : foo 'bar'@b #ast foo b...
- ;
-
-foo
- : "foo";
-`,
- errs: []*SemanticError{semErrDirInvalidParam},
- },
}
altPrecDirTests := []*specErrTest{