Re: Separating algorithms from implementations (long)

jthorn@galileo.thp.univie.ac.at (Jonathan Thornburg)
9 Sep 2000 13:19:29 -0400

          From comp.compilers

Related articles
Seprerating algorithms from implementations (long) TSharp@Serif.com (Toby Sharp) (2000-08-27)
Re: Separating algorithms from implementations (long) westin@graphics.cornell.edu (2000-09-07)
Re: Separating algorithms from implementations (long) mal@bewoner.dma.be (Lieven Marchand) (2000-09-07)
Re: Separating algorithms from implementations (long) noelw@dai.ed.ac.uk (Noel Welsh) (2000-09-08)
Re: Separating algorithms from implementations (long) joachim_d@gmx.de (Joachim Durchholz) (2000-09-08)
Re: Separating algorithms from implementations (long) toon@moene.indiv.nluug.nl (Toon Moene) (2000-09-08)
Re: Separating algorithms from implementations (long) dara_gallagher@my-deja.com (Dara Gallagher) (2000-09-09)
Re: Separating algorithms from implementations (long) jthorn@galileo.thp.univie.ac.at (2000-09-09)
Re: Separating algorithms from implementations (long) dara_gallagher@my-deja.com (Dara Gallagher) (2000-09-13)
Re: Separating algorithms from implementations (long) fjh@cs.mu.OZ.AU (2000-09-13)
Re: Separating algorithms from implementations (long) nr@labrador.eecs.harvard.edu (2000-09-23)
| List of all articles for this month |

From: jthorn@galileo.thp.univie.ac.at (Jonathan Thornburg)
Newsgroups: comp.compilers
Date: 9 Sep 2000 13:19:29 -0400
Organization: Universitaet Wien (Vienna, Austria) / Institut fuer Theoretische Physik
References: 00-08-124 00-09-017 00-09-064
Summary: Kernighan & Pike discuss comma-separated-values parsing in detail
Keywords: assembler, parse, books

Toon Moene <toon@moene.indiv.nluug.nl> wrote:
>I once
>needed a "parser" that would read a comma separated string of
>keyword=value pairs in a VAX assembler program.
>
>It just took one loop over
>
> MATCHC ....
> MOVC3 ....
>
>instructions.
>
>Then I thought, well - lets describe what happens here in C, so that my
>successor knows what I meant to be done here.
>
>After 3 aborted attempts I gave up in horror.


The (excellent) book
The Practice of Programming
by Brian W. Kernighan and Rob Pike.
Addison-Wesley, Inc., 1999.
ISBN 0-201-61586-X.
http://cm.bell-labs.com/cm/cs/tpop/index.html
discusses this problem in detail in chapter 4, and presents
fully-worked-out code in both C and C++.


--
-- Jonathan Thornburg <jthorn@thp.univie.ac.at>
      http://www.thp.univie.ac.at/~jthorn/home.html
      Universitaet Wien (Vienna, Austria) / Institut fuer Theoretische Physik
      [visiting Albert Einstein Institute (Golm, Germany) until Sept 10]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.