generate.py: crude tweaks to allow structs and typedefs

Signed-off-by: bryan newbold <bnewbold@twinleaf.com>