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;I'm forced to populate the structure's members (a float) 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:
using vmml::vec3f; // vmml::vector<3, float>
rule<typename Iterator, vec3f()> = lit('v') << float_ << float_ << float_;
vmml::vec3f vert;... which is a lot uglier, IMO.
rule<typename Iterator> = lit('v') << float_[ref(vert) = _1] << float_[ref(vert) = _1] << float_[ref(vert) = _1]
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?
· Tue Apr 13, 2010 @ 09:37pm · 2 Comments