[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Evolutionary User Strategy - A Compromise
From: |
Erik Sandberg |
Subject: |
Re: Evolutionary User Strategy - A Compromise |
Date: |
Wed, 12 Jul 2006 20:08:06 +0200 |
User-agent: |
KMail/1.9.1 |
On Wednesday 12 July 2006 17:22, Anthony Youngman wrote:
> I don't really understand grammars etc (which is why my DATABASIC thing
> is on/off :-).
>
> But from my experience with Antlr, I don't see why you should lose
> stuff. Your PEG article mentions ASTs. I don't see that converting a .ly
> file into an AST can be that hard. So, for example, we write a Antlr
> grammar that creates a lexer/parser that turns the .ly into an AST. We
> now write another grammar that converts the AST to a .ly file.
A problem here is code duplication; it takes some effort to maintain two
parsers instead of one. I think it will be difficult to automatically test
that the current antlr parser corresponds well with the actual grammar the
current lilypond version uses.
I have been thinking about moving lily's entire parser out to Scheme; this way
we could keep one old parser for each version, and use it to generate an AST,
which then is converted nicely using rules written in Scheme (Scheme rocks
when it comes to tree manipulation). I'm not sure if it's possible though.
BTW: Will your solution handle whitespace nicely?
--
Erik
Re: Evolutionary User Strategy - A Compromise, Colin Wilding, 2006/07/12
- RE: Evolutionary User Strategy - A Compromise, Anthony Youngman, 2006/07/12
- Re: Evolutionary User Strategy - A Compromise, Erik Sandberg, 2006/07/12
- Re: Evolutionary User Strategy - A Compromise, Simon Dahlbacka, 2006/07/12
- RE: Evolutionary User Strategy - A Compromise, Anthony Youngman, 2006/07/12
- Re: Evolutionary User Strategy - A Compromise,
Erik Sandberg <=
- RE: Evolutionary User Strategy - A Compromise, Anthony Youngman, 2006/07/13
- Re: Evolutionary User Strategy - A Compromise, Mats Bengtsson, 2006/07/19
- Re: Evolutionary User Strategy - A Compromise, Erik Sandberg, 2006/07/22
Re: Evolutionary User Strategy - A Compromise, Erik Sandberg, 2006/07/12
Re: Evolutionary User Strategy - A Compromise, Colin Wilding, 2006/07/13
Re: Evolutionary User Strategery, Alexander Brock, 2006/07/17