From 0fb6c19e349e98591e8eb4745b2ac3c0ebdf2423 Mon Sep 17 00:00:00 2001 From: Eatswap Date: Sun, 11 Dec 2022 19:43:43 +0800 Subject: [PATCH] fix: mute bison for empty rules --- DragonLisp.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DragonLisp.y b/DragonLisp.y index 64e87b5..47acfd3 100644 --- a/DragonLisp.y +++ b/DragonLisp.y @@ -238,12 +238,12 @@ func-def ; ignored-func-doc - : { std::printf("Parsed ignored-func-doc -> \n"); } + : %empty { std::printf("Parsed ignored-func-doc -> \n"); } | STRING { std::printf("Parsed ignored-func-doc -> STRING\n"); } ; identifier-list - : { std::printf("Parsed identifier-list -> \n"); } + : %empty { std::printf("Parsed identifier-list -> \n"); } | identifier-list IDENTIFIER { std::printf("Parsed identifier-list -> identifier-list IDENTIFIER\n"); } | IDENTIFIER { std::printf("Parsed identifier-list -> IDENTIFIER\n"); } ;