all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: Yuan Fu <casouri@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,  emacs-devel@gnu.org
Subject: Re: Some issues with the tree-sitter branch
Date: Mon, 17 Oct 2022 13:37:39 +0800	[thread overview]
Message-ID: <878rlfko2k.fsf@yahoo.com> (raw)
In-Reply-To: <6F240F48-E29C-4E75-B5D5-30C7CF7956C9@gmail.com> (Yuan Fu's message of "Sun, 16 Oct 2022 21:53:06 -0700")

Yuan Fu <casouri@gmail.com> writes:

> I think you meant the lack of a range check? Like mentioned here:
>
> +  /* FIXME: We should signal an error below if START_BYTE
> +     etc. overflow the 32-bit unsigned data type.  */
>
> I added buffer size check at parser creation time, and used casts to
> uint32_t liberally, assuming the values never overflows and, so we
> don’t need to handle the error at a million places. But I should have
> added checks in ts_after_chang and other places where buffer size
> could change. I’ll add checks in ts_after_change and other places, and
> if the argumetns overflows uint32, it will set a flag (say,
> buffer_too_large) in the parser object, and next time any lisp
> function tries to use that parser, an buffer-too-large error will be
> signaled. WDYT?

Isn't there a way to make tree-sitter parse buffers larger than
uint32_t?  AFAIK, our buffers can be EMACS_INT large (especially with
long log files), and tree-sitter should be fast enough to parse them
incrementally?



  reply	other threads:[~2022-10-17  5:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-16 13:32 Some issues with the tree-sitter branch Eli Zaretskii
2022-10-16 14:01 ` Eli Zaretskii
2022-10-16 15:10 ` Eli Zaretskii
2022-10-16 19:36   ` tree-sitter: Paths used for loading of language definitions Jostein Kjønigsen
2022-10-16 20:12     ` Daniel Martín
2022-10-17  4:27     ` Yuan Fu
2022-10-17  7:14       ` Jostein Kjønigsen
2022-10-17  7:29         ` Yuan Fu
2022-10-17  8:02         ` Eli Zaretskii
2022-10-17  9:02           ` Yuan Fu
2022-10-17  9:08             ` Eli Zaretskii
2022-10-17 11:56               ` Stephen Leake
2022-10-17 13:39                 ` Eli Zaretskii
2022-10-17 21:15               ` Yuan Fu
2022-10-17  4:53 ` Some issues with the tree-sitter branch Yuan Fu
2022-10-17  5:37   ` Po Lu [this message]
2022-10-17  5:48     ` Yuan Fu
2022-10-17  6:48   ` Eli Zaretskii
2022-10-17  9:12     ` Yuan Fu
2022-10-17 10:14       ` Eli Zaretskii
2022-10-18  0:15         ` Yuan Fu
2022-10-18  0:14   ` Yuan Fu
2022-10-18 16:11     ` Eli Zaretskii

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=878rlfko2k.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=casouri@gmail.com \
    --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.