← Back to context

Comment by Snuggly73

3 days ago

looking at the "att" branches (excuse my unhealthy curiosity) I can only say - "jesus fucking christ".

from the old parser ast -> to json -> to new ast representation (that is basically again copy of the old one) -> to some new incomplete bytecode generation

im sure there is some good explanation, but....why?! :)

I've been looking for a way to decouple legacy parser from the rest of the compiler, plus create a way to dump parser output in a readable form. Unfortunately, the coupling is too tight there. In my own compilers all the outputs of all the phases are serializable.

In the end I've just reanimated the original parser generator and progressed to full Java 7 syntactically (-att5 branch), but there are some major obstacles with bytecode.

  • i thought it might be something like this (still a weird overkill), but if you are effectively replacing the parser with new peg and replacing the backend with something new - then there is nothing left - just start from scratch :)

    • Well, I tried to do that in phases but we (me + Claude + Codex) failed. But I managed to start from scratch: https://github.com/7mind/pyjopa - this thing works, it's insane but it works. The test suite is much smaller and there are still major limitations, but it damn passes some real tests.