Hacker News new | ask | show | jobs
by ga2arch 3511 days ago
Awesome, one of the most fun i had at university was building a Uri parser with prolog.

After i discovered that you could define operators i built a combinatorial parser, something akin to https://hackage.haskell.org/package/parsec (of course nowhere as powerful) with similar syntax and do notation. https://gist.github.com/ga2arch/e8904177f722c6560e37

And i didn't have to define backtracking because it is handled by prolog itself.