4 ms·
Good stuff. I have 2 questions: 1. Is there a Pasukon grammar for JavaScript/ES6? 2. Is there a Pasukon grammar for Pasukon grammars?
by galaxyLogic 6y ago
Good stuff. I have 2 questions:
1. Is there a Pasukon grammar for JavaScript/ES6?
2. Is there a Pasukon grammar for Pasukon grammars?
- gosukiwi 6y ago1. Nope, I still need to make some more example grammars :) 2. Yup: https://github.com/gosukiwi/Pasukon/blob/master/lib/grammar.pasukon https://github.com/gosukiwi/Pasukon/blob/master/lib/grammar....
- galaxyLogic 6y agoI find (2.) rather interesting. A parser than can parse its own grammar definitions. A language that can define itself.
- gosukiwi 6y agoYeah it's pretty cool, if I say so myself :) It parses itself (using a pre-compiled AST) to parse other user-defined grammars. Initially I started using PEGjs, and then swapped once it was ready.
- brundolf 6y agoUnfortunately JavaScript is up there with C++ when it comes to sheer number of syntaxes, so it'd be a pretty substantial task. Not that it isn't worth doing, but I'm not surprised this example wasn't available at launch.