Fix m3

Hi Tiago

Here's a set of updates after Dart M3. Note that the release isn't "green" yet - a couple of test cases still fail, probably because antlr internally uses a different template tree.

Regards
Karl