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

#333 in Rust patterns

Download history 552921/week @ 2024-01-11 643997/week @ 2024-01-18 617277/week @ 2024-01-25 620602/week @ 2024-02-01 628690/week @ 2024-02-08 625478/week @ 2024-02-15 727984/week @ 2024-02-22 648290/week @ 2024-02-29 614383/week @ 2024-03-07 615365/week @ 2024-03-14 613968/week @ 2024-03-21 607927/week @ 2024-03-28 648566/week @ 2024-04-04 634049/week @ 2024-04-11 651779/week @ 2024-04-18 552620/week @ 2024-04-25

2,615,880 downloads per month
Used in 5,262 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
~20K SLoC