[Haskell-cafe] Syntax programming with lexemes rather than trees?

Henning Thielemann schlepptop at henning-thielemann.de
Wed Mar 24 12:27:17 EDT 2010

Stephen Tetley schrieb:
> Hello All
> Modern functional programming languages give you algebraic data types
> that are mighty convenient for programming with syntax trees. However,
> I'm working in a domain (music typesetting) where modelling syntax
> with trees can be problematic and I'm wondering whether I should work
> at a lower level - essentially a list / stream of lexemes and some
> notion of a context stack for processing, tracking when I'm inside a
> tuplet and the metrical calculation is scaled, for example.
> Does anyone know of any previous work that takes a "lexical" view of
> syntax rather than an abstract syntax tree view? Any domain is good -
> I can't imagine there's any prior work on music typesetting.
> Pointers to papers would be more digestible than code but either is
> fine. Similarly, implementation in any functional language is fine.
There was some unpublished work to emit Lilypond code for Haskore songs.

More information about the Haskell-Cafe mailing list