![]() |
Home | Libraries | People | FAQ | More |
traits::assign_to_container_from_value
which is invoked for container attributes whenever an attribute value
needs to be added to that container.
proto::lit
(which was used to implement spirit::lit
) with a separate version allowing
to distinguish 'lit(foo)' from 'foo'. This should not change any semantics
nor should it break exiting code.
as<T>[]
(and its string specializations as_string[]
and as_wstring[]
) enabling asignment of container
attribute types as a whole.
as<T>[]
(and its string specializations as_string[]
and as_wstring[]
)
enabling handling of container attribute types during output generation
as a whole.
lit()
can now be used for numeric literals
as well.
symbols<>
parser component now has an explicit name used for error handling and
debugging, which can be set using the new member functions sym.name(...)
.
Thanks to teajay for contributing a patch.
symbols<Attrib, T>
generator component now has an explicit name used for error handling
and debugging, which can be set using the new member functions sym.name(...)
.
string(s)
.
It succeeded even if s
matched only a prefix of its attribute.
qi::tokenid()
primitive parser allowing to match arbitrary lexer tokens based on a
given token id. The difference to qi::token()
is, that it exposes as its attribute
the token id of the matched token (instead of the iterator_range of the
matched input, as qi::token()
does).
lexertl::token<>
definition: the type of the token
id. This type defaults to std::size_t
.
Any type used as the id type needs to be (explicitly) convertible from
std::size_t
.
lex::char()
and lex::string()
.
template <typename Lexer> struct lexer : lex::lexer<Lexer> { lexer() { int_ = "[1-9][0-9]*"; this->self("INITIAL", "TARGETSTATE") = int_; } lex::token_def<int> int_; };This example lexer will match a
int_
token and will switch the lexer to the state "TARGETSTATE"
afterwards. If the second argument is not specified the lexer remains
in the previous state (as before).
qi::token
and qi::tokenid
can now be used without any
argument. In this case they will match any token.
lex::lit()
has been removed.
template <typename Lexer> struct lexer : lex::lexer<Lexer> { lexer() { int_ = "[1-9][0-9]*"; this->self("*") = int_; } lex::token_def<int> int_; };Note: the
self("*")
= ...
must be executed after all lexer states have been introduced to the lexer
object.
token_def
instance used as its argument is associated with.
multi_pass
iterator causing wrong tokens to be returned to the user. This could
happen in conjunction with a lexer which performed lexer state changes
and was using pass_fail
in semantic actions to make a token match fail.
int_(10)
)
consume input on failure, which can lead to problems with the alternative
operator.