|
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('}');
//parser:
cpp_code_block_p =
cpp_code_block_begin_p
>>
repeat_p (0, 100)[(cpp_code_block_p|cpp_code_block_text)]
>>
cpp_code_block_end_p;
----------------------
Here is the text I'm using for tests:
{asas
{bbbbbb
bbb b b { asa}bb
bbb b bb
}
as
{aaaa}
{aaaacc}
asasa
{}
aaa
}
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 hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net