Change gen_test_relations.c to use parser

This makes the utility a lot more modular for future systems.
Eventually, all utilities should be converted. :)