From 9c3497e3502bfa7b538532e690188baf3a97423d Mon Sep 17 00:00:00 2001 From: yhirose Date: Fri, 19 Aug 2022 22:31:04 -0400 Subject: [PATCH] Fixed regression problem caused by #217 --- README.md | 2 +- docs/native.wasm | Bin 421096 -> 421195 bytes peglib.h | 9 ++++++++- test/test2.cc | 15 ++++++++++++--- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8692238..2aae1b7 100644 --- a/README.md +++ b/README.md @@ -624,7 +624,7 @@ public class Example { } > peglint java.peg sample.java -sample.java:5:12: syntax error, unexpected '<', expecting , , . +sample.java:5:12: syntax error, unexpected '<', expecting '(', , . sample.java:8:5: missing semicolon in assignment. sample.java:8:6: invalid statement ``` diff --git a/docs/native.wasm b/docs/native.wasm index 2ae9b1100698b58501025e651e5882ea3dee7329..a4f265d42aaeaef0f34428ac088707ec3a04570e 100755 GIT binary patch delta 14786 zcmd6Od3;nww*Nh~bl;?JIyYqN&H}faAVEQ3#GnpBF32VV?jnPVzLBR1Ak4UrPP56P zAYhAyh#rCnZh;BQks=@%B`2}=jAbW3WaWiS5+ftSV1!S(6r2K# z1v8V`yak$)?RmEZGZ`~T2oi=M3bbNEQn)plWJ%KubIg<}L(*hY8d9ROWePL)2f`4U z*}z1K(f&7>O7w5K23h=L{zqpGo|Q%ZfBkE49>@qJfU}`9f(1lIMn=HEClm@s@C}EJ zaG1j3EF-8tS>z{-M~iZJ4(B`?^fLz6^?sw@QRk2`f&s|`k~pUHQIkde>@t4f@(S_y$^I3DY`Iz|#N>j{- z&7?Wmtc+IppNXcQl$0QOQ0Gf3q7#xg2YW}41iuL$4ju}&kN!v}=wR?baDQ+gN?#|} z1s|}d@I}Fz;7h^LRI)I*AULIFpc$YBD+96UTY-NBRs^DN29~3+EIBIUp~Ser*g$kl zU^FU@(5S%3Ky*Z4I10l8C*{xbC;6jnA3Y&|kjLdQ89ge$m$B$~@`(IKMi0wFC>)gg z>t*zF`56jF=u`QLjD9RXk_lb< zr(7qaA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qzCcZ42DfP1a(K$3t4rJ=7 zX|j;UsMn^+3)S|S@?*7hmV7YkK3H9Lj*hqxXZY|8^wCWBQLi;oT{~NL47x8?(*t~M zRdTkBsQI&Hk;H>^yd57hTZSF>s+{e?BlbDf@>~= errors{ - R"(1:6: syntax error, unexpected ']', expecting .)", + R"(1:6: syntax error, unexpected ']', expecting ','.)", R"(1:18: syntax error, unexpected 'z', expecting .)", R"(1:24: syntax error, unexpected ',', expecting '"'.)", R"(1:31: syntax error, unexpected 'ccc', expecting '"', .)", @@ -1692,6 +1697,7 @@ TEST(ErrorTest, Error_recovery_2) { pg.parse(R"([000]],[111],[222z,"aaa,"bbb",ccc"],[ddd",444,555,"eee],[ )", ast)); + EXPECT_EQ(i, errors.size()); EXPECT_FALSE(ast); } @@ -1761,6 +1767,7 @@ skip_puncs <- [|=]* _ R"(21:17: Use of invalid operator)", R"(24:10: Use of invalid operator combination)", R"(26:10: Missing OR operator (|))", + R"(28:3: Missing opening/closing square bracket)", }; size_t i = 0; @@ -1803,6 +1810,8 @@ sss | ttt )", ast)); + EXPECT_EQ(i, errors.size()); + ast = pg.optimize_ast(ast); EXPECT_EQ(R"(+ START