~icefox/garnetc#1: 
Next-gen compiler wishlist

Basically all the things I'd want to have in a perfect compiler, that I am really not going to work on any time soon.

Using tree-sitter for the grammar would be nice because then it would be easy to integrate with Helix or LSP servers.

Have a concrete syntax tree first which then can feed into other tools would probably be better than parsing straight to AST. Apparently tree-sitter gives you one already, so that's nice!

There was a good article I saw recently on Zig's parser and AST (data driven approach) but I can't heckin find it. Ugh.

Incremental parsing/query based architecture as described in the rustc compiler docs is probably a good idea.

Status
REPORTED
Submitter
~icefox
Assigned to
No-one
Submitted
1 year, 9 months ago
Updated
1 year, 8 months ago
Labels
T-LATER

~icefox 1 year, 8 months ago

Have a strict performance budget and test for regressions.

Good CST libraries in Rust: rowan and cstree. Learn from them.

The Austral compiler apparently has an in-memory database for various type and symbol stuffs, which is kinda how incremental compilers seem to be built anyway. Any good reason not to just use sqlite for this? Maybe.

~icefox 1 year, 8 months ago

Zig's Grand Bootstrapping Plan: https://github.com/ziglang/zig/issues/853 plenty to learn from there.

~icefox referenced this from #7 1 year, 8 months ago

Register here or Log in to comment, or comment via email.