[Geany-devel] Improving PHP parser

Can Koy cankoy at xxxxx
Sun Mar 7 19:48:39 UTC 2010


--- On Sun, 3/7/10, Enrico Tröger <enrico.troeger at uvena.de> wrote:

> From: Enrico Tröger <enrico.troeger at uvena.de>
> Subject: Re: [Geany-devel] Improving PHP parser
> To: geany-devel at uvena.de
> Date: Sunday, March 7, 2010, 3:54 PM
> On Fri, 5 Mar 2010 16:50:42 +0000,
> Nick wrote:
> 
> >On Thu, 4 Mar 2010 05:28:32 -0800 (PST)
> >Can Koy <cankoy at ymail.com>
> wrote:
> >
> >> Anybody working on improving PHP parser in tagmanager?
> >> If not, I intend to have a look at it this weekend. Primary
> >> objective is to add calltips. I could use some example code or any
> >> other pointer about regex callbacks in ctags (other than the sample
> >> in ctags).
> >
> >I haven't used callbacks but I suspect you will need to use a full
> >parser, i.e. like the #if 0 part. As I don't use PHP myself I can't
> >remember what issue there was with the parser, but I never liked the
> 
> IIRC the old, 'real' parser which is currently if 0'ed had problems
> with PHP5. Can, if you like to improve it, I guess tons of users would
> highly appreciated that as Harold already said.
> And I think it's worth reviving the if 0'ed code and make it work with
> PHP5 and then add the mentioned features. The regex code basically
> works but as you all know it has quite some serious limitations. PHP is
> just too complex to be parsed with a few line-based regular expressions.
> 

The default regex parser only creates names in a tag, but with callbacks this behaviour is extensible. I have no intention to revert to manual parsing.

--


      



More information about the Devel mailing list