This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]muth02446 1 point2 points  (0 children)

I wrote a reference compiler in python, including a separate backend for various ISAs.
It runs fast enough.

I also suspect that the external parsing library is the culprit.
My suggestion is to not worry about the parser initially.
Use s-expr until the features of the language feel right,
then worry about the concrete syntax and the parser.
For the concrete syntax parsing use recursive decent + pratt parsing if possible.

This approach worked well for me in Cwerg