Re: [code] lexer for indentation driven blocks

From: Mitchell <>
Date: Mon, 22 Feb 2016 20:52:05 -0500 (EST)

Hi Carl,

On Mon, 22 Feb 2016, Carl Sturtivant wrote:

> On 2/22/2016 8:15 AM, Mitchell wrote:
>> I'm having trouble visualizing this. Could you provide an example? By
>> the way, the markdown lexer is not a _LEXBYLINE lexer and can match
>> leading indentation for embedded HTML. That may be worth looking into.
> head
> title Code filter example
> :css
> .keyword { color: #0000ff;
> font-weight: bold; }
> body

Thanks for the examples. It looks like you'll need a start rule that
matches some level of beginning whitespace and stores lexer state (that
probably includes the level of indentation at a minimum), and an end rule
that checks for the desired level of indentation before matching. This is
just an idea though, I'm not positive it will work in practice.

Do you think it would be worth it to add a lexer field like `_LEX_ALL`
that simply passes the entire buffer's contents to be lexed? At least
you'll never have to keep persistant track of state (but you'll be limited
to a small-ish buffer size before you'll see lag, depending on the speed
of your machine).


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Mon 22 Feb 2016 - 20:52:05 EST

This archive was generated by hypermail 2.2.0 : Tue 23 Feb 2016 - 06:50:43 EST