Re: Plans to integrate a wisent grammar in php-mode
Steven Rémot <[email protected]> Sun, 12 Apr 2015 22:34:49 +0200
| Newsgroups | gmane.emacs.cedet |
|---|---|
| Message-ID | <CAJt2sO16RzUXA4LB+D0o596eoDJXFJpngk0fsnjbH9JcMyJYMA@mail.gmail.com> |
2015-04-12 3:26 GMT+02:00 Eric Ludlam <[email protected]>: > On 04/11/2015 09:44 AM, Steven Rémot wrote: > >> Hello, >> >> some people in the PHP-Emacs sphere are showing interest in having a >> proper support of PHP in Semantic. >> >> First of all, ejmr, the maintainer of php-mode, would like to integrate >> semantic support for PHP directly in php-mode [1]. He has been in touch >> with Andrea Turso, who started working on this in his personal >> configuration. >> >> As I am also working on improving Semantic support for PHP, Andrea >> contacted my so that we can join our forces on this project. >> >> Actually I like the plans of ejmr and Andrea. They would like to >> integrate in php-mode a really basic Semantic support for PHP, mainly >> for tagging purposes, and implement the more complex tasks (code >> analysis, type inference, refactoring, etc...) in external packages, >> using minor modes. This would allow people to have simple semantic >> support out of the box, and to easily get other features if needed. >> >> In term of planning, we already thought about short and long term goals : >> >> * In the short term, we would work in a code base outside of CEDET and >> php-mode. We would implement a new grammar as close as possible to >> the PHP specification [2], and free of any shift/reduce - >> reduce/reduce conflict. This grammar would parse the whole language, >> so that it can be used for tagging and code analysis. >> * In the long term, we would separate basic Semantic support for >> tagging and more complex support for code analysis in different >> grammars. The basic support could be integrated in php-mode, and the >> other ones would be in one / several minor modes. >> >> >> As there is already some code for PHP in the CEDET repository, and as >> the CEDET team have obviously more experience than Andrea and I in >> CEDET-related stuffs, we would like to know what you think about it. Do >> you think it is a good idea to implement Semantic support for PHP >> outside of CEDET repository, and to split it like that? And do you think >> it is technically feasible to do so? >> >> Regards, >> Steven Rémot >> >> [1] https://github.com/ejmr/php-mode/issues/235 >> [2] https://github.com/php/php-langspec/blob/master/spec/19-grammar.md >> > > Thanks for the details Steven, > > Supporting a grammar for a language outside of the CEDET repository is a > fine thing to do. Many grammars in CEDET today started outside of our > repository. If you would like to keep it separate, that is fine too. The > specifics around how the grammar compiles and executes has been stable for > quite some time and would work well for you. > > Your idea for adding support for complex tools as minor modes is the same > pattern CEDET uses, so that should be well supported. > > If you choose to start with the php support in the CEDET contrib > directory, you need to know that it was contributed by someone who didn't > want his name attached to it, and couldn't get papers assigned. If you have > a goal of being part of Emacs or one of the other repositories that need > assignments, you will need to start from scratch. :( > > Good Luck! > Eric > Thanks for the reply Eric, Actually I was much more concerned with the fact that there will be at least two grammars for the same language: a simple one and a more complete one. I was not sure this was the best solution as it could lead to a lot of copy-pasting from one to another. But as they have different goals I suppose this is OK. We don't have any copyright assignment constraint I think, but starting a new project is the occasion to write a brand new grammar, as close as possible to the official specification, so I suppose the code in CEDET contrib directory will only be used as a reference to know how to make things work. Thank you for your support! Steven Rémot ------------------------------------------------------------------------------ BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF _______________________________________________ Cedet-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cedet-devel