clean up grammar
rework _gen_parser, import
tweak _gen_parser/import logic more