use proxytypes to make grammar object lazy