Hi guys<br><br>I see your point - in the meantime I'm coding this way:<br><br>function abc($parm, // )<br>                  $p2,<br>                  $p3) {<br>  ...<br>}<br><br>This solves my immediate problem (having function names appear in the Symbols list).<br>
<br>Cheers<br>mc<br><br><br><div class="gmail_quote">On 14 December 2010 22:39, Lex Trotman <span dir="ltr"><<a href="mailto:elextr@gmail.com">elextr@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">On 14 December 2010 22:03, Etienne MELEARD <<a href="mailto:etienne.meleard@cru.fr">etienne.meleard@cru.fr</a>> wrote:<br>
> Le 14/12/2010 11:58, Lex Trotman a écrit :<br>
>><br>
>> On 14 December 2010 21:38, Murray Collingwood<br>
>> <<a href="mailto:murray@focus-computing.com.au">murray@focus-computing.com.au</a>>  wrote:<br>
>><br>
>>><br>
>>> Hi Lex<br>
>>><br>
>>> Thanks for your response.<br>
>>><br>
>>> One simple solution would be to drop the trailing bracket from the regex.<br>
>>> Do you think this would be an acceptable change?<br>
>>><br>
>><br>
>> Unfortunately then the parser would not be able to identify the<br>
>> argument list for one line declarations (notice that the  \\(.*\\) is<br>
>> in () as a capture group) and that would mean no arglist, or worse an<br>
>> incorrect arglist, for those declarations that work right at the<br>
>> moment.<br>
>><br>
>> Maybe the regex could be changed to \\([^)]\\)? making the ) optional<br>
>> and if its not there counting all the rest of the line as the<br>
>> arguments.  Its not pretty, but at least the function should be<br>
>> recognised.<br>
>><br>
>> Anyone else's thoughts?<br>
>><br>
>> Cheers<br>
>> Lex<br>
>><br>
>> PS I don't know much PHP, but I should note that if a ) can occur<br>
>> anywhere in the declaration then no regex is correct.<br>
>><br>
><br>
> Yeah, declarations can be like this to describe optionnal arguments and<br>
> their default values :<br>
><br>
>    function foo($arg1, $arg2 = array('random', 'stuff'), $arg3 = 'bar') {<br>
>        // ...<br>
>    }<br>
><br>
> Hope im clear enough ...<br>
<br>
</div></div>Thanks, clearly nested brackets and multiline declarations are beyond<br>
the regex system.  It needs someone with C and PHP capability to<br>
create a proper parser similar to the one used for C.<br>
<br>
Cheers<br>
<font color="#888888">Lex<br>
</font><div><div></div><div class="h5"><br>
>><br>
>><br>
>>><br>
>>> Cheers<br>
>>> Murray<br>
>>><br>
>>><br>
>>> On 14 December 2010 18:34, Lex Trotman<<a href="mailto:elextr@gmail.com">elextr@gmail.com</a>>  wrote:<br>
>>><br>
>>>><br>
>>>> On 14 December 2010 18:23, Murray Collingwood<br>
>>>> <<a href="mailto:murray@focus-computing.com.au">murray@focus-computing.com.au</a>>  wrote:<br>
>>>><br>
>>>>><br>
>>>>> Hello (first time on this list)<br>
>>>>><br>
>>>>> Just a question, maybe something I can hack, maybe something somebody<br>
>>>>> else<br>
>>>>> needs to hack?<br>
>>>>><br>
>>>>> I have php code that looks like this:<br>
>>>>><br>
>>>>>      function puctstatus($puctid) {<br>
>>>>>         ...<br>
>>>>>      }<br>
>>>>><br>
>>>>> The 'Symbols' list in the sidebar then lists for me the function name<br>
>>>>> and<br>
>>>>> all is good.<br>
>>>>><br>
>>>>> However if my code is like this:<br>
>>>>><br>
>>>>>       function puctstatus($puctid,<br>
>>>>>                                   $category,<br>
>>>>>                                   $flags) {<br>
>>>>>          .....<br>
>>>>>       }<br>
>>>>><br>
>>>>> Then the function is not recognised and does not appear in the symbols<br>
>>>>> list.<br>
>>>>><br>
>>>>> Is there a file somewhere full of regex type codes that I can edit to<br>
>>>>> modify<br>
>>>>> this or is it all hardcoded in a program somewhere?<br>
>>>>><br>
>>>><br>
>>>> Yes there is a regex, but its hard coded.<br>
>>>><br>
>>>> This is it, where ALPHA and ALNUM are the ranges you would expect<br>
>>>><br>
>>>> "^[ \t]*[(public|protected|private|static|final)[ \t]*]*[<br>
>>>> \t]*function[ \t]+&?[ \t]*([" ALPHA "_][" ALNUM<br>
>>>> "_]*)[[:space:]]*(\\(.*\\))"<br>
>>>><br>
>>>> I'd guess the problem is that \\(.*\\) matches anything in () after<br>
>>>> the function name but the regex code only matches against a line at a<br>
>>>> time and has no way of continuing the match beyond a line.<br>
>>>><br>
>>>> The only way to go beyond a line seems to be to use a character by<br>
>>>> character hardcoded parser such as C uses.<br>
>>>><br>
>>>> In tagmanager/php.c there is a bunch of code that looks like someone<br>
>>>> started to do it, status unknown.<br>
>>>><br>
>>>> Cheers<br>
>>>> Lex<br>
>>>><br>
>>>><br>
>>>>><br>
>>>>> Cheers<br>
>>>>> mc<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> --<br>
>>>>> Murray Collingwood<br>
>>>>> Focus Computing<br>
>>>>> p +61 415 24 26 24<br>
>>>>> <a href="http://www.focus-computing.com.au" target="_blank">http://www.focus-computing.com.au</a><br>
>>>>><br>
>>>>> _______________________________________________<br>
>>>>> Geany mailing list<br>
>>>>> <a href="mailto:Geany@uvena.de">Geany@uvena.de</a><br>
>>>>> <a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany</a><br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>><br>
>>>> _______________________________________________<br>
>>>> Geany mailing list<br>
>>>> <a href="mailto:Geany@uvena.de">Geany@uvena.de</a><br>
>>>> <a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany</a><br>
>>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Murray Collingwood<br>
>>> Focus Computing<br>
>>> p +61 415 24 26 24<br>
>>> <a href="http://www.focus-computing.com.au" target="_blank">http://www.focus-computing.com.au</a><br>
>>><br>
>>> _______________________________________________<br>
>>> Geany mailing list<br>
>>> <a href="mailto:Geany@uvena.de">Geany@uvena.de</a><br>
>>> <a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany</a><br>
>>><br>
>>><br>
>>><br>
>><br>
>> _______________________________________________<br>
>> Geany mailing list<br>
>> <a href="mailto:Geany@uvena.de">Geany@uvena.de</a><br>
>> <a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany</a><br>
>><br>
>><br>
><br>
> _______________________________________________<br>
> Geany mailing list<br>
> <a href="mailto:Geany@uvena.de">Geany@uvena.de</a><br>
> <a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany</a><br>
><br>
_______________________________________________<br>
Geany mailing list<br>
<a href="mailto:Geany@uvena.de">Geany@uvena.de</a><br>
<a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Murray Collingwood<br>Focus Computing<br>p +61 415 24 26 24<br><a href="http://www.focus-computing.com.au">http://www.focus-computing.com.au</a><br>