mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 11:55:30 +00:00
Fixed sample examples in README
This commit is contained in:
parent
347113d4fd
commit
523137c5dd
@ -170,7 +170,7 @@ auto ret = pg.parse(" token1, token2 ");
|
||||
We can ignore unnecessary semantic values from the list by using `~` operator.
|
||||
|
||||
```cpp
|
||||
peg::pegparser parser(R"(
|
||||
peg::parser parser(R"(
|
||||
ROOT <- _ ITEM (',' _ ITEM _)*
|
||||
ITEM <- ([a-z])+
|
||||
~_ <- [ \t]*
|
||||
@ -186,7 +186,7 @@ auto ret = parser.parse(" item1, item2 ");
|
||||
The following grammar is same as the above.
|
||||
|
||||
```cpp
|
||||
peg::pegparser parser(R"(
|
||||
peg::parser parser(R"(
|
||||
ROOT <- ~_ ITEM (',' ~_ ITEM ~_)*
|
||||
ITEM <- ([a-z])+
|
||||
_ <- [ \t]*
|
||||
|
Loading…
Reference in New Issue
Block a user