help-flex
[Top][All Lists]
Advanced

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

Re: Nested comments


From: john43
Subject: Re: Nested comments
Date: Mon, 7 Jul 2003 12:16:36 -0400

>>
>><comment>{
>>    ([^\*\[]|"["[^*]|"*"[^\]])+   { }
>>    "["|"*"  { }
>>    "[*"  ++comment_level;
>>    "*]"  {
>>        --comment_level;
>>        if (comment_level == 0) {
>>            BEGIN(INITIAL);
>>        }
>>      }
>>    <<EOF>> { ... }
>>}
>
>Actually, your suggestion takes 22% longer time... :
-)

That's odd. I benchmarked my code against yours before 
posting and saw consistent decrease in running time, by 
approximately 12%. Must be the input or the compiler 
variation.






reply via email to

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