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/parsing_table_test.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'grammar/parsing_table_test.go') diff --git a/grammar/parsing_table_test.go b/grammar/parsing_table_test.go index feec74a..833a4d4 100644 --- a/grammar/parsing_table_test.go +++ b/grammar/parsing_table_test.go @@ -16,6 +16,8 @@ type expectedState struct { func TestGenLALRParsingTable(t *testing.T) { src := ` +%name test + S: L eq R | R; L: ref R | id; R: L; @@ -286,6 +288,8 @@ id: "[A-Za-z0-9_]+"; func TestGenSLRParsingTable(t *testing.T) { src := ` +%name test + expr : expr add term | term -- cgit v1.2.3