all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hugo Thunnissen <devel@hugot.nl>
To: emacs-devel@gnu.org
Subject: Developing a PHP package
Date: Sat, 04 Sep 2021 16:37:22 +0000	[thread overview]
Message-ID: <87pmto47r1.fsf@hugot.nl> (raw)


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



             reply	other threads:[~2021-09-04 16:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-04 16:37 Hugo Thunnissen [this message]
2021-09-04 16:51 ` Developing a PHP package 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pmto47r1.fsf@hugot.nl \
    --to=devel@hugot.nl \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.