From 8441a1f1045da1e6eb36d69e4e16cd78b24eb941 Mon Sep 17 00:00:00 2001 From: yhirose Date: Sat, 14 Feb 2015 10:38:15 -0500 Subject: [PATCH] Fixed documentation. --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 63b26f9..b3765ca 100644 --- a/README.md +++ b/README.md @@ -129,9 +129,11 @@ using namespace std; vector tags; Definition ROOT, TAG_NAME, _; -ROOT = seq(_, zom(seq(chr('['), TAG_NAME, chr(']'), _))); -TAG_NAME = oom(seq(npd(chr(']')), dot())), [&](const char* s, size_t l) { tags.push_back(string(s, l)); }; -_ = zom(cls(" \t")); +ROOT <= seq(_, zom(seq(chr('['), TAG_NAME, chr(']'), _))); +TAG_NAME <= oom(seq(npd(chr(']')), dot())), [&](const char* s, size_t l) { + tags.push_back(string(s, l)); + }; +_ <= zom(cls(" \t")); auto ret = ROOT.parse(" [tag1] [tag:2] [tag-3] "); ```