klmr/streampunk — pull request #1 by sehe (2013-06-20 13:45:32+00:00)
Title: Some tweaks and a simple solution to the distinct keywords thing

Look at the last commit only for the `kw` parser

I aimed for quick & dirty. IIRC Spirit Repository already contains a thing like this, but it's more fun to write it:

// a quick and dirty distinct keyword parser `kw`: Should be effective,
// at least to avoid parsing partial identifiers as keywords
static const qi::rule kw = qi::lit(qi::_r1) >> !qi::alnum;

And use it wherever you needed it:

kw(+"module") > qualified > eol;

Test still compiles and passes.