bijection/nearley-playground

Literally the best thing ever

kach opened this issue · 7 comments

kach commented

Hey! I'm the guy who made nearley, and I just stumbled onto your work here. This is amazing!

People have been asking for something like this since the beginning of time (see issues #106, #37, #68, #142, #78 on the issue tracker…). Would it be okay if I put links to nearley-playground on nearley.js.org, and also on the README?

Thanks! (And once again, this is so cool.)

Of course! Glad you like it :)

Nearley is really awesome.

kach commented

:D I'll go do that. Meanwhile, here's something fun I made with nearley-playground:

screen shot 2017-02-11 at 9 07 01 pm

Cool!

Btw now you can work on multiple grammars, and tests show all possible parses.

kach commented

Nice! I like the tab interface.

One thing that might be nice is an option to download a compiled .js file, like in step (3) of the "try online" interface for the PEGjs parsing library (https://pegjs.org/online).

P.S. Meanwhile, I fixed the built-in nearley-unparse algorithm to have a "bounded" mode that doesn't run off the deep end and get into infinite loops. It takes an integer bound as input and tries to generate random strings roughly uniformly from the set of strings within that bound.

+1 for the option to download a compiled .js file.

I have a weird issue with my grammar: it works fine without any ambiguity in the playground but the result is much more different using nearley-test after using nearleyc.

I would love to see how both generated javascript differ from each other.
@kach @bijection

Better doing than waiting 😄 here is the pull request with the download feature! #21