Rewrite grammar to better match spec

This solves several issues with the previous grammar. Also change root scope to longer treat source.java as a parent grammar. Fixes #8 and #23.