help-flex
[Top][All Lists]
Advanced

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

Re: Nested comments


From: Hans Aberg
Subject: Re: Nested comments
Date: Tue, 8 Jul 2003 01:29:44 +0200

At 13:10 -0400 2003/07/07, address@hidden wrote:
>> It looks as
>>though the lexer will choke on rule matches beyond a
>certain length.
>
>If you mean due to a buffer overrun, that's really
>important and we need to track it down.
>If you mean due to backtracking, then we can't help you
>there!

There was no backtracking that I know of.

When running my input sample, 16kB or about 600 lines of nested comments
with some fairly long matching snippets, it took on my (very slow) computer
about ten seconds. With Akim's code it was a fraction of a second. The only
difference seems to be that he broke up rules so that they do not match
over newlines plus treating newlines by a separate rule \n+. In both cases
the line counting time was insignificant (removing it altogether did not
make any significant difference). So it seems that something should be
tracked down here, just to see what the problems is. And it seems to have
to do with rule length matches.

Also, I use an old Flex version, 2.5.23.

  Hans Aberg






reply via email to

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