From: Christian Johansson <christian@cvj.se>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: New package emacs-parser-generator
Date: Sun, 28 Nov 2021 08:22:48 +0100 [thread overview]
Message-ID: <BB24B3F3-C0A3-4669-8A4F-68FD56A0EFD3@cvj.se> (raw)
In-Reply-To: <83mtloyd9e.fsf@gnu.org>
Hi,
I believe tree-sitter is not suitable for proper parsing (it does not support LR(1) for example)
It is good for fast syntax coloring with approximate / good enough parsing
Regards
Christian
> 28 nov. 2021 kl. 08:02 skrev Eli Zaretskii <eliz@gnu.org>:
>
>
>>
>> Date: Sat, 27 Nov 2021 22:40:45 +0100
>> From: Christian Johansson <christian@cvj.se>
>>
>> I have started on a parser generator library for Emacs that currently
>> can generate canonical LR(k) parsers as stand-alone elisp files. I'm
>> using it for the automatically generated PHP 8.0 parser in phps-mode. A
>> difference between my library and the built-in Wisent parser generator
>> is that it can handle e-identifiers (like %empty), context sensitive
>> precedence (like %prec) and global precedence rules (not sure if Wisent
>> does support that)
>>
>> In the future I have planned on implementing more parsing algorithms in
>> this library like LL(k) and LALR(k)
>
> Thanks. I believe the plan is to use Tree-sitter for the jobs for
> which a parser is needed. But we also want to have an API that could
> accommodate other parsers into the same framework. So I think it
> would be good if you cooperate with Yuan Fu <casouri@gmail.com>, who
> is working on Tree-sitter integration, so that the API for using a
> parser could be a common one.
next prev parent reply other threads:[~2021-11-28 7:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-27 21:40 New package emacs-parser-generator Christian Johansson
2021-11-28 7:01 ` Eli Zaretskii
2021-11-28 7:22 ` Christian Johansson [this message]
2021-11-28 13:24 ` Stefan Monnier
2021-11-28 13:45 ` Christian Johansson
2021-11-28 23:46 ` Daniel Martín
2021-11-29 12:30 ` Eli Zaretskii
2021-11-29 13:09 ` Christian Johansson
2021-11-29 19:22 ` Yuan Fu
2021-12-01 7:52 ` Christian Johansson
2021-12-01 8:39 ` Yuan Fu
2021-12-01 8:51 ` Christian Johansson
2021-12-01 13:45 ` Stefan Monnier
2021-12-01 14:10 ` Christian Johansson
2021-12-01 19:25 ` Yuan Fu
2021-12-01 19:44 ` Christian Johansson
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=BB24B3F3-C0A3-4669-8A4F-68FD56A0EFD3@cvj.se \
--to=christian@cvj.se \
--cc=eliz@gnu.org \
--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.