diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2022-05-09 23:52:56 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2022-05-10 23:14:52 +0900 |
commit | 054307b6c99ab962cfa9bcb4c4d50f3aea5406ea (patch) | |
tree | 73aea74559c64f3bcb55f3a39b2399714b616174 /grammar/lr0_test.go | |
parent | Change the default suffix of a grammar file from .vr to .vartan (diff) | |
download | cotia-054307b6c99ab962cfa9bcb4c4d50f3aea5406ea.tar.gz cotia-054307b6c99ab962cfa9bcb4c4d50f3aea5406ea.tar.xz |
Make the identifier format strict
Diffstat (limited to 'grammar/lr0_test.go')
-rw-r--r-- | grammar/lr0_test.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/grammar/lr0_test.go b/grammar/lr0_test.go index 1b20d78..b31126e 100644 --- a/grammar/lr0_test.go +++ b/grammar/lr0_test.go @@ -236,10 +236,11 @@ foo : ; bar - : BAR + : b | ; -BAR: "bar"; + +b: "bar"; ` var gram *Grammar @@ -290,7 +291,7 @@ BAR: "bar"; genLR0Item("s", 2, "foo", "bar"), }, 4: { - genLR0Item("bar", 1, "BAR"), + genLR0Item("bar", 1, "b"), }, } @@ -319,7 +320,7 @@ BAR: "bar"; kernelItems: expectedKernels[2], nextStates: map[symbol][]*lrItem{ genSym("bar"): expectedKernels[3], - genSym("BAR"): expectedKernels[4], + genSym("b"): expectedKernels[4], }, reducibleProds: []*production{ genProd("bar"), @@ -339,7 +340,7 @@ BAR: "bar"; kernelItems: expectedKernels[4], nextStates: map[symbol][]*lrItem{}, reducibleProds: []*production{ - genProd("bar", "BAR"), + genProd("bar", "b"), }, }, } |