fix parser rule for global decls
fix code printing