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/lr0_item_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'grammar/lr0_item_test.go') diff --git a/grammar/lr0_item_test.go b/grammar/lr0_item_test.go index 9a0628a..78e9f3b 100644 --- a/grammar/lr0_item_test.go +++ b/grammar/lr0_item_test.go @@ -33,8 +33,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