Relation between REPL, interpreter and compiler

后端 未结 3 1697
挽巷
挽巷 2021-01-06 08:06

From Wikipedia:

The REPL is commonly misnamed an interpreter. This is a misnomer—many programming languages that use compilation (including byte

3条回答
  •  走了就别回头了
    2021-01-06 08:23

    This maybe not a good answer, just some notes,

    • JavaScript in IE 6.0 doesn't come with a REPL.

    • REPL for compilers maybe look like interpreters as well, if the language can be parsed in one time, forward only. The compiler may insert breakpoint after each compiled statement, do the execution until it reaches the breakpoint, then returned back to user, wait for the next input line, and repeat. Finally, all input lines are compiled, and executed as well.

提交回复
热议问题