Boost logo

Boost :

From: Larry Evans (jcampbell3_at_[hidden])
Date: 2001-06-01 11:29:13


joel de guzman wrote:

> From: "Greg Colvin" :
>
> > > > And don't forget
> > > >
> > > > a*b*c
> > > >
> > > > Commutative for numbers, but not matrices, and a common
> > > > substitute in computer languages for
> > > >
> > > > a b c
> > > >
> > > > in algebra. Nice high precedence too.
> > >
> > > Clashes with the Kleene star.
> >
> > What clash? If
> > A * A
> > in Spirit means
> > A A
> > in EBNF and if
> > *A
> > in Spirit means
> > A*
> > in EBNF then
> > *A
> > in Spirit matches nothing, or
> > A
> > or
> > A * A
> > or
> > A * A * A
> > and so on.
> >
>
> Hello Greg,
>
> That's the coolest argument I've seen so far!
> At first I didn't get it but a second look and
> omi-gosh, he's right!!! You are great, man!
>
> a b <in math> ----> a * b <in programming>
> a b <in BNF> ----> a * b <in Spirit>
>
> nice parallels!
>
> *a ---> nothing | a | a * a | a * a * a | a * a * a * a....
>
> <star> a means repeat the <stars> as many as you want.
> And as many stars as the heavens!

Yet One more possibility. Postfix -- and ++ to mean BNF postfix * and +.

Also, if * means sequence, why not make + mean alternative?
I know that's an awful lot of +'s. But then why not & and | to mean BNF
sequence and alternative. I know you responded before about using & for this, but
your objection had something to do with convention meaning for
the operators was violated. But certainly the above use of * does not reflect conventional
meaning. Or maybe I misunderstood your previous objection to using &.


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