From 42cea3ead12d4f64c03aca2892c37e0f6c8c4c90 Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Thu, 22 Jul 2021 02:19:11 +0900 Subject: Write a description file The description file describes a LR(0) item set and conflicts (if any). --- grammar/slr_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'grammar/slr_test.go') diff --git a/grammar/slr_test.go b/grammar/slr_test.go index 15f58c1..9723a0d 100644 --- a/grammar/slr_test.go +++ b/grammar/slr_test.go @@ -39,8 +39,10 @@ id: "[A-Za-z_][0-9A-Za-z_]*"; if err != nil { t.Fatal(err) } - var b GrammarBuilder - gram, err = b.Build(ast) + b := GrammarBuilder{ + AST: ast, + } + gram, err = b.Build() if err != nil { t.Fatal(err) } -- cgit v1.2.3