Can confirm, even the little training compiler we made at Uni for a subset of Java (Javali) had a backend and frontend.
I can’t imagine trying to spit out machine code while parsing the input without an intermediary AST stage. It was complicated enough with the proper split.
I have built single pass compilers that do everything in one shot without an AST. You are not going to get great error messages or optimization though.
Can confirm, even the little training compiler we made at Uni for a subset of Java (Javali) had a backend and frontend.
I can’t imagine trying to spit out machine code while parsing the input without an intermediary AST stage. It was complicated enough with the proper split.
I have built single pass compilers that do everything in one shot without an AST. You are not going to get great error messages or optimization though.
I can imagine;