Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scripting language interpreter source code to learn from

I want to read, and learn from, the source code of a scripting language's interpreter/compiler. What scripting language interpreter/compiler has the simplest, cleanest, and easiest to read source code? I would prefer it to be written in C/C++ (what else are compilers written in anyway?) because I'm planning on writing a compiler in C.

like image 644
slartibartfast Avatar asked Oct 18 '11 00:10

slartibartfast


People also ask

What is the source code in a scripting language?

Source code is the list of human-readable instructions that a programmer writes—often in a word processing program—when he is developing a program. The source code is run through a compiler to turn it into machine code, also called object code, that a computer can understand and execute.

Does interpreter require source code?

An interpreter is a computer program, which converts each high-level program statement into the machine code. This includes source code, pre-compiled code, and scripts. Both compiler and interpreters do the same job which is converting higher level programming language to machine code.

What is best scripting language to learn?

The Best Scripting Languages To KnowPHP: PHP is an open-source scripting language that is frequently used in back-end web development. Python: Python is known for its concise syntax. It requires less typing than many other languages. Ruby: Ruby is one of the easiest scripting languages to learn.

Which scripting language should I learn first?

Python. Python is always recommended if you're looking for an easy and even fun programming language to learn first. Rather than having to jump into strict syntax rules, Python reads like English and is simple to understand for someone who's new to programming.


2 Answers

Take a look at lua, you can go through the firsts versions of the programming language and see how it has evolved. It's written in C and has a clean and nice code. You can write a compiler in almost every programming language, but C has been the one that most programmers chose.

like image 97
Eder Avatar answered Oct 01 '22 09:10

Eder


The CPython interrupter has been around for quite some time and I would imagine that it would be very useful to you.

like image 33
Kurtis Nusbaum Avatar answered Oct 01 '22 10:10

Kurtis Nusbaum