REBOL [ Purpose: {Creates C include for boot script.} ] do %boot.r if exists? %func.r [ append boot load %func.r ] block_to_c: func [blk cvar /local str] [ str: mold blk remove back tail str str: trim/auto skip str 2 append out rejoin [{static char } cvar {[] =^/}] blk: parse/all str "^/" forall blk [ str: blk/1 replace/all str {\} {\\} replace/all str {"} {\"} append out rejoin [{ "} str {\n"^/}] ] append out ";^/^/" ] out: {// Automatically created by boot.r^/^/} block_to_c natives "_natives" block_to_c boot "_boot" write %boot.c out ;eof