From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 6DvvI0q8y2UTSAAA62LTzQ:P1 (envelope-from ) for ; Tue, 13 Feb 2024 20:00:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 6DvvI0q8y2UTSAAA62LTzQ (envelope-from ) for ; Tue, 13 Feb 2024 20:00:26 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=panix.com header.s=panix header.b=JTjb4CyT; 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=fail reason="SPF not aligned (relaxed)" header.from=panix.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707850826; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=WgpzkaFaj+aKRGvXtbbDQcnuE4cDW6M+vzf9N0zQA+g=; b=ooCs+5pVvKE0537+II/X0UVYecjKO36+DLBVhGwvNj4wKKJobeIW6pyCWDC+tRjiAknJuN 7kWSaQ+lCoPwotadRHI6SZk5p4COKTkuGuJDf06+I2M2v58uO/FNpEeDHdMePDAhcl/zOh A9J9hM+0r1rtvf12VGQn4FLhnwF+7SflVVqxVGgTJGxMZT0h5ijntF8uQSF2udkn6Qg2+/ vQaV2DFxNqtFGN7JqcZm55KEzPRJbvJDLtF6y1j6EMx+xOpX5zWhWldZNsguRQrU1Zt+De vC8C/L19CtkmCcjjAOo0jHR3+sAMSgwvlCFPQlcbW2LzL65t+g/Pwdso79Q5Wg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=panix.com header.s=panix header.b=JTjb4CyT; 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=fail reason="SPF not aligned (relaxed)" header.from=panix.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707850826; a=rsa-sha256; cv=none; b=OMCuVxDMhurrx09KI/0OWXp/ShyS7+X7X+vkJuaTmBcUWrfZ9DG/B5jKGTM4HMQ4SLrf/Y W+evvDj+huZhmw3mD1LawiVoBJSj0wwMLB66DrgiHbcPuZKSC0diZC/QgGU/HzcTM+YZkX l4z85dG5l2UfKI3oPEd5PFMWHrMv+v/yEekdvyCTKd8U2rt4VbtGloXYwm7o0Ci7Sj+R/s /f5TSC8esp6Voqumv4VPLJPis616jeSZjJoxnGaIjjTbHlMT/BF23XoivZyp59kuP3sA4Z oXMHxYUG/7PCu+7TrHyOJla2UMm7YgPVGZmKajCCgtqSQWXFTFQCJ5SYriK0yA== 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 DF88843804 for ; Tue, 13 Feb 2024 20:00:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZy0L-0003gm-OF; Tue, 13 Feb 2024 13:59:41 -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 1rZy0J-0003gV-QK for emacs-orgmode@gnu.org; Tue, 13 Feb 2024 13:59:39 -0500 Received: from mailbackend.panix.com ([166.84.1.89]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZy0I-0007Da-B0 for emacs-orgmode@gnu.org; Tue, 13 Feb 2024 13:59:39 -0500 Received: from panix1.panix.com (panix1.panix.com [166.84.1.1]) by mailbackend.panix.com (Postfix) with ESMTP id 4TZ9c91RKhz4DLY; Tue, 13 Feb 2024 13:59:37 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=panix.com; s=panix; t=1707850777; bh=mLUN0xKtB4/uvp8N7mDSOcuijqv6zaCve9LThtIEvME=; h=Date:From:To:Subject:In-Reply-To:References; b=JTjb4CyT32EG3APPMFlehwYBGpBdrIARwnhsYev1xHGruwP+UHMsmXE/v7JZPMWCE NCazPthljhlH7wxzTKe3Qe3foAHWWeVnZdAPjJyyBqTi5opH5DuEWiGDmz5sjtnz95 92cSmm7P2ok/uGiXkdsqCVcNfkAIBckRwqjUHbXU= Received: by panix1.panix.com (Postfix, from userid 20712) id 4TZ9c918TYzcbc; Tue, 13 Feb 2024 13:59:37 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by panix1.panix.com (Postfix) with ESMTP id 4TZ9c915FpzcbV; Tue, 13 Feb 2024 13:59:37 -0500 (EST) Date: Tue, 13 Feb 2024 13:59:37 -0500 From: Jude DaShiell To: Stefano Ghirlanda , emacs-orgmode@gnu.org Subject: Re: Best way to extract info from C files? In-Reply-To: Message-ID: <0e7597d5-cc5a-e8fd-76aa-fc3d95db1545@panix.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Received-SPF: pass client-ip=166.84.1.89; envelope-from=jdashiel@panix.com; helo=mailbackend.panix.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, 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-Spam-Score: 3.53 X-Migadu-Scanner: mx13.migadu.com X-Spam-Score: 3.53 X-Migadu-Queue-Id: DF88843804 X-TUID: HJ83pZECBOtO Study sed once you get a script going correctly and you pass sed several files you'll love the speed it uses to get the work done. While I was working I managed to break 106 different files. I figured with no mistakes I could fix them in two weeks manually and no mistakes never happens on manual jobs. So I studied sed and threw the 106 files at sed and sed took care of that job for me in 6 minutes and did it accurately. -- Jude "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." Ed Howdershelt 1940. On Tue, 13 Feb 2024, Stefano Ghirlanda wrote: > Hi all! > > 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? > > 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 ); > > and transform this into something like: > > * Documentation > > ** my_function > > This is a brief description > > | Parameters: | | > | x | The first parameter | > | y | The second parameter | > |----------------------------------------------------| > | Return | A value | > > To be improved iteratively :) > > Thanks! > >