Boost logo

Boost :

From: Bjørn Roald (bjorn_at_[hidden])
Date: 2006-01-05 16:03:04


On Thursday 05 January 2006 01:15, Eric Niebler wrote:
>
> (Looks like you'll need to be smart about not matching braces that are
> in string literals.)

Yeah, you are right, also braces in comments. But I think that is the main
issues to look out for -- that is if I ignore the posibility of unbalanced
braces in macro definitions and conditional compiles, uhhhh ;-(
 ---- I don't like to think of all that yet.

I have done some attempts on string litorials and comments, but I was hampered
by the problems posted earlier. I left it out ot the code I sent since it
did not seem to be needed to produce the bug.

I will download from the CVS or Vault now and see if can moove forward again,
I am hopefull, thanks to your fixes :-)

When we discuss the issue of string literals, do you have any suggestion of
how to best match string literals static regexp

sregexp string_literal = '"' >> -*_ >> ( quote that is not escaped);

a naive attempt:

sregex literal_string_end = ~as_xpr( '\\' ) >> '"';
sregex string_literal = as_xpr( '"' ) >> before( literal_string_end ) >> '"';

I don't know if this even will work as I think it may, since I am a litle
confused about the meaning of before(...).

regards
Bjørn


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk