aboutsummaryrefslogtreecommitdiff
path: root/grammar/parsing_table_test.go
diff options
context:
space:
mode:
authorRyo Nihei <nihei.dev@gmail.com>2022-05-07 20:41:33 +0900
committerRyo Nihei <nihei.dev@gmail.com>2022-05-10 23:14:41 +0900
commit3eb0e88f911386a4e6eca991c1471070596c5554 (patch)
tree4c3ea445a804d781b846739d70392ceb1353ea6d /grammar/parsing_table_test.go
parentMake #prec directive change only precedence and not associativity (diff)
downloadurubu-3eb0e88f911386a4e6eca991c1471070596c5554.tar.gz
urubu-3eb0e88f911386a4e6eca991c1471070596c5554.tar.xz
Change syntax for top-level directives
%name changes to: #name example; %left and %right change to: #prec ( #left a b #right c d );
Diffstat (limited to 'grammar/parsing_table_test.go')
-rw-r--r--grammar/parsing_table_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/grammar/parsing_table_test.go b/grammar/parsing_table_test.go
index 833a4d4..522ec1c 100644
--- a/grammar/parsing_table_test.go
+++ b/grammar/parsing_table_test.go
@@ -16,7 +16,7 @@ type expectedState struct {
func TestGenLALRParsingTable(t *testing.T) {
src := `
-%name test
+#name test;
S: L eq R | R;
L: ref R | id;
@@ -288,7 +288,7 @@ id: "[A-Za-z0-9_]+";
func TestGenSLRParsingTable(t *testing.T) {
src := `
-%name test
+#name test;
expr
: expr add term