From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter api Date: Mon, 20 Sep 2021 09:48:27 -0700 Message-ID: <1AEED8A5-BF5E-45E5-AE22-9B405A710F9B@gmail.com> References: <83r1f7hydn.fsf@gnu.org> <83r1dselyo.fsf@gnu.org> <6A4CE984-6ACE-4E66-8EF2-F3D351C02248@gmail.com> <83r1dscpt2.fsf@gnu.org> <83o88wcof9.fsf@gnu.org> <83lf3zdh4z.fsf@gnu.org> <8965C4A0-79D3-4D77-A6BA-D07A6C93F7FE@gmail.com> <83ilz3cs4k.fsf@gnu.org> <04D19C1A-CD64-4156-B932-1C9FEEE4EC7B@gmail.com> <83zgsebc0r.fsf@gnu.org> <1F752923-F357-4A18-B6E2-0120F1B9BD37@gmail.com> <83fsu5bzem.fsf@gnu.org> <83zgsdad5j.fsf@gnu.org> <83sfy391ni.fsf@gnu.org> <03386E3C-A975-4ECD-BF89-6AC62F751725@gmail.com> <83ilyz8xdl.fsf@gnu.org> <86czp6ukpj.fsf@stephe-leake.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14412"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?B?VHXhuqVuLUFuaCBOZ3V54buFbg==?= , Theodor Thornhill , =?utf-8?Q?Cl=C3=A9ment_Pit-Claudel?= , emacs-devel@gnu.org, Stefan Monnier , Eli Zaretskii To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 20 18:51:11 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mSMVY-0003Xf-S2 for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Sep 2021 18:51:08 +0200 Original-Received: from localhost ([::1]:53944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSMVX-0007PR-1I for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Sep 2021 12:51:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSMT4-0004cG-Cu for emacs-devel@gnu.org; Mon, 20 Sep 2021 12:48:35 -0400 Original-Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]:38860) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mSMT0-0007Ll-Ai; Mon, 20 Sep 2021 12:48:33 -0400 Original-Received: by mail-qt1-x82f.google.com with SMTP id d8so3839134qtd.5; Mon, 20 Sep 2021 09:48:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=xyBfGfNyNI6mJqmBz690qIhrehFZgkzhL9wc9LQBsnQ=; b=U4+HS2e9UmFAmCIWZMdP3LGgJJKGYg4M8AUpPfJswy7wHURigXQGyBhrP7mH9q1i04 w8iTEYkpfxIoetpMt3zPDJrFsRi3UrofmPW0DAAkzr0ldUTMfwDkUsoaqhffk+IYkwgQ nbwRxgehhLNU+RtLo4B0/Y6J1Dpxjuzzf8kuZ9sJwrLcExDw4l5+jWAci9JLRWpgrEq+ /E1N/kiSF5xFrnQbDQ4M6mU/aKR6pNtcAD5CpPnUy3+Ls3u+4MU6zIO63KssygoJ6E8H lYEgp++o9AYnNcsGTJ4gMt+nbUFzofE88w4HOa6HrJlOtZg6KAZsFG7bnhEmmpmxaxxL Fxnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=xyBfGfNyNI6mJqmBz690qIhrehFZgkzhL9wc9LQBsnQ=; b=xQhYZelQ+3lcxf8T28H6wfo3ib5hjM75PLwWBHyLL5SoCVDbttE4f0+8gu+A2yLWOe Kojz32AZRxXu9pvO9q3zN0QnlB1MOBNjvkWbZpkspsv9Y9Y7erv9JZ3V8qCzZFSUX1W9 Yl9mky5bj8c0XuwH4sS9LdberxDu+nU+B5f17DMYgjFADgwenG7fDtUS7qkG+JLUwZ8m CSni1KRRGjrs3FCZ3L62nP5+ny8zQghXVEgLXNec9UzNnSRBCAnHNtXBjBb91NnEKayH unYokS2AVKIKLqEEZ3WjiR1gDAw5U61PKWKpcjP/L7ppBA8hxYTdHDHPHuYgwFHSPeJh hu3Q== X-Gm-Message-State: AOAM531zXymJuAu+RzWQMzWUlu0/gzjI7jSM+3ynC+ciLgWnOADenwk5 yTF2/WFKCM5rsDNW8Q29WrI= X-Google-Smtp-Source: ABdhPJxaK2nP0lXGjym41PFuBm5rdFaLka5BehDQ9x19rFc/j1zJldJKrtThlKGAq/AZ0pWwJY8DXQ== X-Received: by 2002:ac8:1e93:: with SMTP id c19mr23997237qtm.55.1632156509114; Mon, 20 Sep 2021 09:48:29 -0700 (PDT) Original-Received: from smtpclient.apple ([2600:1700:2ec7:8c9f:753b:ac0f:fda7:2b6b]) by smtp.gmail.com with ESMTPSA id q9sm5689310qkj.39.2021.09.20.09.48.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Sep 2021 09:48:28 -0700 (PDT) In-Reply-To: <86czp6ukpj.fsf@stephe-leake.org> X-Mailer: Apple Mail (2.3654.120.0.1.13) Received-SPF: pass client-ip=2607:f8b0:4864:20::82f; envelope-from=casouri@gmail.com; helo=mail-qt1-x82f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:275152 Archived-At: A minor question, is there a better CS term for =E2=80=9Cpunctuation = marks=E2=80=9D? Names like @code{root}, @code{expression}, @code{number}, @code{operator} are nodes' @dfn{type}. However, not all nodes in a syntax tree have a type. Nodes that don't are @dfn{anonymous nodes}, and nodes with a type are @dfn{named nodes}. Anonymous nodes usually represent punctuation marks (FIXME: better word than ``puncturation marks''?) like quote @samp{"} and bracket @samp{[}, or tokens that have a fixed representation, such as keywords like @code{return}. Yuan=