Looks sensible. The comments are confusing. The commit message says almost the opposite of what you do. Maybe "Recognize )(][~| and \! etc. in the lexer. Treat the ) in c4) like the \p command in c4\p but without the need for an escape character, and similarly for '\)' ']' '\!' etc. This requires the lexer to recognize these characters and their escaped versions, but simplifies the parser, and allows ")" to be (re-)defined in LilyPond code. Two characters, '~' and '|', had a second meaning in some contexts, formerly distinguished in the parser, so we change \tempo 20~30 to \tempo 20-30 and the staccatissimo indication to -! "
Changing staccatissimo to -! should get a short1 entry in 'changes.tely' https://codereview.appspot.com/12432043/diff/6001/input/regression/articulation-syntax-change.ly File input/regression/articulation-syntax-change.ly (right): https://codereview.appspot.com/12432043/diff/6001/input/regression/articulation-syntax-change.ly#newcode3 input/regression/articulation-syntax-change.ly:3: texidoc = "The syntactic class of articulations can be changed within It is confusing to put it this way. We could always redefine post events to create an empty chord trill = <>\trill Now we can redefine ) as well It is not clear what functionality you are protecting from regression. Probably this added regression test is not needed, because the usual definition and use of ")" tests the new code. https://codereview.appspot.com/12432043/diff/6001/lily/lexer.ll File lily/lexer.ll (right): https://codereview.appspot.com/12432043/diff/6001/lily/lexer.ll#newcode153 lily/lexer.ll:153: SPECIAL \\.|[][|()~] 'special' is vague. Maybe POST_EVENT_CHAR I wonder why you didn't make an explicit list of the escaped single-characters, POST_EVENT_CHAR [][|)(~] POST_EVENT_COMMAND \\[][)(><~!\\] so you catch errors like \= as an unexpected '=' rather than undefined command "=". https://codereview.appspot.com/12432043/diff/6001/python/convertrules.py File python/convertrules.py (right): https://codereview.appspot.com/12432043/diff/6001/python/convertrules.py#newcode3614 python/convertrules.py:3614: str = re.sub (r"([-^_])\||" + matchstring + r"|[-^_][-^_]", subnonstring, str) convert-ly rules are unlikely to be maintained, but this one is so non-obvious that you might still want a comment: # Match strings, and articulations that end in -^_ # So that we avoid leave alone -| in quoted strings and c4--| https://codereview.appspot.com/12432043/ _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel