Thanks, I did see that post about uthash. I'll probably start using it once I don't feel like writing my own any longer :) But I think at least for this I'll implement one.
Thanks for the book recommendation. It seems like you can only get second hand copies but that's fine, I might get one. Actually I'm working my way through "Learn C The Hard Way" which the author has put online and is free to read according to his licence note (the book isn't published yet, but is quite complete, and all the examples I've tried compile/run fine). It's excellent, I find the coding style quite readable and refreshingly different to what I remember C looking like last I learned it (many years ago). I like use of "modern" techniques like unit testing that you don't normally associate with C. The latter half of the book covers some data structures and algorithm implementations (everything I'd imagine you'd need for a Jack compiler, from what I know of it so far).
http://c.learncodethehardway.org/book/I might try and incorporate tests into the VM (Project 7) translator.
Also, completely unrelated to this but I'm thinking now of structuring my project as one app that I refine through the projects. That way I can benefit from bug fixes etc. that I make.
E.g.
jack Prog.asm # Produces Prog.hack, i.e. Project 6
jack Prog.vm # Produces Prog.asm i.e. Project 7
jack Prog.jack # Produces Prog.vm (I think, haven't made it that far yet!)
etc.
Maybe then finally once all done, the file writing in between could be moved to optional flags and then it could be one step to go from .jack to .hack:
jack Prog.jack # Produces Prog.hack
This isn't really suggested anywhere in the book but it seems to make more sense than several distinct programs.