Sunday, June 10, 2007

Frown: c2hs parser

Copperbox revision 55.

The pretty printer has been substantially revised, it should now better handle 'empty' documents.

To do this I've introduced a new pretty printing library based on Daan Leijen's PPrint but which is 'empty biased':

Paraphrasing Haskell into something I can type into Blogger:

empty `space` doc results in (doc), whereas with the usual pretty printers it would result in (space, doc).

At the moment the output is less pretty than the previous revision and the new infix combinators have symbols that may be changed, but overall I think it is a good bit simpler for printing C where there are many AST elements that have optional properties.

Blog Archive

About Me

My photo
Disambiguating biog as there are a few Stephen Tetley's in the world. I'm neither a cage fighter or yachtsman. I studied Fine Art in the nineties (foundation Bradford 1992, degree Cheltenham 1992 - 95) then Computing part-time at Leeds Met graduating in 2003. I'm the Stephen Tetley on Haskell Cafe and Stackoverflow.