Boost logo

Boost Users :

From: elviin (elviin_at_[hidden])
Date: 2006-01-16 09:51:32

I created this parser and it is working for me
except the detail:

                                                 //the body of the block
            cpp_code_block_text = *(anychar_p-ch_p('{')-ch_p('}'));
                                                 //the code begins with '{'
            cpp_code_block_begin_p = ch_p('{');
                                                //the code ends with '}'
            cpp_code_block_end_p = ch_p('}');


            cpp_code_block_p =
                    repeat_p (0, 100)[(cpp_code_block_p|cpp_code_block_text)]

Here is the text I'm using for tests:

bbb b b { asa}bb
bbb b bb

And the problem is in repeat_p (0, 100). I'd like to use * instead but
it does not work for me because the parser runs forever. 100 means the
number of blocks cpp_code_block_p or cpp_code_block_text.

Where is the problem?
Thank you very much for reply.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at