Recreating the D parser, with hooks.