Re: Extending PHP support - facing problems with expansion of list of aliases
Steven Rémot <[email protected]> Wed, 6 Aug 2014 20:28:56 +0200
| Newsgroups | gmane.emacs.semantic |
|---|---|
| Message-ID | <CAJt2sO0JvfxEg+kf9Wg8PT8qa3xCu7f2iW6mbAx-HPn=7=wmXg@mail.gmail.com> |
David Engster writes: > 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). I am aware of that. I meant I hope my changes can be applied in the bzr repository later, even on contrib. It is still better than on an anonymous git repository. >> 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? > Thank you for the advice! I rewrote my rules to return a single alias tag merging all the others, and then I extended wisent-php-expand-tag to expand alias tags. It worked perfectly. I must clean my code because my implementation is a bit ugly for now but at least it works. Thank you again. ------------------------------------------------------------------------------ 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 _______________________________________________ cedet-semantic mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cedet-semantic