|
Boost Users : |
From: Vaclav Vesely (yg-boost-users_at_[hidden])
Date: 2003-04-06 16:06:55
Joel de Guzman wrote:
...
> Actually, Spirit v1.5.1 rules can be stored as you've tried to do.
Unfortunately,
> the C++ copy/assignment semantics differ too much from EBNF that
> when I tried to merge a hybrid, people complained and it caused lots of
> confusion (see the Boost Spirit review sometime in October 2002).
...
I don't claim the following is the only truth. It's just my subjective point
of view.
IMO the C++ copy/assigment semantics is very importent. A breach of this
semantics is much more confusing than the need of "r = rr.alias();"
Even if the former beaviour was not suitable, I wouldn't abolish the
copy/assigment semantics. Instead of it I would change the way of setting
rules in this way:
r.reset(a >> b);
r.reset(rr);
So this
r = rr;
would lead to sharing definition and this
r = a >> b;
would be an error.
As I said, this is only my point of view. I will be glad to confront it with
any other.
Regards,
w
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