generate.py: crude tweaks to allow structs and typedefs

Signed-off-by: bryan newbold <bnewbold@twinleaf.com>
Pick useful value for normal line continuations
Make sure variable always has the same type
Eliminate conditional branches on continuation character
Don't use 'is' for string comparisons
Simplify code by moving branches into table