From 83bc2b1307d0e73424437649d26b804f20a83c38 Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Thu, 28 Oct 2021 01:41:21 +0900 Subject: Add name directive to specify a grammar name --- grammar/lr0_test.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'grammar/lr0_test.go') diff --git a/grammar/lr0_test.go b/grammar/lr0_test.go index 4a613dd..cde3f0a 100644 --- a/grammar/lr0_test.go +++ b/grammar/lr0_test.go @@ -17,6 +17,8 @@ type expectedLRState struct { func TestGenLR0Automaton(t *testing.T) { src := ` +%name test + expr : expr add term | term @@ -225,6 +227,8 @@ id: "[A-Za-z_][0-9A-Za-z_]*"; func TestLR0AutomatonContainingEmptyProduction(t *testing.T) { src := ` +%name test + s : foo bar ; -- cgit v1.2.3