Nick Sabalausky wrote:
Can't say I'm really familiar with Spirit. From a brief lookover, these are
my impresions of the differences:
Spirit: Grammar is embedded into your source code as actual C++ code.
Goldie: Grammar is defined in a domain-specfic language.
But either one could probably have a wrapper to work the other way.
Spirit: Uses (abuses?) operator overloading (Although, apperently SpiritD
doesn't inherit Spirit's operator overloading:
http://www.sstk.co.uk/spiritd.php )
Goldie: Operator overloading isn't really applicable, because of using a
DSL.
As they stand, Spirit seems like it could be pretty handly for simple, quick
little DSLs, ex, things for which Goldie might seem like overkill. But
Goldie's interface could probably be improved to compete pretty well in
those cases. OTOH, Goldie's approach (being based on GOLD) has a deliberate
separation between grammar and parsing, which has it's own benefits; for
instance, grammar definitions can be re-used for any purpose.
Does Goldie have (like Spirit) a set of canned routines for things like numeric
literals?
Can the D version of Goldie be turned into one file?