Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #1166
| From | "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> |
|---|---|
| Newsgroups | comp.programming |
| References | <4efd343a$0$18601$bbae4d71@news.suddenlink.net> <2tidna1fDvwWN2DTnZ2dnUVZ7oCdnZ2d@bt.com> <jdkilv$p86$1@speranza.aioe.org> |
| Subject | Re: parser tokens |
| Date | 2011-12-31 08:48 +0000 |
| Message-ID | <5LOdnTsEPYpkVmPTnZ2dnUVZ7oidnZ2d@bt.com> (permalink) |
Rui Maciel wrote:
> Chris Uppal wrote:
>
> > If you are working in C, and don't want to learn how to do parsing
> > properly (fairly big subject, but not unintersting), then see "flex".
> > Also "bison" (yacc).
>
> According to my experience, the flex/bison combo may appear to be a bit
> simpler to work with but in the end it takes much more work to learn the
> basics and to get it up and running, at least when dealing with relatively
> simple languages.
I don't entirely disagree. Adding /any/ tool to the toolchain adds complexity,
and neither flex/lex nor bison/yacc are entirely trivial, especially if you
haven't used them before. Certainly there are thresholds of complexity below
which I wouldn't bother using one or the other (there are also thresholds above
which I would require something better than either).
But I think that for a beginner, as the OP clearly is, you are more likely to
get it more or less right using a tool like flex, than if you do it by hand.
The point is that a half-baked attempt at using a tool will just fail, but a
half-baked attempt at hand-written code will produce half-baked code ;-)
OTOH, Ben has just pointed out that Bill probably wasn't talking about a parser
in the sense that I meant, anyway...
-- chris
Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
parser tokens "Bill Cunningham" <nospam@nspam.invalid> - 2011-12-29 22:46 -0500
Re: parser tokens "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2011-12-30 10:50 +0100
Re: parser tokens Rui Maciel <rui.maciel@gmail.com> - 2011-12-30 14:54 +0000
Re: parser tokens "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2011-12-30 16:26 +0100
Re: parser tokens Rui Maciel <rui.maciel@gmail.com> - 2011-12-30 16:09 +0000
Re: parser tokens "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2011-12-30 18:22 +0100
Re: parser tokens Rui Maciel <rui.maciel@gmail.com> - 2011-12-30 19:33 +0000
Re: parser tokens "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2011-12-30 23:08 +0100
Re: parser tokens "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2011-12-30 12:09 +0000
Re: parser tokens Rui Maciel <rui.maciel@gmail.com> - 2011-12-30 14:43 +0000
Re: parser tokens "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2011-12-31 08:48 +0000
Re: parser tokens Rui Maciel <rui.maciel@gmail.com> - 2011-12-30 14:23 +0000
Re: parser tokens Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-12-30 23:41 +0000
Re: parser tokens "Bill Cunningham" <nospam@nspam.invalid> - 2011-12-31 18:26 -0500
Re: parser tokens Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-01-01 01:51 +0000
Re: parser tokens "Bill Cunningham" <nospam@nspam.invalid> - 2012-01-01 12:17 -0500
Re: parser tokens Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-01-01 22:17 +0000
Re: parser tokens "BartC" <bc@freeuk.com> - 2012-01-01 22:54 +0000
csiph-web