diff --git a/utshell-0.5/r_expr/src/lib.rs b/utshell-0.5/r_expr/src/lib.rs index a640b557acc9f81bded122288a970c270c6c7b60..82e3ac4f074e861b4c5de77e3a327f6ace1e5dca 100644 --- a/utshell-0.5/r_expr/src/lib.rs +++ b/utshell-0.5/r_expr/src/lib.rs @@ -1235,4 +1235,26 @@ unsafe extern "C" fn popexp() { b"../expr.c\0" as *const u8 as *const libc::c_char, 299 as libc::c_int, ); +} + +#[no_mangle] +unsafe extern "C" fn _is_arithop(mut c: libc::c_int) -> libc::c_int { + match c as u8 as char { + '=' | '>' | '<' | '+' | '-' | '*' | '/' | '%' | '!' | '(' | ')' | '&' | '|' | '^' | '~' => { + return 1 as libc::c_int; + } + '?' | ':' | ',' => return 1 as libc::c_int, + _ => return 0 as libc::c_int, + }; +} + +#[no_mangle] +unsafe extern "C" fn _is_multiop(mut c: libc::c_int) -> libc::c_int { + match c { + EQEQ | NEQ | LEQ | GEQ | LAND | LOR | LSH | RSH | OP_ASSIGN | COND | POWER | PREINC + | PREDEC | POSTINC | POSTDEC => { + return 1 as libc::c_int; + } + _ => return 0 as libc::c_int, + }; } \ No newline at end of file