I've been neglecting this, haven't I? Truth be told, I had typed up a very long post the same evening I wrote the first entry, but either Firefox or Gaia ate it, and I was too pissed to start again, so set it aside for a while.
Today, I feel more like venting, though.
I've been experimenting with Boost::Spirit, which really greatly simplifies writing parsers for arbitrary grammars. I'm liking it so far, but I've run into a rather frustrating inconvenience:
For a rule like this:using boost::spirit::qi::rule; using vmml::vec3f; // vmml::vector<3, float> rule<typename Iterator, vec3f()> = lit('v') << float_ << float_ << float_; I'm forced to populate the structure's members (a float[3]) explicitly, and the documentation isn't clear on whether accessing a value's members through phoenix lambdas is possible. So, I'm more or less forced to rewrite it like so:vmml::vec3f vert; rule<typename Iterator> = lit('v') << float_[ref(vert[0]) = _1] << float_[ref(vert[1]) = _1] << float_[ref(vert[2]) = _1] ... which is a lot uglier, IMO.
Ah, hell. I'll get this figured out.
Edit: On a side note, it seems this page doesn't have a style defined for the ".code" class, and the two-cell table it's in only has one real style: width:90%. Anyone happen to know if there's a way to get styles on journals?
psychic stalker · Tue Apr 13, 2010 @ 09:37pm · 2 Comments |