COMPSCI 61A Lecture 21: Interpreters

24 views2 pages
28 Jul 2016
School
Professor
zogo39484755 and 6 others unlocked
COMPSCI 61A Full Course Notes
22
COMPSCI 61A Full Course Notes
Verified Note
22 documents

Document Summary

Computers can execute programs written in many different programming languages. Computers only deal w machine languages (0s and 1s) where statements are direct commands to the hardware. Programs written in languages like python are compiled or translated, into these machine languages from dis import dis dis stands for disassembler. Compilers are complicated, and the topic of future courses. Interpreters: programs that execute other programs written in a particular language. Python interpreter is a program written in c. To create a new programming language, we either need a: specification of the syntax and semantics of the language canonical implementation of either a compiler or interpreter for the language. Text --> parser --> expressions --> evaluator --> values. Take in text and perform syntactic analysis to convert into expressions the evaluator can understand. Read in expressions and perform semantic analysis to evaluate the expression and output corresponding values. Building an interpreter for a language is a lot of work.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers