# Include <boost/xpressive. HPP>
# Include <boost/xpressive/regex_actions.hpp>
Using namespace boost: xpressive;
Sregex e_string = as_xpr ('"')> * (as_xpr ('//')> _) | ~ (Boost: xpressive: Set = '//', '"')> '"';
Sregex e_char = as_xpr ('/'')> * (as_xpr (' // ') >>_) | ~ (Boost: xpressive: Set = '//', '/')> '/'';
sregex e_normal_comment = ("/">-* _> before (_ ln | EOS )) | ("/*">-* _> "*/");
sregex e_if0_start = Bol> * _ S> '#'> * _ S> "if"> * _ S> '0'> + _ s;
sregex e_if_start = Bol> * _ S> '#'> * _ S> "if ";
sregex e_if_end = '#'> * _ S> "endif">-* _> (_ ln | EOS );
sregex e_if_secondhalf =-* _> (e_if_end | (e_string | e_char | e_normal_comment | (e_if_start> Self ));
sregex e_if = e_if_start> by_ref (response);
sregex e_if0_comment = e_if0_start> by_ref (response);
sregex e_comment = e_normal_comment | response;
sregex e_find = e_string | e_char | e_comment [ref (cout) <_ <"/N"];
int main (INT argc, char * argv [])
{< br> string name;
while (CIN> name)
{< br> ifstream F (name. c_str ();
string S (istreambuf_iterator (f), istreambuf_iterator ();
for (sregex_iterator ITER (S. begin (), S. end (), e_find); iter! = Sregex_iterator (); ++ ITER)
{}< BR >}< br> system ("pause");
return exit_success;
}