Index: calc_plain.cpp =================================================================== --- calc_plain.cpp (revision 44011) +++ calc_plain.cpp (working copy) @@ -41,6 +41,7 @@ void do_mult(char const*, char const*) { cout << "MULTIPLY\n"; } void do_div(char const*, char const*) { cout << "DIVIDE\n"; } void do_neg(char const*, char const*) { cout << "NEGATE\n"; } + void do_sqrt(char const*, char const*) { cout << "SQRT\n"; } } //////////////////////////////////////////////////////////////////////////// @@ -72,6 +73,7 @@ factor = lexeme_d[(+digit_p)[&do_int]] | '(' >> expression >> ')' + | ("sqrt(" >> expression >> ")")[&do_sqrt] | ('-' >> factor)[&do_neg] | ('+' >> factor) ;