bitemyapp / bitemyapp/mentats

Hoon parser in Rust

Open
#6 3 comments 0 reactions 2 assignees Claimed by @marcusmiguel View on GitHub
Dominant language
No language data
Stars
7
Forks
0
PR merge metrics
No merged PRs in 30d

Description

I've successfully prototyped something with the CST yielded by the treesitter grammar at https://github.com/urbit-pilled/tree-sitter-hoon

I'll see if I can open source what I did to share more context.

Main thing to be aware of here is that the old `watt.y` grammar for the bison parser generator was *very* gnarly and used a glr parser. We'd want to try to use a maximal-munch lexer to simplify the grammar into a top-down grammar that yields an AST. One of the things we'll need to do to make this tractable is to triage which Hoon runes are problematic grammatically and which ones are not. We should formally document/validate that and check it into source control so that nobody needs to do the legwork to dig that information up again. I'll ask around to see if this exists already or not.]

Update: that information isn't available yet but [frodwith](https://github.com/frodwith/) is working on a Hoon parser and will likely have that information at some point.

https://jasone.github.io/2007/01/11/parser-generation-algorithms/

I was able to snag an archive of the old watt (old name for Hoon) grammar here: https://github.com/bitemyapp/urbit/blob/483497fd79cf1cd74fb6960cb57ada6de0bbb251/p/watt.y

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.