
expr --> term, "+", expr.
expr --> term, "-", expr.
expr --> term.

term --> number, "*", term.
term --> number, "/", term.
term --> number.

number --> "+", digits.
number --> "-", digits.
number -->  digits.


digits  --> digit, digits.
digits  --> digit.

digit --> [C], {"0" =< C, C =< "9"}.

/*
| ?-  expr("-2+3*5+1",[]).

yes

?- expr("-245+3*5+11",[]).

yes

*/
