[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: indent-ly
From: |
David Kastrup |
Subject: |
Re: indent-ly |
Date: |
Thu, 22 Oct 2009 11:49:26 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
"Bertalan Fodor (LilyPondTool)" <address@hidden> writes:
> Now, the real problem I see with this approach is that no perfect
> formatting (which is not the same as indentation) can be done without
> actually parsing the input.
I don't see that.
> Complete parsing of LilyPond input is _impossible_ without LilyPond
> itself.
There are very few things actually affecting input syntax (redefining
note names is one of those). Chord and lyrics mode, too, but I don't
think that the subtleties are actually important for formatting and
indentation. It is perfectly acceptable to just break on spaces, and
indent according to >> } > nesting. After discounting quoted strings,
-> \> \< and similar articulation.
> For example you need to format LilyPond code _inside_ Scheme code
> (remember the #{ construct used in define-music-function)
Yes, but it is not like there are multiple arbitrary ways in which this
can happen. It is actually just #{ IIRC.
> So a standard formatting engine can only be written inside LilyPond,
> or at least using LilyPond to generate metadata describing the
> structure of the input.
I think that view is overly pessimistic.
--
David Kastrup
Re: indent-ly, -Eluze, 2009/10/21
Re: indent-ly, Wilbert Berendsen, 2009/10/26
Message not available
- Message not available
- Message not available
- Message not available
- Re: indent-ly, Martin Tarenskeen, 2009/10/23
- Re: indent-ly, Daniel Hulme, 2009/10/23