17 unstable releases (5 breaking)

0.6.0 Oct 11, 2021
0.5.0 Jun 21, 2021
0.4.0 Mar 9, 2020
0.3.6 Nov 5, 2019
0.1.3 Jul 20, 2016

#815 in Development tools

Download history 217387/week @ 2022-08-03 227565/week @ 2022-08-10 226241/week @ 2022-08-17 218788/week @ 2022-08-24 210253/week @ 2022-08-31 222036/week @ 2022-09-07 219777/week @ 2022-09-14 229623/week @ 2022-09-21 225607/week @ 2022-09-28 247808/week @ 2022-10-05 246590/week @ 2022-10-12 266879/week @ 2022-10-19 261487/week @ 2022-10-26 281786/week @ 2022-11-02 276558/week @ 2022-11-09 239785/week @ 2022-11-16

1,107,028 downloads per month
Used in 3,252 crates (3 directly)

Apache-2.0/MIT

39KB
852 lines


lib.rs:

A C expression parser and evaluator.

This crate provides methods for parsing and evaluating simple C expressions. In general, the crate can handle most arithmetic expressions that would appear in macros or the definition of constants, as well as string and character constants.

The main entry point for is [token::parse], which parses a byte string and returns its evaluated value. nom's result types, re-exported.

Dependencies

~1MB
~17K SLoC