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

#422 in Rust patterns

Download history 558073/week @ 2023-12-16 299614/week @ 2023-12-23 428094/week @ 2023-12-30 572736/week @ 2024-01-06 577280/week @ 2024-01-13 636069/week @ 2024-01-20 615708/week @ 2024-01-27 619848/week @ 2024-02-03 621263/week @ 2024-02-10 669405/week @ 2024-02-17 718836/week @ 2024-02-24 621396/week @ 2024-03-02 615111/week @ 2024-03-09 606462/week @ 2024-03-16 604337/week @ 2024-03-23 532312/week @ 2024-03-30

2,462,590 downloads per month
Used in 5,170 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
~17K SLoC