How to produce two glossaries from one dictionary or source file?

I looked at the spec, and didn’t find anything about listings, so it works as was required in the OP, is the way I see it.