2 ms·
"Parsing with Derivatives". http://matt.might.net/papers/might2011derivatives.pdf http://matt.might.net/papers/might2011derivatives.pdf There's a lot of stuff
by carapace 8y ago
"Parsing with Derivatives". http://matt.might.net/papers/might2011derivatives.pdf http://matt.might.net/papers/might2011derivatives.pdf There's a lot of stuff about this online now
Or just use Prolog.
(I'm not joking. I've been messing with parsers and such in Prolog the past week or so and I'm just blown away. I'm happy but also I feel stupid for not learning it sooner. I've wasted so much time and effort. I've been working too hard. Just learn Prolog and then use it, the total time saved will pay for the learning curve by the end of the year.)
- kasbah 8y agoI am reading up on this a bit and it seems very interesting but I am not quite sure it would be able to fill the gap that something like Antlr fills. We want to generate parsers in various languages (JS, Python, Go) from a single grammar and existing implementations of "Parsing with Derivatives" seem to be experimental and mostly in functional languages. Prolog is really interesting too but how would it work in practice for our use case?
- carapace 8y agoAh, I misunderstood what you were asking about. My suggestions don't really apply so much to your case. You might take a look at the Meta-II metacompiler. It's really simple but by the same token it's trivial to port it to different languages. It's part of the basis for VPRI's PEG (Parser Expression Grammar) parser generators. https://en.wikipedia.org/wiki/META_II https://en.wikipedia.org/wiki/META_II http://www.bayfronttechnologies.com/mc_tutorial.html http://www.bayfronttechnologies.com/mc_tutorial.html