Boost logo

Boost :

From: joel de guzman (joel_at_[hidden])
Date: 2001-05-22 08:40:19


----- Original Message -----
From: "George A. Heintzelman wrote:
 
> Careful with your choice of operators for defining rules. First, I
> don't find the '>>' operator as intuitively appealing as the use of '+'
> in the example above. Second, operator precedence rules here would
> group this expression as:
>
[ snip]

Not true. | op has a lower precedence than >> or + ops.
I was already bitten by that with the , (comma) op. It
was the most natural for sequencing, but it has the lowest
precedence. Lower than =. Gosh I wish I could do:
r = a | b, c;

You have a point though with the + op. Right now Spirit
uses the prefix + (for one or more), the prefix * (for zero
or more). Infix + for sequencing? Hmmm... Well C++ uses
the infix plus for mult and the prefix for deref.

Comments?

[ snip ]

Joel de Guzman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk