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: Wed, 2 Jul 2003 11:34:08 +0200

At 10:46 +0200 2003/07/02, Hans-Bernhard Broeker 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.
>
>"Slow" meaning what?  What is the throughput of this, compared, to, say, a
>similar scanner with no nesting?  Or even a simple 'cat'?

I use the comments in a Prolog interpreter reworked to become a proof
verification system based on metamathematics. Then it turns out that it is
much faster to prove all theorems, invoking this reworked proof
verification Prolog machinery than to comment them out and work the
comments. :-)

>I trust it you've used up all wisdom offered by the -p flag before
>posting, right?

It says what I realized after I wrote the email here:

Flex Compiler
%option yylineno entails a performance penalty ONLY on rules that can match
newline characters

Can it be that %option yylineno causes such a severe performance loss?

  Hans Aberg






reply via email to

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