Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2001-05-21 10:12:47


Vesa Karvonen wrote

> > This is interesting, but probably is not usefull.
> > With small grammars this might work,

> This is exactly the reason why I completely disagree on the usefulness
> point.

> [snip]

> Now lets turn the comment into pseudo code:

> istream& operator>>(istream& s, complex& a)
> {
> Terminal<double> re, im;
> Parser parser = re
> | '(' + re + ')'
> | '(' + re + ',' + im +')'
> ;

> s >> parser;

> return complex(re,im);
> }

> The above pseudo code is something I dreamed in early 1999.

Well, this is nice. However, it seems like the grammar here is not LL(1). Am
I wrong? If I right, how this is supposed to work.

> > Template metaprograms are very hard to write, debug and use.

> True, but the problems are solvable and the benefits are clear.

I would like to see working implementation that can handle syntax that you've
given a few lines above.

-- 
Regards,
Vladimir

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