Front End (part 2) More easy stuff. Makefiles have a pretty simple syntactic structure. Our parser is recursive-descent, extended LL(1). It is written in the pa_extend extension language of camlp4 This language is designed for extending the Ocaml grammar. But we are just going to replace the grammar altogether. EXTEND makefile_item: [ [ EOL -> None | s = WORD; "="; ws = words; EOL -> ... | t = WORD; ":"; ws = words; EOL; a = actions -> ... ] ]; actions: [ [ az = LIST0 action -> ... ] ]; action: [ [ TAB; ws = words; EOL -> ... ] ]; words: [ [ ws = LIST0 word -> ... ] ]; word: [ [ w = WORD -> ... | "$"; "^" -> ... | "$"; "<" -> ... | "$"; "@" -> ... | "$"; "("; w = WORD; ")" -> ... ] ]; END