chumsky
chumsky copied to clipboard
Write expressive, high-performance parsers with ease.
Hi, I met a situation where I need to parse the first element by one parser, and the remaining by another parser. I tried to implement a custom parser, but...
For example, I have the following code: ```rs group(( a.recover_with(via_parser(empty())) a.or(b).recover_with(via_parser(empty())) )) ``` I would like to get one error like "expected a or b". There may be a problem...
Make the type of secondary errors vector generic. This will allow you to use `smallvec` or the arena in this location for optimization purposes, as well as use `usize` if...
Test content: ```rs use chumsky::extra::Err; pub fn parser>> { let b = just("_").then(just("a").labelled("al")).ignored(); let custom = custom(move |input| input.parse(b)); custom.labelled("bl").as_context() } assert_eq!( parser().parse("_c").into_output_errors(), ( None, vec, used significantly throughout the grammar. To avoid re-creating the parser each time it's needed (currently imposing a significant performance penalty on my...
I want to parse a tab separated values file, where the number of things in every line after the first is exactly equal (up to some things at the start,...