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.bugs Subject: bug#72388: 31.0.50; Use tree-sitter-cuda grammar but with tree-sitter-cpp's font-lock/indentation rules Date: Tue, 30 Jul 2024 17:05:48 -0700 Message-ID: <4138B715-7C8D-4904-8D0A-616BA556AD4C@gmail.com> 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="18454"; mail-complaints-to="usenet@ciao.gmane.io" To: 72388@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 31 02:07:13 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1sYws4-0004gb-HE for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 31 Jul 2024 02:07:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYwrh-00054m-3I; Tue, 30 Jul 2024 20:06:49 -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 1sYwrf-00054U-Hu for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2024 20:06:47 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYwrf-0000Xz-93 for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2024 20:06:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:Mime-Version:From:To:Subject; bh=xxu7EIGShMOjyvdp8JXdUqsk/+YA/x/IL9MJ8PYrcJE=; b=cMMMf/lJTCMzVYc3jjr3Ye8McrSTD9GVH1vxAnlatVa/WMCey8RvZwPf+AFr7eXY0Xd3WeeDzlQoalbPl84ph7PCCZe7nvkT+wbM8R3JycemcLyzJmbRVRFyOsqpIC+TLcUsXDuPoq3fMht4Q7dhK178VAuMfhPxvgJ57kpcXJuQG+K16Vjv/X1U3L/6CSuL+rKy7JVxzt5BAq6Jy52qTphyyozWz6jhDrvEQtT/sHXe7qxyNnelvYytCYk/DnscMRU28Fi4tq+ZkPjJYAEPiekSj/O7RmTAYJ9+c2WhX5OqwmmyDYV1cAHPupScUgtFe1cq3vQ4Cl0+UEscVGuJrQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sYwrt-0004f9-Vb for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2024 20:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 Jul 2024 00:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72388 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Bug Report Emacs Original-Received: via spool by submit@debbugs.gnu.org id=B.172238438417876 (code B ref -1); Wed, 31 Jul 2024 00:07:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 31 Jul 2024 00:06:24 +0000 Original-Received: from localhost ([127.0.0.1]:48741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sYwrI-0004eG-Cz for submit@debbugs.gnu.org; Tue, 30 Jul 2024 20:06:24 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:45700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sYwrD-0004e4-Ll for submit@debbugs.gnu.org; Tue, 30 Jul 2024 20:06:22 -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 1sYwqy-0004vF-76 for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2024 20:06:04 -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 1sYwqw-0000J7-Ok for bug-gnu-emacs@gnu.org; Tue, 30 Jul 2024 20:06:03 -0400 Original-Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1fd78c165eeso43879445ad.2 for ; Tue, 30 Jul 2024 17:06:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722384360; x=1722989160; darn=gnu.org; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=xxu7EIGShMOjyvdp8JXdUqsk/+YA/x/IL9MJ8PYrcJE=; b=T2RibJVOxP630piiIz0YFwm0s05eN3iZPw6yWBh/yLrY3bcSKjI5grgHDxfqkxLBTq elXKuIAzH1c/nSyEfdSVWr/6mrbdftbHZap9SGjh2gMGusS5Bj46EM2F3fp+ORy9a1PI JjRohzZ+9ym4gJRU1dXaa62dN6+FOaKTvlMcYJUFi0Us2QLdjlRsbdsXTq+PAtBwFA/z 3ZLg/DMmvQ48W1HlBRDzmmqn8QGjfbhL2w+2JANTrcFxRV9SbY9RsNjKvxEYIBvmKBoV EShWkkk5sIsjYb15w1eKjFba3Ef/NS/+OhmQS3UoPH3zsLz5a8vZXefYhhlanMwHGU0n xzoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722384360; x=1722989160; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xxu7EIGShMOjyvdp8JXdUqsk/+YA/x/IL9MJ8PYrcJE=; b=tKsdtRRHGw/LizKr5chyMiSdpW5p0E8oQSYPllAvCdirKUMSJRVBCw0uQhJxMYzmHP eDaTOOfrvD/asofFvEdbhpgqGLCJsorUCpOa4gOnBy8keHYacqSeO6h9ZgdCqFtXeEOo dWr2slxiikIFr3kDohIvRzUa0L57uOze8pPostn9/cnO7ZtaRYyCGUCfX/k4Y6G2naDP ghJfr4Xbe17HVqaHMciOwiJF4pI3iIcziV5wBXd9V7SEx10EOXESJRrLfLEwOUmVe24v tscYfm+G3UnRPWLt5h6Ss/Z01kv4YIGkul9pWRJzKHWY9nGVf+Rvm2dbssbE5HOIy5qC WOiQ== X-Gm-Message-State: AOJu0YzD1GJ/xEw2frOIMyRcIe0hmELW3DSdbx3Ru2r2nwilt0rehfuZ R0FmDR5WsYwby7FFA1t4dccEUHBO7+lg4+eCmvsTT6hwOgCcIwnzXaUolQ== X-Google-Smtp-Source: AGHT+IEEYcmCM1jL5Hl06bISoSM7h2Yxkm8ZdNojM80h3vntII5lbZUQ5mwZPCp0a++etaKvh3tn2Q== X-Received: by 2002:a17:903:41cd:b0:1fd:9420:1073 with SMTP id d9443c01a7336-1ff048a9e37mr189586005ad.43.1722384359868; Tue, 30 Jul 2024 17:05:59 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:4c7a:ac4b:4762:593e]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fed7ff65f4sm107774125ad.300.2024.07.30.17.05.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jul 2024 17:05:59 -0700 (PDT) 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: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289570 Archived-At: Originated from "Implementing cuda-ts-mode=E2=80=9D on emacs-devel [1]. = Basically we want to create a major mode for tree-sitter-cuda. = Tree-sitter-cuda grammar is basically cpp grammar plus some cuda rules. = So it makes sense to reuse cpp mode=E2=80=99s font-lock/indentation = rules. But those rules directs to the =E2=80=98cpp grammar. A simple = solution is to allow users to map one language to another; then when = ever lisp tries to create or get a parser for lang A, lang B is used. Yuan [1] Message-ID: = =