[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5 Grammar update
- From: Jamie Webb <j@...>
- Date: Fri, 29 Jul 2005 13:43:39 +0100
On Fri, Jul 29, 2005 at 01:15:58PM +0200, Klaas-Jan Stol wrote:
> It makes things a bit more complicated I think. Still doable, but as (^n
> )^n is not a regular language (according to automata ~ and language
> theory) so, the lexer cannot check on number of '(' == number of ')' ),
> this cannot be done by the lexer alone. The parser has to keep track of
> that.
Some regex implementations are adequate though, e.g. I believe the following
PCRE works:
\[(=*)\[.*?\]\1\]
I don't know how Scintilla does things, but there may be a way...
involving the parser sounds horrible.
-- Jamie Webb