- for(Table::const_iterator cit = table.begin();
- cit != table.end(); ++cit) {
- if ((*cit).table) {
- string suffix = (*cit).table->findbinding(act);
- suffix = strip(suffix, ' ');
- suffix = strip(suffix, ']');
- suffix = frontStrip(suffix, '[');
- if (!suffix.empty()) {
- res += "[" + keyname((*cit)) + " "
- + suffix + "] ";
- }
- } else if ((*cit).action == act) {
- res += "[" + keyname((*cit)) + "] ";
+ Table::const_iterator end = table.end();
+ for (Table::const_iterator cit = table.begin();
+ cit != end; ++cit) {
+ if (cit->table.get()) {
+ res += cit->table->findbinding(act,
+ prefix
+ + keyname((*cit))
+ + " ");
+ } else if (cit->action == act) {
+ res += "[";
+ res += prefix + keyname((*cit));
+ res += "] ";