lilypond-devel
[Top][All Lists]
Advanced

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

Re: Unify the lexer's idea of words and commands across all modes. (issu


From: dak
Subject: Re: Unify the lexer's idea of words and commands across all modes. (issue 6445056)
Date: Thu, 02 Aug 2012 10:36:25 +0000

On 2012/07/31 16:56:51, t.daniels_treda.co.uk wrote:
<mailto:address@hidden> 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/



reply via email to

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