rem: parser.setScriptBuilder( new PrintingScriptBuilder() );
add: PrintingScriptBuilder psb; parser.setScriptBuilder( &psb );
context: int main( int argc, char * argv[]  ) {  if ( argc == 2 ) { // manual test    const char * scursor = argv[1];    const char * const send = argv[1] + qstrlen( argv[1] );    Parser parser( scursor, send );    parser.setScriptBuilder( new PrintingScriptBuilder() );    if ( parser.parse() )      cout << "ok" << endl;    else      cout << "bad" << endl;  } else if ( argc == 1 ) { // automated test    bool success = true;    for ( int i = 0 ; i < numTestCases ; ++i ) {      const TestCase & t = testCases[i];      cerr << t.name << ":";      VerifyingScriptBuilder v( t );      Parser p( t.script, t.script + qstrlen( t.script ) );      p.setScriptBuilder( &v );      const bool ok = p.parse();      if ( v.ok() )	if ( ok )	  cerr << " ok";	else 	  cerr << " xfail";      else	success = false;      cerr << endl;    }    if ( !success )      exit( 1 );  } else { // usage error    cerr << "usage: test_sieve_lexer [ <string> ]" << endl;    exit( 1 );  }  return 0;}