Re: [code] Quick LPEG question...

From: Mitchell <m.att.foicica.com>
Date: Mon, 20 Mar 2017 21:44:22 -0400 (EDT)

Hi Pedro,

On Mon, 20 Mar 2017, Pedro Andres Aranda Gutierrez wrote:

> Hi,
>
> I'm working on a lexer for YANG files, which basically follow a simple
> grammar:
>
> simple := keyword identifier value ';'
>
> complex := keyword identifier '{' (complex|simple)+ '}'
>
> With a couple of rules on how identifiers and values are.
>
> The rest would be errors...
> Is this possible with LPeg in Textadept?

Yes, this is certainly possible, but you may run into trouble if those
constructs span multiple lines. (For performance reasons, as you type
Textadept will start lexing at the start of the current line.)

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Mon 20 Mar 2017 - 21:44:22 EDT

This archive was generated by hypermail 2.2.0 : Tue 21 Mar 2017 - 06:53:02 EDT