[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Nested comments
From: |
Hans Aberg |
Subject: |
RE: Nested comments |
Date: |
Thu, 3 Jul 2003 13:27:55 +0200 |
At 06:19 +0100 2003/07/03, Mark Weaver wrote:
>> I implemented nested [* ... *] comments by the code below, but it
>> turns out
>> to be slow with many nestings, and I do not know why. Is there a way to
>> make it faster?
>
>I've found switching to a hand-coded loop using input() to be the fastest
>way of skipping large portions of the input. Presumably this works because
>it avoids the overhead of maintaining yytext.
This looks like an interesting suggestion.
But by the example posted by Akim, it looks as matching suitably large
sized tokens makes the trick.
One can think of a feature where Flex rules that do not need to keep track
of yytext are marked down. It would avoid that overhead.
Hans Aberg