Hi, I've tried your library for creating programming language parser, all things seems be fine until I've reached recursion. I have code like this (simplified):
Compiler says: error[E0275]: overflow evaluating the requirement impl pom::Parser<u8>...
I've found call() and comb(), unfortunately, they don't accept passing additional arguments (like Context and AST in my case).
Maybe, I've missed something?
Hi, I've tried your library for creating programming language parser, all things seems be fine until I've reached recursion. I have code like this (simplified):
fn expr<'a>(n: AST, c: Context) -> Combinator<impl Parser<'a, u8, Output = AST>> { (oneof(b"<>=|~,^#$?@:'") + phrase(c.clone())).map(move |(v, e)| {...} | empty().map(move |_| n.clone()) } // fn phrase<'a>(c: Context) -> Combinator<impl Parser<'a, u8, Output = AST>> { noun(c.clone()) >> move |n: AST| expr(n, c.clone()) } // fn prg<'a>(c: Context) -> Combinator<impl Parser<'a, u8, Output = AST>> { phrase(c.clone()) - endp() }
Compiler says: error[E0275]: overflow evaluating the requirement
impl pom::Parser<u8>
... I've found call() and comb(), unfortunately, they don't accept passing additional arguments (like Context and AST in my case). Maybe, I've missed something?