From 07fe154100e9f77d608f60fddd2402dc277fc840 Mon Sep 17 00:00:00 2001 From: alpha123 Date: Tue, 17 Nov 2015 15:43:25 -0700 Subject: [PATCH] Fix a minor README error. Precedence of operators was flipped around in the fold_maths example. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7321a41..120ac94 100644 --- a/README.md +++ b/README.md @@ -686,14 +686,14 @@ mpc_parser_t *Maths = mpc_new("maths"); mpc_define(Expr, mpc_or(2, mpc_and(3, fold_maths, - Factor, mpc_oneof("*/"), Factor, + Factor, mpc_oneof("+-"), Factor, free, free), Factor )); mpc_define(Factor, mpc_or(2, mpc_and(3, fold_maths, - Term, mpc_oneof("+-"), Term, + Term, mpc_oneof("*/"), Term, free, free), Term ));