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

#302 in Rust patterns

Download history 433220/week @ 2023-08-15 427356/week @ 2023-08-22 422768/week @ 2023-08-29 458417/week @ 2023-09-05 445488/week @ 2023-09-12 487528/week @ 2023-09-19 511538/week @ 2023-09-26 482961/week @ 2023-10-03 512892/week @ 2023-10-10 534662/week @ 2023-10-17 507321/week @ 2023-10-24 569628/week @ 2023-10-31 559255/week @ 2023-11-07 581823/week @ 2023-11-14 492052/week @ 2023-11-21 517409/week @ 2023-11-28

2,241,444 downloads per month
Used in 4,688 crates (3 directly)

Apache-2.0/MIT

39KB
852 lines

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
~18K SLoC