Re: Strength of sequence vs alternative parsers
Michael Powell <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <CAMEoF_FdHUU2No5XDuaNN=-84eYevNxkv=xUcFJM7a-0Xw+n1g@mail.gmail.com> |
On Wed, Dec 6, 2017 at 10:13 AM, Mikael Asplund <[email protected]> wrote: > http://en.cppreference.com/w/cpp/language/operator_precedence Ah, I see. Basically honoring the same language operator precedence rules. Incredible, awesome! Thanks... > 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 > _______________________________________________ > 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