cant parse "val = 2 * * 2"
Jens Kallup <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I try out to compile the extend version of yesterday (Larry)
But I fail:
My goal is to produce a user information (error/warning), when
the following string
is parsed:
"val = 2 * * 2"
tok.my_mul equals '*' in the lexer
The correct form is:
"val = 2 * 2"
Then next problem is in line 5.
It differs from "bool", but how to "throw MyException" ?
Thanks for helping
Jens
1 term =
-
-
factor [ _val = qi::_1]
-
>>
*( (tok.my_mul >> skip(space)[
-
tok.my_mul
-
]
[lex::_pass = lex::pass_flags::pass_fail ])
// <--- here
-
|
(tok.my_mul >> factor [ _val *= qi::_1])
-
|
('/' >> factor [ _val /= qi::_1])
-
)
-
;
-
-
-
/usr/include/boost/proto/transform/default.hpp:154: Fehler: cannot convert 'const
boost::spirit::lex::pass_flags' to 'bool' in assignment
-
BOOST_PROTO_BINARY_DEFAULT_EVAL(=,
assign, make_mutable, make)
-
^
-
-
/usr/include/boost/proto/transform/default.hpp:154: Fehler: cannot convert 'const
boost::spirit::lex::pass_flags' to 'bool' in assignment
-
-
/usr/include/boost/spirit/home/support/action_dispatch.hpp:178: Fehler: no match for call to '(const
boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::assign,
boost::proto::argsns_::list2<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::phoenix::argument<3>
>, 0l>,
boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::lex::pass_flags>,
0l> > >, 2l> >)
(boost::spirit::traits::pass_attribute<boost::spirit::qi::skip_parser<boost::spirit::lex::reference<const
boost::spirit::lex::token_def<char>, long unsigned
int>,
boost::spirit::qi::char_class<boost::spirit::tag::char_code<boost::spirit::tag::space,
boost::spirit::char_encoding::ascii> > >, char,
void>::type&,
boost::spirit::context<boost::fusion::cons<dBaseParser::expression_ast&,
boost::fusion::nil>, boost::fusion::vector0<>
>&, bool&)'
-
f(attr_wrap,
context, pass);
-
^
-
-
/usr/include/boost/type_traits/make_unsigned.hpp:38: Fehler: static assertion failed: (::boost::type_traits::ice_or<
::boost::is_integral<T>::value, ::boost::is_enum<T>::value>::value)
-
BOOST_STATIC_ASSERT(
-
^
-
-
/usr/include/boost/type_traits/make_signed.hpp:38: Fehler: static assertion failed: (::boost::type_traits::ice_or<
::boost::is_integral<T>::value, ::boost::is_enum<T>::value>::value)
-
BOOST_STATIC_ASSERT(
-
^
------------------------------------------------------------------------------
_______________________________________________
Spirit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spirit-general