Firstly, you've given an example, not specified a format. Before you go any further, you need to get hold of a complete specification for the format. Or if there isn't one, you need to see the code that generates it, and reverse engineer a specification.
(If you try to implement based on a small example, there's a good chance that your parser will encounter real life examples that don't fit the patterns that you have intuited.)
Having done that you can look for an off-the-shelf parser that can cope with your format. If you are lucky, it might be close enough to INI, or JSON or YAML or something else for the corresponding parser to (mostly) work.
But the chances are that it won't, and that you will need to write your own parser. There are various ways you could do this, for instance:
- You could split the file into lines and "parse" each line with a regex.
- You could parse the file using a Scanner with appropriate delimiters.
- You could use a parser generator to implement a lexer and parser.
- You could implement a simple lexer and parser by hand.
- There are probably Groovy specific solutions.
In reality the correct choice(s) depend on how simple or complex the actual format is. We can't tell that from a single example.