lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Evolutionary User Strategy - A Compromise


From: Simon Dahlbacka
Subject: Re: Evolutionary User Strategy - A Compromise
Date: Wed, 12 Jul 2006 18:00:18 +0300



On 7/12/06, Erik Sandberg <address@hidden> wrote:
On Wednesday 12 July 2006 12:59, Anthony Youngman wrote:
> Something I thought of (having seen the comment about convert-ly using
> grep ...)

It's not using grep, but it relies heavily on regexps (so it can somewhat
fairly be compared to sed).

> I've got an on-off thing about writing a DATABASIC compiler (never mind)
> and have come across a tool called Antlr. It is a compiler-compiler and
> generates lexers, parsers and treeparsers.
>
> IF someone wants to put the effort in, it may (or may not be) easy to
> define various grammars to read in and chuck out different music
> formats. It sounds as though a lot of the problems (like the swap
> between < > and << >> for example) would be easy. Especially given
> lilypond's structure it looks like it would be fairly easy to define
> grammars which can read in or chuck out different lily version syntaxes,
> even the \addLyrics / \oldAddLyrics thing maybe.

I'd rather have a look at parsing _expression_ grammars, see:
http://en.wikipedia.org/wiki/Parsing_expression_grammar
Seems to combine simplicity of regexps with the power of CFGs. Doesn't seem to
be widely implemented though.

another possibility might be to "upgrade" convert-ly to use something like pyparsing ( http://http://pyparsing.wikispaces.com/). Still, you can't make a 100% perfect converter..

/S


reply via email to

[Prev in Thread] Current Thread [Next in Thread]