Re: Strength of sequence vs alternative parsers
Mikael Asplund <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <[email protected]> |
http://en.cppreference.com/w/cpp/language/operator_precedence So, yes... /Mikael -----Original Message----- From: Michael Powell [mailto:[email protected]] Sent: Wednesday, December 6, 2017 16:08 To: Spirit General Mailing List <[email protected]> Subject: [Spirit-general] Strength of sequence vs alternative parsers Hello, Am I correct in observing that the Sequence parser (>>) is stronger than the alternative parser (|)? i.e. my_rule = a >> b >> c | d >> e >> f ; So, in other words, parenthesis are unnecessary, per se? my_rule = ( a >> b >> c ) | ( d >> e >> f ) ; Unless those groupings require additional operators, like Optional (-), let's say. my_rule = ( a >> b >> c ) | ( d >> -( e >> f ) ) ; Thanks! Cheers, Michael Powell ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Spirit-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/spirit-general ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot