Boost logo

Boost :

From: David A. Greene (greened_at_[hidden])
Date: 2002-01-17 12:33:28


Vladimir Prus wrote:

> joel de guzman wrote:

>>Much more than that now. But I am not sure what you mean by "validate them,
>>handle multiple assignments and so on".
>
> Quite simple. Users should be able to extend parser framework for their
> types, and not be required to use Spirit for validating those types.

AFAIK, this is simply a matter of creating a validator
functor to be invoked by a spirit semantic action. I
can imagine a design that allows the programmer to
pass validators to the parser without knowing anything
about Spirit.

> The only question is if Spirit will make any much difference for users that
> will justify making it a requirement. Yes, David Greene expressed a wish for
> an elaborated command line syntax, but it remains to be decided if it can'be
> be supported without using full-blown parser.

Oh, it certainly _can_ be supported. Our current implementation
uses a hand-crafter parser. Just a few weeks ago I discovered
a bug that had gone unnoticed for about 2 years. I decided it
was too difficult to fix the problem so I simply worked around
it by specifying the command line differently. Bottom line is
that if I had the chance to do it over, I would have used YACC
(Spirit now that it is available).

Granted, our hand-crafted implementation was written quickly
without much thought put into maintenance (academic projects
tend to be like that, unfortunately). However, using a
formalized grammar, we'd have maintainability for "free."

                              -Dave

-- 
"Some little people have music in them, but Fats, he was all music,
  and you know how big he was."  --  James P. Johnson

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