aboutsummaryrefslogtreecommitdiff
path: root/grammar/grammar_test.go
diff options
context:
space:
mode:
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{