diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-02-11 17:18:30 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-02-11 17:18:30 +0200 |
commit | 49d8e39f9a42ff1963c5df0f6e9ed903d66f2eb0 (patch) | |
tree | 17cb3577baa07e30720788e059399f7c07c22a37 /examples/cxx/parser | |
parent | bcf2ac66e6c21d75f4e76b8e0bc2e3c6d64886b8 (diff) |
Fix recursive polymorphic parsing in C++/Parser
New test: cxx/parser/polyrecur.
Diffstat (limited to 'examples/cxx/parser')
-rw-r--r-- | examples/cxx/parser/wildcard/driver.cxx | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/examples/cxx/parser/wildcard/driver.cxx b/examples/cxx/parser/wildcard/driver.cxx index aed2560..7ed7aa6 100644 --- a/examples/cxx/parser/wildcard/driver.cxx +++ b/examples/cxx/parser/wildcard/driver.cxx @@ -104,7 +104,7 @@ namespace email #ifndef XSDE_POLYMORPHIC _start_any_element (const ro_string& ns, const ro_string& name) #else - _start_any_element (const ro_string& ns, + _start_any_element (const ro_string& ns, const ro_string& name, const char*) #endif @@ -147,7 +147,9 @@ namespace email return; } #endif - p->_pre_impl (ctx); + // Indicate transition to the nested parser. + // + ctx.nested_parser (p); } } @@ -167,11 +169,6 @@ namespace email { if (name == "text") { - // Note that we don't call _post_impl() (corresponding to - // _pre_impl()) here. It is called automatically by the - // infrastructure. - // - string text (string_p_.post_string ()); #ifndef XSDE_EXCEPTIONS @@ -188,11 +185,6 @@ namespace email } else if (name == "binary") { - // Note that we don't call _post_impl() (corresponding to - // _pre_impl()) here. It is called automatically by the - // infrastructure. - // - binary_p_.post_binary (); #ifndef XSDE_EXCEPTIONS |