unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Developing a PHP package
@ 2021-09-04 16:37 Hugo Thunnissen
  2021-09-04 16:51 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Hugo Thunnissen @ 2021-09-04 16:37 UTC (permalink / raw)
  To: emacs-devel


Hello emacs developers,

I am working on a package to work with PHP code. It currently consists
of a (very tolerant) recursive descent parser and company-mode + eldoc
backends. The parser is written from scratch in emacs lisp and has no
outside dependencies. The company-mode and eldoc backends (partially)
lex the syntax tree produced by the parser to provide intelligent
completion for and information about the code someone is working on. It
is still a work in progress but It's starting to come along quite nicely
and I've been considering what to do with the work. Contributing it to
the emacs core would have my preference. Is there interest in having
such a package in the emacs core?

If so, I have several questions:

- How does the process of contributing a package to emacs usually go?

- I have read that there is work being done on incorporating lib
  tree-sitter in emacs, would tree-sitter make a package like mine
  obsolete?

- The parser is currently only used for completion, but could
  theoretically also be used (with some modifications) to do syntax
  highlighting and indentation, making for somewhat of an alternative to
  PHP-mode in the future.  Would there be interest in something like
  that?

- The package has a dependency on a bash script that uses some GNU
  coreutils (find, grep) and diff from GNU diffutils. The script is used
  to find files containing definitions of PHP classes and namespaces,
  but not for any of code parsing. What is the policy for emacs packages
  having dependencies on external programs like that?

- I am currently in the process of cleaning up the code and writing some
  documentation/tests. When I have made some progress on that, would it
  be OK for me to submit my code to this mailing list for
  feedback/reviews? That would be very helpful.

For those interested, I also made a reddit post with a small demo video,
which sprouted some conversation in its comment section:

https://www.reddit.com/r/emacs/comments/peezh4/teaser_a_php_parser_and_company_backend_in_emacs/

Thank you for taking the time to read this mail, and for future
discourse: I am new to mailing list etiquette, feel free to point out
when I am doing it wrong :)

- Hugo Thunnissen



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-09-05  9:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-04 16:37 Developing a PHP package Hugo Thunnissen
2021-09-04 16:51 ` Stefan Monnier
2021-09-04 18:44   ` Hugo Thunnissen
2021-09-04 19:46     ` Stefan Monnier
2021-09-05  7:40   ` Lars Ingebrigtsen
2021-09-05  8:44     ` Juri Linkov
2021-09-05  9:19     ` Eli Zaretskii
2021-09-04 17:21 ` Dmitry Gutov
2021-09-04 17:26 ` Eli Zaretskii
2021-09-04 18:52   ` Hugo Thunnissen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).