|
Boost Users : |
Subject: Re: [Boost-users] [Proto]: How to use complex grammars in a domain/extension
From: Roland Bock (rbock_at_[hidden])
Date: 2010-09-21 04:11:29
On 09/21/2010 09:49 AM, Joel Falcou wrote:
> The following code works here:
>
> //
> -----------------------------------------------------------------------
> [...]
Yes, I know, but that is not the grammar I need. I want to combine my
terminal similar to std::string, so that:
std::string a, b;
a; // ok
a + b; // ok
a == b; // ok
a == b + b; // ok
a && a == b; // ERROR
>
> Seems proto::or_ wiht *1* condition acts weird.
> Eric, am I right or am I hallucinating and missing the obvious ?
You can remove the proto::or_ like
struct equation:
proto::equal_to<addition, addition>
{};
It does not change the result. So it does not look like a problem in
proto::or_, but maybe a bug in how proto determines the operators of
extensions?
Regards,
Roland
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net