인터프리터
런타임에 코드를 한 줄씩 실행.
An interpreter executes code directly, translating and running one statement at a time without creating a standalone executable. This enables interactive development and immediate feedback.
Characteristics:
- No compilation step: Execute immediately
- Line-by-line execution: Process as you go
- Runtime translation: Slower than compiled code
- Platform independence: Same source runs anywhere with interpreter
graph LR
Center["인터프리터"]:::main
Rel_compiler["compiler"]:::related -.-> Center
click Rel_compiler "/terms/compiler"
classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
linkStyle default stroke:#4b5563,stroke-width:2px;
🧒 5살도 이해할 수 있게 설명
인터프리터는 외국어 문장 하나를 읽고, 그 의미를 알려주고, 다음 문장으로 넘어가는 번역가와 같습니다. 완전히 번역된 책을 읽는 것보다 느리지만, 즉시 이해할 수 있습니다!
🤓 Expert Deep Dive
트리 워킹 인터프리터는 AST 노드를 직접 실행합니다. 바이트코드 인터프리터는 중간 형태로 컴파일합니다. 트레이싱 JIT는 핫 패스를 최적화합니다.
📚 출처
5. builtin.com
6. youtube.com
9. python.org
10. wikipedia.org