From 90f28b5f7e7ef08e107e38002d122825764aad09 Mon Sep 17 00:00:00 2001 From: Ryo Nihei Date: Tue, 29 Mar 2022 21:52:47 +0900 Subject: Move directives given to lexical productions Move all directives given to lexical productions from alternative directives to production directives. This change aims to ensure consistency with respect to the syntax of definitions of terminal symbols and non-terminal symbols. --- driver/semantic_action_test.go | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'driver/semantic_action_test.go') diff --git a/driver/semantic_action_test.go b/driver/semantic_action_test.go index 791b5f0..f9708b7 100644 --- a/driver/semantic_action_test.go +++ b/driver/semantic_action_test.go @@ -59,10 +59,14 @@ elem : char char char ; -ws: "[\u{0009}\u{0020}]+" #skip; -semicolon: ';'; -star: '*'; -char: "[a-z]"; +ws #skip + : "[\u{0009}\u{0020}]+"; +semicolon + : ';'; +star + : '*'; +char + : "[a-z]"; ` specSrcWithoutErrorProd := ` @@ -76,9 +80,12 @@ elem : char char char ; -ws: "[\u{0009}\u{0020}]+" #skip; -semicolon: ';'; -char: "[a-z]"; +ws #skip + : "[\u{0009}\u{0020}]+"; +semicolon + : ';'; +char + : "[a-z]"; ` tests := []struct { -- cgit v1.2.3