For those of you with a plane to catch, this section provides some instant templates and recipes for performing the most commonly-required operations using AST, but without going into detail. The examples given (sort of) follow on from each other, so you should be able to construct a variety of programs by piecing them together. Note that some of them appear longer than they actually are, because we have included plenty of comments and a few options that you probably won't need.
If any of this material has you completely baffled, then you may want to read the introduction to AST programming concepts in ยง4 first. Otherwise, references to more detailed reading are given after each example, just in case they don't quite do what you want.