<[email protected]> 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.

Trevor
_______________________________________________
lilypond-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to