grips-css: lots more parser refactoring, bug fixes