On 2012/07/31 16:56:51, t.daniels_treda.co.uk wrote:
<mailto:d...@gnu.org> wrote Tuesday, July 31, 2012 11:52 AM

>>
http://codereview.appspot.com/6445056/diff/1/lily/lexer.ll#newcode390
>> lily/lexer.ll:390: <chords,notes,figures>{RESTNAME}/[-_] |
>> Why is this trailing context added?  I don't see
>> what this would match that wouldn't be matched
>> by the following line.
>
> Flex picks the longest matching pattern.  Apparently that includes
> trailing contexts.  Without this pattern, r-. does not trigger the
> {RESTNAME} rule but rather the {WORD}/[-_] rule coming later.  And
for
> the {WORD}/[-_] rule, the trailing context is needed to keep flex
from
> requiring backup states.

Thanks.  Understood.  Probably worth a comment in the
code as this is not immediately obvious.

Oops.  Forgot to include this in the latest iteration.  Will do, but
without triggering a separate test cycle.

http://codereview.appspot.com/6445056/

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to