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]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.