A multiphase single pass interpreter switches modes of execution. The
interpreter scans a program file in a scan phase until a tag signaling the
presence of a script language is encountered. The interpreter then
switches its mode to full parse phase where each line scanned is tokenized
and parsed. Tokens are replaced with their dynamic content, if any. When
the interpreter detects logic blocks, the interpreter changes its mode to
p-code generation phase and generates p-code for the lines of code within
the logic block. The generated p-code is then executed by the interpreter
in its p-code execution phase. The interpretation is performed in a single
pass through the program file.