This regression was exposed after i fixed the Jamfile for duplicate test
names. For example, alternative.cpp both in karma and qi were not being
tested. BJam prints an obscure error message but he real deal is that we
cannot have the same names. I changed the target names to deal with this
and a couple of tests (that were not being tested) fired.
It was the result of our decision to let fully defined literal parsers
have unused attributes: lit("something") returnes unused.
The flipside is, that fully defined parsers in alternatives can't return
any value anymore as well:
(lit("something") | int_)[ref(v) = _1]
never returnes "something" even if "something" was matched.
I'm not sure anymore if the mentioned decision was a good one in the first
place. I'll close this ticket anyway for now, please feel free to reopen
The alternative code is completely re-written now.
The list of attributes in the resulting variant now get's an unused_type
prepended whenever at least one unused_type attribute was present in the
list of attributes of the sub_parsers. If the attribute is provided
explicitely the user '''must''' include a unused_type in the variant a
type list to make it compile successfully.
The parsing code doesn't use spirit::any anmore (uses fusion::any now),
since we need to traverse over the sub-components of the alternative only.
The attribute is a variant and we do not want to traverse over the variant
types in parallel.