[DGD] one more about parse_string
Felix A. Croes
felix at dworkin.nl
Thu Jul 26 14:29:09 CEST 2001
pete at ana.sk wrote:
> Just a question: if i understand it good, parse_string stores build
> grammar automatons in object, one per object, or am in mistaking?
> Now is the question if it could be good idea to make someting like
> special parse object and clone new one for each grammar that
> want to use more often, would it affect performance good enough to
> make the code for it? I personaly hate to write string parsers, so im
> using plenty or parse_string and grammars already ... and i have
> only little piece of code done yet :)
Yes. Re-using the same grammar makes things a lot faster, so it is
worthwhile to make objects that use and re-use a single grammar, only.
If the same object uses a different grammar, the parsing automaton has
to be rebuilt from the beginning.
Regards,
Dworkin
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list