parsing cg stream format, just to learn sedlex+menhir