[Geany] Recognising PHP code (and perhaps others)

Frank Lanitz frank at xxxxx
Mon Dec 27 11:01:39 UTC 2010


On Mon, 20 Dec 2010 21:58:20 +1100
Lex Trotman <elextr at gmail.com> wrote:

> 2010/12/20 Krzysztof Żelechowski <giecrilj at stegny.2a.pl>:
> > Dnia poniedziałek, 20 grudnia 2010 o 07:58:44 Lex Trotman napisał(a):
> >> 2010/12/16 Krzysztof Żelechowski <giecrilj at stegny.2a.pl>:
> >> > Dnia wtorek, 14 grudnia 2010 o 13:39:46 Lex Trotman napisał(a):
> >> >> On 14 December 2010 22:03, Etienne MELEARD <etienne.meleard at cru.fr> wrote:
> >> >> > Yeah, declarations can be like this to describe optionnal arguments and
> >> >> > their default values :
> >> >> >
> >> >> >    function foo($arg1, $arg2 = array('random', 'stuff'), $arg3 = 'bar') {
> >> >> >        // ...
> >> >> >    }
> >> >> >
> >> >> > Hope im clear enough ...
> >> >>
> >> >> Thanks, clearly nested brackets and multiline declarations are beyond
> >> >> the regex system.  It needs someone with C and PHP capability to
> >> >> create a proper parser similar to the one used for C.
> >> >>
> >> >
> >> > Rather, to use the PHP tokeniser -- requires PHP itself.
> >>
> >> Unfortunately the tagmanager (the software used by Geany is frm
> >> another project) doesn't allow for any sort of "plugin" parsing other
> >> than the regexes so using the PHP tokeniser could be quite complex.
> >
> > Assuming that Geany can use a "proper parser" for PHP, which means executable code rather then regex-based, you can make the parser delegate the hard work to the tokeniser provided by PHP.  Problem solved?
> 
> Ok, patches welcome

Yepp, as always ;) 

Cheers, 
Frank 

-- 
Frank Lanitz <frank at frank.uvena.de>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20101227/a016a7c1/attachment.pgp>


More information about the Users mailing list