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/