orangeduck / mpc

A Parser Combinator library for C
Other
2.67k stars 292 forks source link

remove mpcf_maths from mpc.c and adjust maths test #153

Closed carueda closed 1 year ago

carueda commented 1 year ago

Couple of straightforward, hopefully useful, adjustments:

  1. mpcf_maths moved from mpc.c to tests/core.c, because:
    • seems like a very specific function that should not be included in main library object
    • it is only used in the mentioned test
  2. adjusted the grammar in test_maths to switch the set of operators for Term and Expr such that they follow the standard convention regarding precedence, in fact, now with the grammar in the test consistent with the similar grammar definition in the README.

In short, no critical adjustments, well, perhaps except for 1. in case some client code out there already happens to rely on mpcf_maths ...

If this can be merged (or some of the above committed directly by any maintainers), great! if not, totally fine, too. Thanks.

orangeduck commented 1 year ago

Thanks, this looks good to me.