Re: Error Handling
Mathias Gaunard <[email protected]> Fri, 11 Feb 2011 00:19:46 +0100
| Newsgroups | gmane.comp.parsers.spirit.devel |
|---|---|
| Message-ID | <[email protected]> |
On 10/02/2011 22:42, Stewart, Robert wrote:
> Thanks, Joel, but I can't get things to compile and I don't find documentation on info. I tried this:
>
> on_error<fail>(r,
> if_(val(')') == _4)
> [
> ...
> ]);
>
> That didn't compile, so I tried this:
>
> on_error<fail>(r,
> if_(ref(")") == _4)
> [
> ...
> ]);
>
> That didn't compile either. The only use of _4 in the documentation streams it to std::cout. What am I missing? Did I misunderstand you?
The what parameter is a boost::spirit::info, which is basically a tree
of strings.
Hopefully get<utf8_string>(info.value) will get you something more
practical out of it, since it should never be a tree in this context.
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb