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

Stephen Tetley stephen.tetley at gmail.com
Mon Mar 22 10:37:40 EDT 2010

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.



More information about the Haskell-Cafe mailing list