Re: error in grammar

Lee Clagett <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <20160826232151.015c6971@laptop-m1330>
On Fri, 26 Aug 2016 22:20:49 +0200
Jens Kallup <[email protected]> wrote:

> Hello,
> 
> in:
> https://github.com/paule32/dBase4Linux/blob/master/source/parser/dbase/yymain.cc
> 
> I get the error in line 626:
> 
>  1.
>     /dbase/source/parser/dbase/yymain.cc:626: Error: no match for
>     'operator[]' (operand types are 'char' and 'const type {aka const
>     boost::phoenix::actor<boost::proto::exprns_::expr<boost::proto::tagns_::tag::assign,
>     boost::proto::argsns_::list2<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
>     boost::proto::argsns_::term<boost::spirit::attribute<0> >, 0l>,
>     boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::phoenix::tag::construct,
>     boost::proto::argsns_::list4<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
>     boost::proto::argsns_::term<boost::phoenix::detail::target<dBaseParser::expression_ast>
>      >, 0l>,  
>     boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::phoenix::tag::construct,
>     boost::proto::argsns_::list2<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
>     boost::proto::argsns_::term<boost::phoenix::detail::target<std::__cxx11::basic_string<char>
>  [...]  
>     boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
>     boost::proto::argsns_::term<const char*>, 0l> >, 2l> >,
>     boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::phoenix::tag::construct,
>     boost::proto::argsns_::list2<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
>     boost::proto::argsns_::term<boost::phoenix::detail::target<std::__cxx11::basic_string<char>
>  [...]  
>      >,  
>     boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::phoenix::tag::construct,
>     boost::proto::argsns_::list2<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
>     boost::proto::argsns_::term<boost::phoenix::detail::target<std::__cxx11::basic_string<char>
>  [...]  
>     boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
>     boost::proto::argsns_::term<const char*>, 0l> >, 2l> > >, 4l> > >,
>  [...]  
>  2.
>  [...]  
>  3.
>     ^
> 
> 
> How can I fix this error?
> 
> TIA
> Jens

This is trying to call a semantic action on a char. Use
`qi::char_()[...]`. But did you intend to use the semantic action on
the kleene star?

Lee

------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.