aboutsummaryrefslogtreecommitdiff
path: root/ch8
diff options
context:
space:
mode:
authorzlg <zlg@zlg.space>2015-12-05 21:46:57 -0800
committerzlg <zlg@zlg.space>2015-12-05 21:46:57 -0800
commit45b8159cc39792ddc4e989b11036f026d49f33e7 (patch)
tree08efc8f468ff8c3461fc32735b7d4423c9def272 /ch8
parentSolve Exercise 6-5: undef() (diff)
downloadknr-45b8159cc39792ddc4e989b11036f026d49f33e7.tar.gz
knr-45b8159cc39792ddc4e989b11036f026d49f33e7.tar.bz2
knr-45b8159cc39792ddc4e989b11036f026d49f33e7.tar.xz
knr-45b8159cc39792ddc4e989b11036f026d49f33e7.zip
Solve Exercise 6-6: A simple `#define` processor
This exercise is probably the most challenging "function puzzle" thus far. Modifying getword(), using various states, and the hashtable all create an example of how small building blocks can work together to make something. The implementation is very simple and nowhere near completely supporting '#define', but that's not the point. To properly support it, you'd need to build an entire preprocessor/parser, and that's far beyond the scope of both the exercise and book.
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions