On 9/2/13 2:36 AM, Michael Powell wrote:
Hello,
Question re: parsing string into a Fusion-adapted struct.
First, magic! Wow, I like it.
voodoo? ;-)
Question about the immediate result, true/false.
Let's say the operation fails for whatever reason. In our use-case, we'll be reading some text in from a Linux /sysfs -provided API. We'll parse the contents into a struct instance.
If the operation fails for whatever reason, does not match the grammar, are any values mapped into the structure? My first guess, is possibly: a partial (though still failing) match, would partially populate the instance?
possibly and likely.
I am using the employee-example as our boiler plate.
http://www.boost.org/doc/libs/1_54_0/libs/spirit/example/qi/employee.cpp
The outcome of which would be whether to consider the instance valid for reporting further into user-space, or what else to do with the outcome from there.
Regards, -- Joel de Guzman http://www.ciere.com http://boost-spirit.com http://www.cycfi.com/