Fork me on GitHub

@d4hines the idea has been tossed around a couple times, but the only implementation I'm aware of is my experiment which isn't super useable in practice.


My usage of core.logic was primarily motivated by a challenge to reverse-engineer output parse trees or fill in partial outputs. But if the main goal is to simply generate random inputs to a grammar (which most people really want), I think the implementation could be a lot cleaner, and leverage test.check.


The hardest part I think would be coming up with a good solution to lookahead and negative lookahead, while guaranteeing terminable generation...

Daniel Hines13:10:34

I'm a noob when it comes to this stuff. Do you need lookahead for an EBNF grammar?


I don’t think so, it’s just a nice feature that sometimes people take advantage of

Daniel Hines12:10:03

That's really cool!


Maybe this project is relevant ? We used it to generate data, also from regexps


When I wrote a generator for regexes I intentionally didn't try to support lookaheadbehinds


But it seems like something you could support with the same caveats as such-that


(And have it fail the same way, rather than infinite loop)