cjohansson / emacs-phps-mode

Emacs major mode for PHP with code intelligence
GNU General Public License v3.0
35 stars 2 forks source link

Add the parser to CEDET #36

Closed Sasanidas closed 2 years ago

Sasanidas commented 3 years ago

It is possible to add the semantic part to the code CEDET Emacs package?

Thanks for this package!

cjohansson commented 3 years ago

Maybe in the future, I am working on adding a Canonical LR Parser now, it should be pretty easy to convert it into LALR and integrate into CEDET. My biggest concern is that Semantic by default seems pretty slow and I want parsing to be done asynchronously and only when needed.. I will try and evaluate it, maybe as a separate branch

Sasanidas commented 3 years ago

Maybe in the future, I am working on adding a Canonical LR Parser now, it should be pretty easy to convert it into LALR and integrate into CEDET. My biggest concern is that Semantic by default seems pretty slow and I want parsing to be done asynchronously and only when needed.. I will try and evaluate it, maybe as a separate branch

I'm planning into changing some of the CEDET core features, I also think that it needs a better parsing strategy (in idle is not ideal), so asynchronous is the right way in my opinion, maybe using emacs-async. What are some features that you would like to see in CEDET? or maybe improvements.

Thanks for your response. Regards

cjohansson commented 3 years ago

Ah I see, I would like to help out, the potential of CEDET is great. These are my biggest concerns right now:

Sasanidas commented 3 years ago

Wisent LALR Grammar seems to lack support for e-productions in grammar, is this true?

I'm not so sure about this, I will investigate if it is the case.

The parsing is done when idle and on file-load and is freezing the editor Parsing seems to be done more than neccesary, like the lex analyzer is triggered on regions already parsed and unchanged. Better incremental parsing only on regions on and after a change Asynchronous parsing via (make-thread) or optionally via async.el

Yes, the parser need a big revision, both in terms of performance/code as well as parsing techniques, some of the ideas discuss with the main creator or CEDET was the idea of been able to communicate with external parsers for some languages, so there is not necessary to maintain a parser for 15+ languages.

I also think that asynchronous parsing is a must, people usually complains about this, mostly with the comparison with LSP.

Syntax coloring of buffer based on lex-analyzer tokens as a default

This will be awesome to implement, syntax colouring in phps-mode works great and extend this capability to other languages really can help to get more semantic usage.

There is also other ideas in the table, not directly related to semantic but more with the CEDET package as a whole, I'm thinking of creating a mailing list (maybe talk with the emacs-devel team) for better communication.

I'm also "restoring" the webpage of CEDET, so the information of it reflect the real status of the project (been that you are a web developer, ideas are more than welcome), mostly because I think the major problem is that people doesn't even know that the project even exist to begin with.

Regards

cjohansson commented 2 years ago

I'm closing this since it's not an issue, contact me if you want to include phps-mode in CEDET