Hi list,

I have this CLM for BBEdit which is working fine so far, except, that the regexp for the functions slows BBEdit down too much. The language module is for the lingo language (Scripting language for Adobe Director) Function definitions start with the keyword "on" as the first word of a line.

So a function can look like:

on FunctionName parameter1, parameterN
  functionbody
end

(the "end" is not mandatory, a function ends with the next "on" starting a line)
It is very much like an applescript function definition.


Now my regexp looks like:

                <key>Function Pattern</key>
<string>(?&lt;=[\r|\n])on (?P&lt;function_name&gt;[!$%&amp;* +-./:&lt;=&gt;[EMAIL PROTECTED]).*?[\r|\n](?P&lt;function_body&gt;(? s:.*?))(?=([\r|\n]on\ )|([\r|\n]end[\r|\n])|\z)</string>

I seems way too complicated for such a simple task. I think the lookahead/behind assertions are the biggest problem. But I can't find any other working solution :-( Fact is, that it slows BBEdit down too much. Once I comment the line out, everything works fine (except for the function menu and the collapse triangles of course)

Is anyone with a good regexp knowledge reading this and willing to correct my regexp ?

TIA


Best regards
Alex da Franca

_______________
fischer | enterprises
www.fce.at




--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to