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 kMOFA/yRy2VcZwEA62LTzQ:P1 (envelope-from ) for ; Tue, 13 Feb 2024 16:59:56 +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 kMOFA/yRy2VcZwEA62LTzQ (envelope-from ) for ; Tue, 13 Feb 2024 16:59:56 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=kYofiuEW; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707839996; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=jPSmb8tybwulUaDykMHGfFZuSrfzoJ1oXshj0rb4wI0=; b=mGs35nwGJOTGpmmFQZHViCnB4TM5qlD78ZbiPmGC8UIwZcaN2xOaaflyeQuHVXLFLx+MFy 1X2VKzHLOyhwYb9AByCN69TVT2nTTS+gFigW1qhesmR3XT6N/opsjl392kI4CKY+IPtUyj so+R573VwE/x49pq7py45Hp4X+9xiDO55FVBNWS657C36k7NuSfPl85t4L3e4WvQxxzrOH 2z6W6mQ6gCVkBtPdRLGPDoiVNen7aYNfkMZnTWiywjnpTnUV58pO3aZQP5SetSsdjzezj0 OZdGKkLAKjzR/RM3OdiytY+F2Yr2nT1aajEOfcWLDtx90dw6rxKUwmURjjNU6g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=kYofiuEW; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707839996; a=rsa-sha256; cv=none; b=Zb5G1SIvwYXoLc3nwOzjm1Aqli8GsSwSxqJwx+mpe0BerMCp7xfsOpc/GqfG8PlO2qGM2W zcw9oXQEcbKCyg7g95Rqso0vrTZgpvzOUbwVjhkWhUrdiGfHkoE5xZz/WGIWCv6OAi5vDw t64K2jMfvVRYAICw9iVPSv+r/bZPI31u6mFLvjAMJmtJKbzAR1+ia9OZe4ruFlcnDfo0os 0TrC3ABGzRnqLs+gAbjS8IaHYXxiVZcLIcwULoVfs9oB8VGylZkJ+R0WOBqagmP4tiVHyH QewzDwYRpUDezzikz/sk5r/lasiLi1HuBS58F+nOhyz0fILG7g6kwt/kxVZXrQ== 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 C6E6553FBF for ; Tue, 13 Feb 2024 16:59:55 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZvBz-0008G6-QI; Tue, 13 Feb 2024 10:59:31 -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 1rZvBy-0008Fj-Dw for emacs-orgmode@gnu.org; Tue, 13 Feb 2024 10:59:30 -0500 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rZvBw-00079u-S7 for emacs-orgmode@gnu.org; Tue, 13 Feb 2024 10:59:30 -0500 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-51156cf5766so1361301e87.0 for ; Tue, 13 Feb 2024 07:59:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707839966; x=1708444766; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=jPSmb8tybwulUaDykMHGfFZuSrfzoJ1oXshj0rb4wI0=; b=kYofiuEWBj1se73nvAwYDafXQhfD9BL7UON3n2IzvAkTU8uP52fUYf0obXWQpSnMrX ea7iJ175jv0OfHzy7aI+zfBIR7l23DZpo/3YKTOyuZwoXZ9F25o1DTVKJyxAT9IJ5aS9 aSKkO1M04f2eMys7utA1GPqu8IbsOXnZSsRvA3H03NyA+PhxdoPedSndcdf6RlnpeH6a 9Qf5NrVouCkFfoOupEPEdjqGChW5Xo3tD3aChW/Qby5NBjP8d2W34+ukgSsxZC0FG4z0 8QtD/8s5onwn0jIx9kJPaB5youHZ8rpVhISfL3/CwAcaM+Zm+DOQCMP8mJFWH0CoJh43 /xBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707839966; x=1708444766; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=jPSmb8tybwulUaDykMHGfFZuSrfzoJ1oXshj0rb4wI0=; b=uI8PXn4LAjQA5+To3kXY2udfFoVvIQQ8jONvNcNgfFA7lRvE1qP8plBwbTFZJ2+QrP FVYUjDFJfLFzoQY0JVfBOycDhgNTPnG/AfYp7ggugWFdKqf35R1i2drHQ1bfpzNvx5rr rs+0VHxY2WksyjlqsObLRy7WLhPVsI0IegElTz0ATZhRTaveRZHett2k1yoPJHXKwLpU k/OBIqz/O6Le0RFGtL+UmV9GMFRYvFOAvGeprZl9IvVqwKXeKNycujfJ+aDAban0Ia9Q agx5D+EUDEozkNdZ8HAwC5CAfx/92RQHr4QaQtUHfGykLGa4jkK7OGZFnFtc/TSEXaIE u3Ww== X-Gm-Message-State: AOJu0YzFLo+tO12IGgZTkdDNfEY6QlGTgjW9R23mPQgRjF2fMBCNb6ru gs/hFR21pZtSByCgsNGNRHJcTLfDukArd4lyGi4LbenEtxkGnqYWONVVyQ6eTIFT56fuSWxeVMf 07Lvew2ds516CQBdM9JlFfbRi03qd7iuw X-Google-Smtp-Source: AGHT+IFo5kQFmBg0x+88xz9wf6FU2X8yq+Nyi5wSc4g8dw+NI93d8Ldhx5EubNuRc7HSk546EZauV7deMbXGTBl19GE= X-Received: by 2002:ac2:434b:0:b0:511:680c:94e9 with SMTP id o11-20020ac2434b000000b00511680c94e9mr5057415lfl.3.1707839965678; Tue, 13 Feb 2024 07:59:25 -0800 (PST) MIME-Version: 1.0 From: Stefano Ghirlanda Date: Tue, 13 Feb 2024 07:58:49 -0800 Message-ID: Subject: Best way to extract info from C files? To: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=sg19721222@gmail.com; helo=mail-lf1-x131.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: -6.97 X-Migadu-Scanner: mx13.migadu.com X-Spam-Score: -6.97 X-Migadu-Queue-Id: C6E6553FBF X-TUID: /AVUVky+VwGl 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! -- Stefano Ghirlanda CTO, DataWorks - https://dataworks.consulting Guest Professor - Stockholm University Centre for Cultural Evolution