fn can_pop(op1: &Token, stack: &Vec<Token>) -> bool {
    if stack.len() == 0 {
        return false;
    }
    let p1 = match get_priority(&op1.param) {
        Some(value) => value,
        None => {
            println!("> error: unknown operator '{}'", op1.param);
            return false;
        }
    };
    let last = match stack.last() {
        Some(value) => value,
        None => {
            println!("> error: function stack is empty");
            return false;
        }
    };
    let p2 = match get_priority(&last.param) {
        Some(value) => value,
        None => {
            println!("> error: unknown operator '{}'", last.param);
            return false;
        }
    };
    p1 > 0 && p2 > 0 && p1 >= p2
}
// check for the possibility of pulling out of the stack
check for the possibility of pulling out of the stack
check for the possibility of pulling out of the stack
fn can_pop(op1: &Token, stack: &Vec<Token>) -> bool {
    if stack.len() == 0 {
        return false;
    }
    let p1 = match get_priority(&op1.param) {
        Some(value) => value,
        None => {
            println!("> error: unknown operator '{}'", op1.param);
            return false;
        }
    };
    let last = match stack.last() {
        Some(value) => value,
        None => {
            println!("> error: function stack is empty");
            return false;
        }
    };
    let p2 = match get_priority(&last.param) {
        Some(value) => value,
        None => {
            println!("> error: unknown operator '{}'", last.param);
            return false;
        }
    };
    p1 > 0 && p2 > 0 && p1 >= p2
}
fn can_pop ( op1 : & Token , stack : & Vec < Token > ) -> bool { if stack . len ( ) == 0 { return false ; } let p1 = match get_priority ( & op1 . param ) { Some ( value ) => value , None => { println ! ( " " op1 param ) ; return false ; } } ; let last = match stack . last ( ) { Some ( value ) => value , None => { println ! ( " " ) ; return false ; } } ; let p2 = match get_priority ( & last . param ) { Some ( value ) => value , None => { println ! ( " " last param ) ; return false ; } } ; p1 > 0 && p2 > 0 && p1 >= p2 }
check for the possibility of pulling out of the stack
check for the possibility of pulling out of the stack
op1
&Token
stack
&Vec<Token>
op1
&Token
stack
&Vec<Token>