Re: Extending PHP support - facing problems with expansion of list of aliases

David Engster <[email protected]> Mon, 04 Aug 2014 23:53:37 +0200
Newsgroups gmane.emacs.semantic
Message-ID <[email protected]>
Steven Rémot writes:
> I wanted to talk about it and propose it to be included in the main 
> cedet repository later, when I have some more features, but I'm a 
> beginner in grammar writing, and I have difficulties to correctly create 
> tags for the PHP "use" statement.

It's great that you're working on that, and it also shouldn't be a
problem to include your changes, but please be aware that the PHP
support cannot be moved from contrib into the main CEDET repository (and
to Emacs proper), because the original author chose to remain anonymous
and did not sign papers (as far as I know).

> However, you can also chain multiple renamings in a single use statement 
> like this :
>
> use A\B\C\Bar, \A\B\Foo;

[...]

I did not have time yet to look into this more deeply, but usually this
problem is not directly tackled in the grammar but later in the tag
expansion. In the C parser for instance, a declaration like

  int foo=5,bar,baz=2;

will first create one tag from the grammar, which gets expanded into
three separate tags in semantic-expand-c-tag. 

The function wisent-php-expand-tag already seems to do something like
this for variables as well, so maybe you can simply extend it for 'use'
statements?

HTH,
David

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk