From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: Where to get language definition for bash tree-sitter? Date: Wed, 28 Dec 2022 12:05:11 +0300 Message-ID: References: <83sfh110fq.fsf@gnu.org> <83ilhx0w9i.fsf@gnu.org> <831qok1zvg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14203"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.2.9+54 (af2080d) (2022-11-21) Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 28 16:37:27 2022 Return-path: Envelope-to: geh-help-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 1pAYUh-0003Os-ED for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 28 Dec 2022 16:37:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pAYTz-0003A2-Ao; Wed, 28 Dec 2022 10:36:43 -0500 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 1pAYTy-00039n-M5 for help-gnu-emacs@gnu.org; Wed, 28 Dec 2022 10:36:42 -0500 Original-Received: from stw1.rcdrun.com ([217.170.207.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAYTv-0006oR-EP; Wed, 28 Dec 2022 10:36:42 -0500 Original-Received: from localhost ([::ffff:102.85.220.49]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 000000000010383D.0000000063AC6266.00003B8B; Wed, 28 Dec 2022 08:36:05 -0700 Mail-Followup-To: Eli Zaretskii , help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <831qok1zvg.fsf@gnu.org> Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_06_12=1.543, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:141994 Archived-At: * Eli Zaretskii [2022-12-27 21:12]: > Try NEWS.29, if your clone of the Git repository has such a file > (which would mean you are tracking the master branch). I do not use branches, only master. Thanks. I understand instruction is for people who know how to link it, but I don't. > To compile such a library, compile the files "scanner.c" and "parser.c" > (sometimes named "scanner.cc" and "parser.cc") in the "src" subdirectory > of the library's source tree using the C or C++ compiler, then link > these two files into a shared library named "libtree-sitter-LANG.so", > where LANG is the name of the language supported by the grammar as it > is expected by the Emacs major mode (for example, "c" for 'c-ts-mode', > "cpp" for 'c++-ts-mode', "python" for 'python-ts-mode', etc.). Then place > the shared library you've built in the same directory where you keep > the other shared libraries used by Emacs, or in the "tree-sitter" > subdirectory of your 'user-emacs-directory', or in a directory > mentioned in the variable 'treesit-extra-load-path'. I got these after compiling: -rw-r--r-- 1 476K Dec 28 11:32 parser.o -rw-r--r-- 1 6.7K Dec 28 11:32 scanner.o How do I link them? gcc -shared maybe, but I know gcc just like you know Org. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/