index out of bounds

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

index out of bounds

Jens Kallup
Hello,

I have following code snippets, and I have no glue,
how to solve the out of bounds in line 25.


     struct token_value_get {
         typedef void result_type;
         token_value_get() { }
         void operator()(QString const &t1, double const &t2) const {
             _end_token  = t1;
             _end_result = t2;
         }
     };
     phoenix::function<token_value_get> get_token_value;

 1.      template <typename Iterator, typename FPT, typename Skipper =
    dbase_skipper<Iterator>>
         struct dbase_grammar : public qi::grammar<Iterator, FPT, Skipper>
         {
             qi::rule<Iterator, FPT, Skipper> start;
             dbase_grammar()  : dbase_grammar::base_type(start)
             {
 2. ...
 3.

 4.
               symbol_expr %=
 5.
    (
 6.
                       symbol_term [ _val = _1 ]
 7.
    )
 8.
    ;
 9.
10.
               symbol_def_expr =
11.
    (
12.
    (
13.
    ( (symbol_def_if)
14.
    )
15.
    |
16.
    ( (symbol_print)
17.
    >>  (
18.
    (symbol_string [ print_string(qi::_1) ] )
19.
    )
20.
    )
21.
    |
22.
    ( (variable >> lit("=")
23.
    >>   symbol_expr
24.
    [
25.
                                           get_token_value(_1,_2),
26.
                                           op2(_end_token,_2)
27.
    ]
28.
    )
29.
    )
30.
    )
31.
    )
32.
    ;
33.


qi::rule<Iterator, Skipper> symbol_def_expr;
qi::rule<Iterator, double, Skipper> symbol_expr;


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: index out of bounds

sehe
On 05-02-17 19:29, Jens Kallup wrote:
> I have following code snippets, and I have no glue,

That's sad, because glue is definitely required to put the pieces of
this back together: http://i.imgur.com/seDfbAg.png


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Spirit-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-general
Loading...