From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id KDrlMN6G1GU3jgAAe85BDQ:P1 (envelope-from ) for ; Tue, 20 Feb 2024 12:02:54 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id KDrlMN6G1GU3jgAAe85BDQ (envelope-from ) for ; Tue, 20 Feb 2024 12:02:54 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=YqgGQgMY; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1708426974; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=8jIUYa7yj6RkFu2iTcmHR3DfeI1amO8fPk7WvmoNQQE=; b=JK24MJwdMMj3F0r0C30O2KVGF2G41PDg/O3I8dU97i7FKqpgen9dqwAAs0A+SYq8HOD2yF rGTWw2nXzXQaj6xiGlBxlo/JnG+bHhpraCRLbfBP/2rTOimLbrdTiKYkUgR4CO4lsRPu9E KQuyhqkyDbasdYPrMjT0pl5irHOJFZ6J6wxlboyMi7ciO8lm+LdT8P/HYgP0apUibaBphd AvBqgeevtRAQU50HxTMKyZC5HuTXs/iiYjWtliEAyQT9FVU7X6/DgGe+nFJNFNnBVgjxR2 W4yrciVdsT51MM3TtOhGUhGsBGmcneyx3XaWv2kkfuIfyujEhWC/1y7AezZFdg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=YqgGQgMY; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1708426974; a=rsa-sha256; cv=none; b=fPOXQbQn4jLmaWNd6e9xfhegoBNw28myRjSM/LmDmmStKBqaWCb4IC1uJ0Le2F3jcZQ8Fq cupzrTr+feS6V5K9wkZBLEFXmkWyj7AJa8NsBvtexiEMiGJr7NB5AVKD29x+d/X/8cAXIc OjjA2sOztz14WDbB8BaSRQZGitp59YWkHplF7GPaJEXtOzZftdA8oeYBBWdqO/GMHfZ/gd rmI4pmys4yEzuCd+3usyMaekiaNZWXXmWVSRRDRUpwSRG4mVGJH4c17TzYdtnH8goPRBr6 C+00VMDWJ1yO0T97uhHZ+YDe1o1NfX0Do7IpocT6h8IpMc/5e/AIxiI2gxPrZg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9DF8D7441D for ; Tue, 20 Feb 2024 12:02:54 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcNso-00063j-BF; Tue, 20 Feb 2024 06:01:54 -0500 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 1rcNsn-00063G-2w for emacs-orgmode@gnu.org; Tue, 20 Feb 2024 06:01:53 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rcNsk-0005dO-0K for emacs-orgmode@gnu.org; Tue, 20 Feb 2024 06:01:52 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id ED253240101 for ; Tue, 20 Feb 2024 12:01:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1708426907; bh=3qNybowtBa8AUC2L5+uirz4VHlpXomjhG6yEGWxmXs8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=YqgGQgMYIV+Gkd3t2ri8rx4+xRI73PV+HoRn5gUvAyZAvcL2dQjK6rGrPtKmMcQPE OXgQ5dDik6rZm5TtlYKtvLocitcK9D/TvsMOwXq5sLyEVBlkz28jMbxWGQegqnP4gs qfGo0xhBOdKmivon0Adcx8zV5dhRi2CHO0WfWICfiWJv8L7crMaaGw6BShU00ja/xr YRxQnI7BmrKUWmzA47qBLYP4yjPTbwusGkuGPc3ESjYvq+i+lYRjBQ+J8dw0WmbatJ NLR0cqp3o4EUL6rzuJvYTQEeUt6pWdrjTUIgHlHYPH8LqMI7wki+d1NzjNnC5qoasU kPs78vUoWZiWw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TfGgY5jcsz9rxB; Tue, 20 Feb 2024 12:01:45 +0100 (CET) From: Ihor Radchenko To: Stefano Ghirlanda Cc: emacs-orgmode@gnu.org Subject: Re: Best way to extract info from C files? In-Reply-To: References: Date: Tue, 20 Feb 2024 11:05:27 +0000 Message-ID: <8734tnflag.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -6.38 X-Spam-Score: -6.38 X-Migadu-Queue-Id: 9DF8D7441D X-TUID: DyOTijDjGDla Stefano Ghirlanda writes: > I'm trying to build a simple code documentation tool for org-mode, so > I'm looking for ways to get information from C files (to begin with, > ideally it will be easy to add other languages). Things like function > prototypes, struct definitions, etc. What would be the best tool for > this? My search has come up with things like lsp-mode, semantic, etags > but I have no experience with any of these. What would be easiest to > work with / setup, and have the necessary functionality? Or should I > just write my own parsing code? tree-sitter or lsp might work. Or xrefs. Or TAGS. > More specifically, my initial goal is to be able to parse things in a > format similar naturaldocs.org, for example: > > // Function: This is a brief description. > // Parameters: > // - x: The first parameter > // - y: The second parameter > // Return: A value > int my_function( int x, int y ); This simple scenario might be parsed with custom regexps. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at