Pargen ported from mycpp to libmary