metaparse/doc/getting_started_34.qbk
2015-09-05 16:11:18 +02:00

8 lines
434 B
Plaintext

[#getting_started_34]
using paren_exp3 = middle_of<lparen_token, plus_exp2, rparen_token>;
using primary_exp2 = one_of<int_token, paren_exp2>;
using unary_exp2 = foldr_start_with_parser< minus_token, primary_exp2, boost::mpl::lambda<boost::mpl::negate<boost::mpl::_1>>::type >;
using mult_exp5 = foldl_start_with_parser< sequence<one_of<times_token, divides_token>, unary_exp2>, unary_exp2, boost::mpl::quote2<binary_op> >;