lilypond-devel
[Top][All Lists]
Advanced

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

Re: Special-case syntax error of duration before octave marks (issue 557


From: dak
Subject: Re: Special-case syntax error of duration before octave marks (issue 557410043 by address@hidden)
Date: Wed, 12 Feb 2020 02:38:15 -0800

https://codereview.appspot.com/557410043/diff/545570043/lily/parser.yy
File lily/parser.yy (right):

https://codereview.appspot.com/557410043/diff/545570043/lily/parser.yy#newcode3676
lily/parser.yy:3676: | pitch exclamations questions octave_check
duration stray_quotes optional_rest post_events {
On 2020/02/12 06:45:08, hanwenn wrote:
> why can't this case be folded in to the preceding rule? Maybe this
comment says
> it already; if so an example would help.

Astute observation.  We print out the grammar in the manual and mixing
error productions and normal productions seems weird and misleading. 
However, there is no way to hide error productions from the grammar, so
my version is not better in that regard (though stray_quotes seems
rather obvious).

But you are right: this calls for making folding into the previous rule.
Will do.

https://codereview.appspot.com/557410043/diff/545570043/lily/parser.yy#newcode3706
lily/parser.yy:3706: parser->parser_error (@6, _ ("octave marks must
precede duration"));
On 2020/02/12 06:45:08, hanwenn wrote:
> add a comment that we sholudn't drop this error, even though this
works for
> users (I think we don't want that because it makes parsing .ly harder
for
> others.)

Accepting that "syntax" would give me a rash.  I had enough of a problem
giving the compiler knowledge about it.  Having it accept it would make
me very unhappy.

I'll try to put in an appropriate comment.

https://codereview.appspot.com/557410043/



reply via email to

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