whats the difference between compiler, translator and intepreter
and how to create translator, for my own language??
Printable View
whats the difference between compiler, translator and intepreter
and how to create translator, for my own language??
In the computer world -
Interpreter - takes code and figures out what the instruction stream should be on the fly. Very slow. QBASIC is an interpreted language. You cannot run a QBASIC file outside of the QBASIC executable
Compiler - turns code into a separate .EXE file that will run on it's own.
Translator turns one language into another - example COBOL to C. These are generally used for porting legacy source code that is so old the machines it originally compiled on no longer exist.
Translating human languages by computer DOES NOT work well.
Making a translator is similar to creating an interpreted language, you simply parse the code and execute (or in this case turn it into a known statment in another language)
Attached is a C interpreter written in C. This will give you an idea on how to parse language statements.
Jim, I still haven't got an answer to this, so i wonder if you could tell me. How would you bypass the problem with left recursion without losing associative properties?