Boost logo

Boost :

From: joel de guzman (isis-tech_at_[hidden])
Date: 2001-05-30 11:25:15


From: "John Max Skaller" :

> > > This may not be natural. Consider the grammar:
> > >
> > > int = digit *
> > > float = digit + ["." digit *]
> > >
> > > where [] means 'optional'. Using 'set' operators,
> > > I have to write
> > >
> > > int = digit *
> > > float = digit+ ["." digit*] - int
> >
> > Spirit resolves this with the Longest directive.
> > There's your maximal munch stuff.
>
> This has nothing to do with longest parse.
> It has to do with non-disjoint sets.
>

What I meant was that there are other means, apart
from set operators, to define a language in the framework.
I thought your example [int, float] illustrated a limitation when
set operators alone are used, which as I tried to illustrate,
need not be.

Thanks for your replies,
I appreciate your comments a lot.

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