Sunday, June 22, 2008

Bala

Copperbox revision 150.

More work on the SymLilyPond parser.

Yesterdays example for parsing with attributes didn't work when I got round to testing it, chaining attributes with bind (>>=) forces them to be present when we want them to be optional:

pitchA = pPitch >>= pAccidental >>= pMicroTone >>= pOctaveSpec

The new revision uses an alternative to bind (##) that allows the parse to be optional:

pitchA = lexeme $ pPitch ## pAccidental ## pMicroTone ## pOctaveSpec

The parser currently falls down on concatenation - i.e. it cannot handle lists of notes inside a block. I suspect that I'll have to rework how concatenation is handled with in the final-tagless datatypes.

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.