Updated README.

This commit is contained in:
yhirose 2015-06-15 16:05:36 -04:00
parent 4eab716a6a
commit 0654a16ebc

View File

@ -295,14 +295,14 @@ The following are available operators:
Adjust definitions Adjust definitions
------------------ ------------------
It's possible to add and override definitions with parser operaters. It's possible to add/override definitions.
```c++ ```c++
auto syntax = R"( auto syntax = R"(
ROOT <- _ 'Hello' _ NAME '!' _ ROOT <- _ 'Hello' _ NAME '!' _
)"; )";
Rules rules = { Rules additional_rules = {
{ {
"NAME", usr([](const char* s, size_t n, SemanticValues& sv, any& c) -> size_t { "NAME", usr([](const char* s, size_t n, SemanticValues& sv, any& c) -> size_t {
static vector<string> names = { "PEG", "BNF" }; static vector<string> names = { "PEG", "BNF" };