Basically you need a Parser Generator when going to create a new languague (e.g. Java, C) or a parser for some data format (e.g JSON, XML). This Parser Generator is also written in some other language, so you need a program written in some languague to write a new compiler/parser for a new language.
You always can write your own Parser Generator, but there are a lot of them. Knowing it, I recommend you to learn ANTLR, it is very roboust, open source, etc.
Here you can see a working sample parsing JSON data
ast commands, ast bookmarks, ast examples