diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2022-03-29 21:52:47 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2022-03-29 22:12:37 +0900 |
commit | 90f28b5f7e7ef08e107e38002d122825764aad09 (patch) | |
tree | d80dfc08063727caa48fac4f28a929cb669c1465 /driver/semantic_action_test.go | |
parent | Change syntax of production directives (diff) | |
download | urubu-90f28b5f7e7ef08e107e38002d122825764aad09.tar.gz urubu-90f28b5f7e7ef08e107e38002d122825764aad09.tar.xz |
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.
Diffstat (limited to 'driver/semantic_action_test.go')
-rw-r--r-- | driver/semantic_action_test.go | 21 |
1 files changed, 14 insertions, 7 deletions
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 { |