rust-bakery / nom

Rust parser combinator framework
MIT License
9.18k stars 792 forks source link

[Question] program nom for both run and compile time parsing? #1649

Open Kreijstal opened 1 year ago

Kreijstal commented 1 year ago

I see there is no "Discussions" tab on this repo so I'll just ask here, we can use nom to create parsers for own grammar, but sometimes this is useful in the code, is there a way to convert this parsing step in a procedural macro using nom? How would that work, or am I trying this the wrong way?

Geal commented 1 year ago

it's possible yes, see an example here: https://github.com/Geal/macro-parser