Saturday, July 7, 2012

wumpus-expr

Copperbox revision 2802.

I've implemented a trivial and incomplete translation of the knormal form representation into JavaScript - only two expression cases are handled Command and Seq others cause a pattern match failure.

Friday, July 6, 2012

pretty-expr-hpj

Copperbox revision 2801.

Work on the C99 and JavaScript expression pretty printers. I've now implemented all the operators except for the mixfix (distfix?) ones like array access and conditional expressions. Currently, these can't be encoded in pretty-epxr-hpj which only handles prefix, postfix and binary expressions.


Thursday, July 5, 2012

wumpus-expr

Copperbox revision 2800.

I've moved the JavaScript expression pretty printer into pretty-expr-hpj - a better place for it.

Wednesday, July 4, 2012

wumpus-expr

Copperbox revision 2799.

Initial work on the syntax tree and pretty printer for the JavaScript backend.

Tuesday, July 3, 2012

wumpus-expr

Copperbox revision 2798.

I've changed the exports of the optimization functions so they work on programs rather than expressions.

I hope "compilation" of Wumpus-Expr should be fairly easy as the language is first-order rather than higher order. A program is just a list of function definitions.

Monday, July 2, 2012

wumpus-expr

Copperbox revision 2797.

I've added more output commands.

Canvas appears to take many of its command from PostScript, the biggest difference seems to be with the graphic state update commands - line size and end appear as good as the same, but dash pattern and colours are different enough to cause problems. I'll have to think about how to handle them.

Sunday, July 1, 2012

wumpus-expr

Copperbox revision 2796.

Started on wumpus-expr - this is an experimental project that aims to support function definition in the generated PostScript or HTML canvas + JavaScript.

Allowing limited function / procedure definition in the target language is the only way to avoid code size explosion in the output from Wumpus. If wumpus-expr is a success, it will form the backend for WumpusLite.

The initial code has taken the K Normal Form compiler from Ochre and changed the syntax to suit graphics generation rather than Csound instruments.


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.