5 ms·
Hi, I've written recursive descent in JS similar to Brandon's examples. Do you have any examples of what usage of this library (or parser combinators in general
by svachalek 5y ago
Hi, I've written recursive descent in JS similar to Brandon's examples. Do you have any examples of what usage of this library (or parser combinators in general) would look like? I found a few docs about the idea and it makes sense at a high level but I haven't been able to turn that into a clear idea of what such a parser looks like in practice.
- DylanSp 5y agoIt's Haskell, not Typescript, but http://dev.stephendiehl.com/fun/002_parsers.html http://dev.stephendiehl.com/fun/002_parsers.html goes over how parser combinators work and how to use them. I've also got a simple example on my github, https://github.com/DylanSp/three-pass-compiler https://github.com/DylanSp/three-pass-compiler.
- mirekrusin 5y agorfc4180 looks like this [0] [0] https://github.com/preludejs/parser/blob/master/rfc4180.ts https://github.com/preludejs/parser/blob/master/rfc4180.ts