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/conflict_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/conflict_test.go')
-rw-r--r-- | driver/conflict_test.go | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/driver/conflict_test.go b/driver/conflict_test.go index f507d4f..1f8914f 100644 --- a/driver/conflict_test.go +++ b/driver/conflict_test.go @@ -179,10 +179,14 @@ expr | id ; -whitespaces: "[\u{0009}\u{0020}]+" #skip; -r1: 'r1'; -r2: 'r2'; -id: "[A-Za-z0-9_]+"; +whitespaces #skip + : "[\u{0009}\u{0020}]+"; +r1 + : 'r1'; +r2 + : 'r2'; +id + : "[A-Za-z0-9_]+"; `, src: `a r2 b r1 c r1 d r2 e`, cst: nonTermNode("expr", @@ -226,10 +230,14 @@ expr | id ; -whitespaces: "[\u{0009}\u{0020}]+" #skip; -r1: 'r1'; -r2: 'r2'; -id: "[A-Za-z0-9_]+"; +whitespaces #skip + : "[\u{0009}\u{0020}]+"; +r1 + : 'r1'; +r2 + : 'r2'; +id + : "[A-Za-z0-9_]+"; `, src: `a r2 b r1 c r1 d r2 e`, cst: nonTermNode("expr", |