All pastes #512328 Raw Edit

piromanas

public cpp v1 · immutable
#512328 ·published 2007-05-26 21:17 UTC
rendered paste body
template<typename iterator> void set_priority(iterator begin, iterator end, list<node*> & output ) {    list<node*>::iterator i = begin;    int counter = 0 ;    while(i != end) {        if ( *i->parenthesis == '(' ) counter += 10 ;        else            if ( *i->parenthesis == ')' ) counter -= 10 ;         else            if (i->operation) (*i)->operation->priority += counter ;    }}