Re: [code] [scintillua] Docs and lexer number

From: Mitchell <>
Date: Fri, 23 Mar 2012 09:33:20 -0400 (EDT)


On Fri, 23 Mar 2012, Nils Nordman wrote:

> On Fri, Mar 23, 2012 at 1:55 PM, Mitchell <> wrote:
>> I think *external* lexers are assigned their own id based on
>> SCLEX_AUTOMATIC, so you would be correct, but the instance you mention is
>> when LexLPeg.cxx is being compiled as an *internal* lexer, so it needs a
>> non-automatic id. I picked one that would be okay as long as Scintilla is
>> not being compiled with 999 different lexers.
> Well specifying AUTOMATIC doesn't seem like it shouldn't cause any ill
> effects (and works with the id generation), but it was more of a
> curiosity. It's unlikely you would link two different lexers that both
> uses 999 for lexer number and not retrieve them by name after all.

True, but the Scintilla documentation for SCI_*LEXER() states:

   You cannot use the SCLEX_AUTOMATIC value; this identifies additional
   external lexers that Scintilla assigns unused lexer numbers to.

So it seems the recommendation for internal lexers is to use values below
SCLEX_AUTOMATIC, even if they are conventionally referred to by name
instead of ID.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Fri 23 Mar 2012 - 09:33:20 EDT

This archive was generated by hypermail 2.2.0 : Sat 24 Mar 2012 - 06:44:02 EDT