[CM] pre-parsing scheme code

Woody Douglass wdouglass at carnegierobotics.com
Mon Mar 21 09:21:26 PDT 2022


I have a habit of creating a lot of s7 lists in C. this manifested in
my C code being littered with nested `s7_list_nl` calls, and became
unwieldy pretty quickly. So i wrote the attached script to "pre-parse"
scheme s-expressions that i use in my C code, and generate C code -- it
has done wonders for the maintainability of my codebase; also, it makes
running the linter against the embedded scheme less finicky.

Have any of you done something similar to this? is there a reason it's
a bad idea? is there a better way?

I guess this is just a request for comment; thanks for any insight you
can provide. also, feel free to use/improve this script!
-Woody Douglass
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scheme_to_c.scm
Type: text/x-scheme
Size: 3451 bytes
Desc: scheme_to_c.scm
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20220321/80f9f1e4/attachment.bin>

More information about the Cmdist mailing list