Comment

Comment by ccmcarey

I've been looking at parser generators recently in an effort to begin writing my own simple interpreted language.

My end goal is a self hosted language.

My first attempt was writing a recursive descent parser by hand: https://gist.github.com/cmcarey/eee1571721141c356d4f61b453a6...

This didn't work so well (badly structured as well as finding out my grammar was ambiguous after I'd written 600 lines of parser code).

Looking into alternative ways to write a parser, I've seen the usual yacc/bison/ANTLR type tools and relevant discussions here on HN.

Owl looks fantastic and probably exactly what I'm looking for. Fantastic interactive page where you enter the grammar and code and it shows a visual representation of the parse tree: https://ianh.github.io/owl/try/#example

parent ccmcarey 8 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton