A framework of dynamic data structures for string processing