From: Tom Gillespie <tgbugs@gmail.com>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: Dominik Schrempf <dominik.schrempf@gmail.com>,
Emacs Org Mode Mailing List <emacs-orgmode@gnu.org>
Subject: Re: Org lint and named source blocks
Date: Mon, 4 Oct 2021 01:02:04 -0700 [thread overview]
Message-ID: <CA+G3_PNJCMHxdiDOXtAg=ndRj-stZPhED=aRxcKMV=6ebfAQnQ@mail.gmail.com> (raw)
In-Reply-To: <87a6jpcnwe.fsf@localhost>
> By the way, wouldn't it be better to use tree-sitter rather than
> something else for the format grammar?
Not really since we are going to need more than one implementation
using a parser generator to avoid baking implementation specific
details into the spec by accident. This is true for more than just
the grammar as well. The complexity of tokenization, parsing,
expanding, etc, for Org means that we are going to need multiple
implementations to nail the behavior for any formal spec.
That said, we definitely want a TS implementation at some point.
See https://github.com/tgbugs/laundry/issues/1 for a recent
discussion about ways forward.
The implementation I'm working on should translate to TS without
too much work since both brag and tree sitter describe LR variants.
There may be some subtle differences, but nothing fundamental.
The issue for me is that I don't have the bandwidth to get started
with a full tree sitter implementation, especially because it is going
to need a custom scanner, and because you're effectively on your
own when it comes to reconstructing the output of the AST into the
actual internal representation of an Org file. I also have no idea how
to deal with nested parsers in tree sitter. I have some ideas about
how it might be done, but nothing concrete (see the linked issue
for more on that).
Best,
Tom
next prev parent reply other threads:[~2021-10-04 8:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-21 7:39 Org lint and named source blocks Dominik Schrempf
2021-09-21 13:18 ` Ihor Radchenko
2021-09-21 20:32 ` Tom Gillespie
2021-10-04 6:19 ` Ihor Radchenko
2021-10-04 8:02 ` Tom Gillespie [this message]
2021-10-04 8:21 ` Timothy
2021-10-04 9:14 ` Tom Gillespie
2021-10-04 6:16 ` Ihor Radchenko
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+G3_PNJCMHxdiDOXtAg=ndRj-stZPhED=aRxcKMV=6ebfAQnQ@mail.gmail.com' \
--to=tgbugs@gmail.com \
--cc=dominik.schrempf@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=yantar92@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.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).