help-bison
[Top][All Lists]
Advanced

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

Re: Non-greedy wildcard possible? (Long)


From: Hans Aberg
Subject: Re: Non-greedy wildcard possible? (Long)
Date: Thu, 20 May 2004 20:48:09 +0200

At 14:49 +0200 2004/05/19, Frank Heckenbach wrote:
>Flex performance generally does not depend on the number or
>complexity of the patterns (since DFAs are executed in linear time,
>once constructed which happens when flex runs, not at program run
>time). Only certain problematic features (namely REJECT and
>variable-length trailing context) make matching more complex. The
>other "performance considerations", AFAICS, only add a constant
>overhead per token (such as scanning the buffer for newlines with
>`%option yylineno' in some circumstances).

Rules providing long token matches seems to choke the Flex scanner. Thus,
such rules short be broken up into ones that make shorter scanner matches.
For example comment scanning may be broken up in rules that macth one line
at a time.

  Hans Aberg






reply via email to

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