Supported `←`.

pull/21/head
yhirose 8 years ago
parent 5b88443270
commit ae400aa218
  1. 3
      README.md
  2. 2
      peglib.h
  3. 2
      test/test.cc

@ -386,7 +386,7 @@ assert(g.parse(" Hello BNF! "));
Unicode support
---------------
Since cpp-peglib only accepts 8 bits characters, it probably accepts UTF-8 text. But `.` matches only a byte, not a Unicode character. Also, it dosn't support `\u????`.
Since cpp-peglib only accepts 8 bits characters, it probably accepts UTF-8 text. But `.` matches only a byte, not a Unicode character. Also, it dosn't support `\u????`.
Sample codes
------------
@ -408,7 +408,6 @@ TODO
----
* Unicode support (`.` matches a Unicode char. `\u????`, `\p{L}`)
* Allow `←` and `ε`
License
-------

@ -1810,7 +1810,7 @@ private:
seq(lit("\\x"), cls("0-9a-fA-F"), opt(cls("0-9a-fA-F"))),
seq(npd(chr('\\')), dot()));
g["LEFTARROW"] <= seq(lit("<-"), g["Spacing"]);
g["LEFTARROW"] <= seq(cho(lit("<-"), lit("")), g["Spacing"]);
~g["SLASH"] <= seq(chr('/'), g["Spacing"]);
g["AND"] <= seq(chr('&'), g["Spacing"]);
g["NOT"] <= seq(chr('!'), g["Spacing"]);

@ -8,7 +8,7 @@
TEST_CASE("Simple syntax test", "[general]")
{
peg::parser parser(
" ROOT <- _ "
" ROOT _ "
" _ <- ' ' "
);

Loading…
Cancel
Save