emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to extract info from C files?


From: Stefano Ghirlanda
Subject: Re: Best way to extract info from C files?
Date: Tue, 20 Feb 2024 18:15:06 -0800

Thanks! I'm looking into tree-sitter now just to learn how it works :)

On Tue, Feb 20, 2024 at 3:01 AM Ihor Radchenko <yantar92@posteo.net> wrote:
>
> Stefano Ghirlanda <dr.ghirlanda@gmail.com> 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 <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>



-- 
Stefano Ghirlanda
CTO, DataWorks - https://dataworks.consulting
Guest Professor - Stockholm University Centre for Cultural Evolution



reply via email to

[Prev in Thread] Current Thread [Next in Thread]