compiled grammar & using .equals() instead of hashcodes