index out of bounds

Jens Kallup <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <[email protected]>
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
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.