← Back to context

Comment by vchakrav

18 years ago

I would say that there are two important things to consider:

1. Understanding how a compiler works without getting bogged down by programming language details - This means that you should try and look at compilers written in Standard ML or Ocaml (my favorite), since that would be much easier to follow. For example -- a datatype can be much more succinctly expressed as type any_value = Int | String | Float

rather than across 4 classes (as in the Java case).

2. Start small, and understand it in chunks. For these, a lot of web based resources are ideal. For example, to understand regular expressions, it would be nice if you were able to visualize them, and play around with them visually -

http://osteele.com/archives/2006/02/reanimator

I would also look at simple examples of interpreters, and build up from that, looking at examples of toy compilers:

http://min-caml.sourceforge.net/index-e.html

These will help, of course alongside a book like Appel's or the Dragon Book.