You didn't mention the hierarchy bit earlier - that's kind of important, as it means the hierarchy needs to be traversed, which considerably increases the complexity.
You'd need either some recursive function to descend through the hierarchy, displaying the hierarchical names as it does so - I've no idea what format you want them in, and potentially it could get a little complex handling iterated instances, busses and so on. Does it need to handle config views, or a straightforward switch list?
Or you could write a netlister using OSS (either an HNL or FNL netlister).
Either way, not something I have laying around (especially when the specifications are still rather imprecise), so I'd rather point you in the right direction and let you do it ;-)