TODO This needs to be very much like XPath2.jjt, how can we do it to reduce duplication?