Very basic scanner and recursive descent parser written in Java