lilypond-user
[Top][All Lists]
Advanced

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

Re: Comment in last line


From: Urs Liska
Subject: Re: Comment in last line
Date: Fri, 11 Jan 2013 23:32:57 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

Am 11.01.2013 23:25, schrieb David Kastrup:
David Kastrup <address@hidden> writes:

Noeck <address@hidden> writes:

Hi,

why does compiling this code fail to compile with lilypond?

\version "2.16.0"
{ a }
%

The empty comment in the last line is the problem.
No, the problem is that there _is_ no last line.  You have an EOF in the
middle of the line (not every editor will even allow producing that).
Since a line comment has to end with a newline, this is not a line
comment, and a non-comment % is beyond LilyPond's understanding.

One would need to non-trivially rewrite comment matching in the lexer to
get either a nicer error message or just silently a line comment even
though the line does not end.
Ok, apparently I lied.

<URL:http://code.google.com/p/lilypond/issues/detail?id=3102>

Hm. I never managed to understand these expression matching hieroglyphs.
But is it right that the 'new' side of the diff does look much simpler than the old one?



reply via email to

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