refactor antlr example