help-flex
[Top][All Lists]
Advanced

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

Re: Look ahead question (trailing context)


From: Henrik Sorensen
Subject: Re: Look ahead question (trailing context)
Date: Thu, 1 Apr 2004 22:37:14 +0200
User-agent: KMail/1.5.1

On Wednesday 31 March 2004 20:58, Hans Aberg wrote:
> At 16:12 +0100 2004/03/31, Henrik Sorensen wrote:
> >So if both the previously matched token and the token following
> >the matched ')'  is known, it can be determined whether a matched keyword
> >token, is really a variable name or a keyword.
> This is very difficult to do in Flex, especially if the stuff within (...)
> can be an expression. In principle, you can make a lookahead for the
> matching ")", resolve it at the next token, and then put the stuff back in
> the line. But that would require some work.
> This has been put up as a suggestion, but Flex can't do that for now.

Could it be done by implementing a special trailing context operator say '§' 

R(§)S: would match R( only if followed by )S,where the parenthesis must match.

The stuff matched by § are only checked for pairs of '(' ')'

>   Hans Aberg
Henrik




reply via email to

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