delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/07/10/14:02:21

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Fri, 10 Jul 2015 20:08:19 +0200 (CEST)
X-X-Sender: igor2 AT igor2priv
To: geda-user AT delorie DOT com
X-Debug: to=geda-user AT delorie DOT com from="gedau AT igor2 DOT repo DOT hu"
From: gedau AT igor2 DOT repo DOT hu
Subject: Re: [geda-user] coding
In-Reply-To: <55A00240.9060404@ecosensory.com>
Message-ID: <alpine.DEB.2.00.1507102001230.6924@igor2priv>
References: <55A00240 DOT 9060404 AT ecosensory DOT com>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
MIME-Version: 1.0
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com


On Fri, 10 Jul 2015, John Griessen wrote:

<snip>

> So, using existing C inside of Pony is full manual.
>
> Is there any kind of tool for sifting through code chunks in C and extracting 
> such parameters and returns
> so its easier to check them?  Do any of the auto documenting programs like 
> doxygen help with that?

I am not sure I fully understand the context; are you looking for a tool 
that can extract the return type and the type of arguments of a C 
function reading the source?

If so, I happen to have a project called c99tree. It parses C files and 
emits an AST (Abstract Syntax Tree). With some scripting, it's possible to 
extract info on function argument types which then can be used to generate 
bindings or validate the API.

The AST extraction part is already done. The scripting infra on top is 
pretty experimental yet (but as the AST can be exported in several common 
text formats, it should be easy to use any kind of language or tool to 
process it).

One of the use cases I have in mind is to auto-generate bindings for C 
APIs to script languages.

Regards,

Igor2

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019