Just read the book "Language implementations patterns" by Parr (<a href="https://www.goodreads.com/book/show/6770855-language-implementation-patterns" rel="nofollow">https://www.goodreads.com/book/show/6770855-language-impleme...</a>). He also created ANTLR.