News for hackers. Stuff that matters.
Re:Rewriting the Ruby Parser by munificent on Tuesday June 13, 2023 @01:38PM (#36313747)
> Interestingly, the actual syntax tree and related structures/functions are generated from the config.yml file and the templates inside the bin directory.

That makes a lot of sense. ASTs tend to be a very dumb but fairly verbose data structure. And, in C in particular where everything is more verbose, there ends up being a ton of boilerplate in the AST nodes.

In a language like Ruby with a very rich syntax, you end up needed a ton of different AST nodes.

Generating those from a simple declarative format makes maintaining that much easier.

There are no comments on this comment yet.