How does an interpreter/compiler work? What is the difference between interpreter and compiler.
How does an interpreter/compiler work? What is the difference between interpreter and compiler.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Compilers
Compilers were the first sort of
translator program to be written. The
idea is simple: You write the program,
then hand it to the compiler which
translates it. Then you run the
result.
Interpreters
An interpreter is also a program that
translates a high-level language into
a low-level one, but it does it at the
moment the program is run. You write
the program using a text editor or
something similar, and then instruct
the interpreter to run the program. It
takes the program, one line at a time,
and translates each line before
running it: It translates the first
line and runs it, then translates the
second line and runs it etc.
Compiler characteristics:
processing the program
of machine- specific binary code
(executes) the resulting code
Interpreter characteristics:
analyzing and processing the program
intermediate code
another program