Hey
I have added to xpost, in a separate library, some basic (for now) Document Structure Conventions. It is far from finished, but the header of Level 1 DSC is parsed (actually, some level 2 and level 3 comments too, the ones provided by dvips), as well as pages. Trailer is not managed for now, nor comments expanded on several lines.
Later, some DSC validation will use most of the code there (maybe the same code with different path ?)
The code is in src/lib/xpost_dsc* and a binary test is in src/bin.xpost_dsc.c
Remarks, ideas and comments are welcome :-)