Re: Strength of sequence vs alternative parsers
Michael Powell <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <CAMEoF_G7JHGeDaHbhjtFCXBeZvNj8v0Jgotxp1JqR_kSLAR8Wg@mail.gmail.com> |
On Wed, Dec 6, 2017 at 10:21 AM, Mikael Asplund <[email protected]> wrote: > Not basically... excatly. Spirit is pure C++, just (ab)using operator overload to construct parsers. Why not? Leverage what's there. Good stuff. > /Mikael Cheers, Michael > -----Original Message----- > From: Michael Powell [mailto:[email protected]] > Sent: Wednesday, December 6, 2017 16:19 > To: Spirit General Mailing List <[email protected]> > Subject: Re: [Spirit-general] Strength of sequence vs alternative parsers > > 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 _______________________________________________ > 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