Refactored antlr from cli into dsl