I filter underscores to dashes, because I want a C function like foo_bar to look like foo-bar in the Lisp dialect. The (void) argument list is handled as a special case.
I need to parse the arguments because the output part needs to know how many there are. Note how "func_n2" is generated, where the 2 comes from the argument count.
Comments (144) 66 threads
Show all comments
Showing thread 32 of 66
An example (converting C++ to C):
Also, is it open-source?I do it out of Vim. That is: first, select a range of text, then pipe it out:
Done. For example, when adding functions to TXR Lisp's library, I start with a declaration like: I pipe this through a script which will produce this: ("Intern a symbol called "foo" in the user_package, and register a two-argument function object with this symbol, hosted from the C function foo.")It's a little complicated:
I filter underscores to dashes, because I want a C function like foo_bar to look like foo-bar in the Lisp dialect. The (void) argument list is handled as a special case.I need to parse the arguments because the output part needs to know how many there are. Note how "func_n2" is generated, where the 2 comes from the argument count.