diff options
author | zlg <zlg@zlg.space> | 2015-01-30 00:55:59 -0800 |
---|---|---|
committer | zlg <zlg@zlg.space> | 2015-01-30 00:55:59 -0800 |
commit | 1f92ea2a90d98ef150a8546cf5695a73ba68312d (patch) | |
tree | def01f396ff869a6c8ab99a9c838ba57b6de4a64 /ch4/4-05_math-funcs.c | |
parent | Ensure 1-02's solution compiles (diff) | |
download | knr-1f92ea2a90d98ef150a8546cf5695a73ba68312d.tar.gz knr-1f92ea2a90d98ef150a8546cf5695a73ba68312d.tar.bz2 knr-1f92ea2a90d98ef150a8546cf5695a73ba68312d.tar.xz knr-1f92ea2a90d98ef150a8546cf5695a73ba68312d.zip |
Solve Exercise 5-18: error-recovering `dcl`
This exercise was a real pain in the ass. The original use of
getch() and ungetch() was inferior to a line-based approach. It
really doesn't seem like the way a parser should be built, but
it taught me a little about the order of recursion. I'm convinced
that a debugger is necessary if you want to build a good parser.
This implementation doesn't recurse in a natural way, or even
enough to stack data type prefixes. Hopefully by the time I get to
5-20 I'll have enough ideas to implement something that *does*
recurse well.
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions