mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 20:05:31 +00:00
Supported ←
.
This commit is contained in:
parent
5b88443270
commit
ae400aa218
@ -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
|
||||
-------
|
||||
|
2
peglib.h
2
peglib.h
@ -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…
Reference in New Issue
Block a user