this is mostly a question of style. suppose i have a program that does a lot
of user input processing. i have two options:
1. roll my own parser
2. use lex/yacc (or whatever the modern day equivalent is. bison/flex?)
i've done option 1. it works well, but it's not pretty. lots of calls to
functions like memmove() to chop, slice and dice strings.
but it has the nice feature that i don't need to learn yat (yet another thing),
and a lot can be said for that. plus, i've already coded it. i'm looking at
a semi-major rewrite of my parser to enable some more features, and if i'm
going to change over to lex/yacc, now would be the time to do it.
otoh, lex/yacc looks VERY powerful, but it also looks like it has a steep
learning curve. i've heard that lex/yacc is pretty slow too. but i have no
grounding rod to know "how slow is slow".
has anyone here used lex/yacc for a parser? any comments or opinions to help
me make a choice?
pete
--
"Coffee... I've conquered the Borg on coffee!" [EMAIL PROTECTED]
-- Kathryn Janeway on the virtues of coffee www.dirac.org/p