Add callbacks for pre- and post-parse processing.