Ok, so I have some understanding about parsers and compilers, at least the basics of how it works, and i've written a calculator and a really small toy language that compiles to another high-level language. Now if i want to write a complete language (by complete, i mean that it can be evaluated) is it bad to write the parser in some easy scripting language (like Python), convert it to my own "bytecode" and implement a small VM in C/C++?

I'm not exactly worried about performance right now, but if this is a "wrong way" to do it, i don't wanna waste my time. Also, all languages i've seen have been implemented in only one low-level language, like C, or they already have a self-hosting compiler. Is there any language compiler/interpreter implemented in this way?

Related posts

Recent Viewed