pub unsafe extern "C" fn SCIPparseExpr(
scip: *mut SCIP,
expr: *mut *mut SCIP_EXPR,
exprstr: *const c_char,
finalpos: *mut *const c_char,
ownercreate: Option<unsafe extern "C" fn(scip: *mut SCIP, expr: *mut SCIP_EXPR, ownerdata: *mut *mut SCIP_EXPR_OWNERDATA, ownerfree: *mut Option<unsafe extern "C" fn(scip: *mut SCIP, expr: *mut SCIP_EXPR, ownerdata: *mut *mut SCIP_EXPR_OWNERDATA) -> SCIP_RETCODE>, ownerprint: *mut Option<unsafe extern "C" fn(scip: *mut SCIP, file: *mut FILE, expr: *mut SCIP_EXPR, ownerdata: *mut SCIP_EXPR_OWNERDATA) -> SCIP_RETCODE>, ownerevalactivity: *mut Option<unsafe extern "C" fn(scip: *mut SCIP, expr: *mut SCIP_EXPR, ownerdata: *mut SCIP_EXPR_OWNERDATA) -> SCIP_RETCODE>, ownercreatedata: *mut c_void) -> SCIP_RETCODE>,
ownercreatedata: *mut c_void,
) -> SCIP_RETCODEExpand description
creates an expression from a string
We specify the grammar that defines the syntax of an expression.
Loosely speaking, a Base will be any “block”, a Factor is a Base to a power,
a Term is a product of Factors and an Expression is a sum of Terms.
The actual definition:
Expression -> ["+" | "-"] Term { [ ("+" | "-" | "number *") Term | ("number" <varname>) ] }
Term -> Factor { ("*" | "/" ) Factor }
Factor -> Base [ "^" "number" | "^(" "number" ")" ]
Base -> "number" | "<varname>" | "(" Expression ")" | Op "(" OpExpression ")where [a|b] means a or b or none, (a|b) means a or b, {a} means 0 or more a.
Note that Op and OpExpression are undefined.
Op corresponds to the name of an expression handler and OpExpression to whatever string the expression handler accepts (through its parse method).