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: MPS: treesit Date: Tue, 25 Jun 2024 21:35:11 -0700 Message-ID: References: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) 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="19257"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs Devel , Eli Zaretskii , Helmut Eller To: =?utf-8?Q?Gerd_M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jun 26 06:36:19 2024 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 1sMKOJ-0004xB-M7 for ged-emacs-devel@m.gmane-mx.org; Wed, 26 Jun 2024 06:36:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMKNU-0001dY-0z; Wed, 26 Jun 2024 00:35:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sMKNT-0001co-6k for emacs-devel@gnu.org; Wed, 26 Jun 2024 00:35:27 -0400 Original-Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMKNR-0004am-I5; Wed, 26 Jun 2024 00:35:26 -0400 Original-Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1f70c457823so44020325ad.3; Tue, 25 Jun 2024 21:35:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719376524; x=1719981324; darn=gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Bqg7e36sGqW2hvX5Rqxj2baIsfuTMQY+0yMfG4gL9/M=; b=gQ8x3yZmLYBd8b8P0MC+WTGDZ1Rtc10t3caF5CGGPlJHgq2CcXpwACqASSdVNTurAP zED8+5Y26ZH5r5LT7WdEr7rrJZ7mqXPeqkPn5YiFpzpzMR3rPUTPipJNEnpYbJxSX8Xt +kV9fZkU3QeHBnzyk5Wui68WGdogck5evQNlWaqWPvOiuH6J3xWaFLeBioAf2lmieVly 4BWQy9kDn/AYdsFXr9XB3SA+bTN67WFohaHMaUyhFXJgfAwYNIky5LkxRsb8zMCQuAw/ wXbDU1NLKT2EnksvbzLbK8orgxAGK+YFn6Nrbn3ngW/r9MINMvJd2JaYifIjiUyLwlgD 9Ypg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719376524; x=1719981324; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Bqg7e36sGqW2hvX5Rqxj2baIsfuTMQY+0yMfG4gL9/M=; b=jbG0VVZFYYxhlCY1RVDUUt4MGUe/m8fTLyV98q1OiBj+pRYsMe+HxhhXiRKKeI8g4v LxT6OVDUQ+a9m2bXHdf5igsV4jUyRqy/BhIdr+fRJskS5ISJ2BYjMseEuOYhl66CF29L 7VHCZ7PudPfo+tTn8oTUxz0U58ni71IqJ/wvU/BugngGsSQaZ9iblck3OsfFvCAfrtcz VkrHAdOkb74gyJmveIfkShlq01028fHHd8atEc4eVMDr50iWFcsDlULIsd1vCHrKC1MS QMABpahO8wVzRI267TI0VZQ7tJ0itBDWgADHRHdRkDdcyQj2TsT/QWfKhJXWJappw0nf q5dg== X-Forwarded-Encrypted: i=1; AJvYcCUxwIga9n/ZfZLrey0Ajwvy2ww+g/zNA+JkH3n1Y80ShRl6XOP5tnd0g+pLA6Y/a0xWIvZloB9A7TV3WVI= X-Gm-Message-State: AOJu0YwhlJkXZEJt60LmXoDO6I5IIvdKGEyKMhUrPkzYdYfweg/+DTnh i12QV8sgxrzqDDMAcgsO9meSY9zI5ct0TPHKhHjJpf+UDCw8bTiVFo4HDQ== X-Google-Smtp-Source: AGHT+IG0DwJB1WgpzmZ6l48J9PNRXH2dI1iufwjPX1vMBRugm4VfcVUWF6rGHlQLokU04CZLGoaG+w== X-Received: by 2002:a17:902:d34d:b0:1f9:c701:1cbe with SMTP id d9443c01a7336-1fa23f1f319mr94342585ad.57.1719376523633; Tue, 25 Jun 2024 21:35:23 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:3c6b:9027:64f0:9805]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9eb3d5e63sm89343025ad.187.2024.06.25.21.35.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jun 2024 21:35:23 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3774.600.62) Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=casouri@gmail.com; helo=mail-pl1-x634.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.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320650 Archived-At: > On Jun 25, 2024, at 12:44=E2=80=AFAM, Gerd M=C3=B6llmann = wrote: >=20 > Gerd M=C3=B6llmann writes: >=20 >> Can somone help and explain how this works in treesit.c? Where is the >> Lisp_TS_Parser stored and how/where is the TSParser * that gets = passed >> to the treesiter dylib translated to the Lisp_TS_Parser *? >=20 > Forget that question, I see it, TSInput and so on. But I'd be = interested > if there are other such constructs in treesit? >=20 If you mean tree-sitter struct that=E2=80=99s exposed to lisp, there are = Lisp_TS_Parser, Lisp_TS_Node, and Lisp_TS_Query. Lisp_TS_Node is a node = in the parser tree, Lisp_TS_Query is a lazily compiled query. = Tree-sitter queries, like regexp, are compiled from string to = tree-sitter=E2=80=99s internal struct before being used. HTH. Yuan=