error in grammar

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

error in grammar

Jens Kallup
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>
     > >, 0l>,
    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>
     > >, 0l>, boost::phoenix::actor<boost::spirit::argument<0> > >, 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>
     > >, 0l>,
    boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal,
    boost::proto::argsns_::term<const char*>, 0l> >, 2l> > >, 4l> > >,
    2l> >}')
 2.
    >>  ')' [
 3.
    ^


How can I fix this error?

TIA
Jens

------------------------------------------------------------------------------
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|

Re: error in grammar

Lee Clagett-2
On Fri, 26 Aug 2016 22:20:49 +0200
Jens Kallup <[hidden email]> 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

------------------------------------------------------------------------------
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general