Difference between > and >> in Boost Spirit

boost-spirit, c++

Solution

Read the documentation and you will find:

Like the Sequence, the expectation operator, a > b, parses two or more operands (a, b, ... etc.), in sequence:

a > b > ...

However, while the plain Sequence simply returns a no-match (returns false) when one of the elements fail, the expectation: > operator throws an expectation_failure when the second or succeeding operands (all operands except the first) fail to match.

See:

http://www.boost.org/doc/libs/1_55_0/libs/spirit/doc/html/spirit/qi.html

http://www.boost.org/doc/libs/1_55_0/libs/spirit/doc/html/spirit/qi/quick_reference/compound_attribute_rules.html

- http://www.boost.org/doc/libs/1_55_0/libs/spirit/doc/html/spirit/qi/reference/operator/expect.html

Problem

I'm learning Boost-Spirit, from here and examples from StackOverflow. However, I'm not able to find the difference between `>` and `>>` "followed by" sequence operator ? For Instance , the difference here :- ``` qi::phrase_parse(startIt , endIt , par_ob > ';' // par_ob >> ';' ?? , qi::space , result ); ```

Original source