filmov
tv
Making a Programming Language & Interpreter in under 10 minutes!
Показать описание
Creating a programming language is a dream for many programmers. In this video I go over how you can create a simple programming language and in interpreter for that language so you can run programs written in your own programming language. This will help you get started creating and understanding how make your own (more complex) programming language.
Make sure to let me know in the comments if you want to see this language being expanded. For the ability to do things such as assign variable or call functions.
Disclaimer:
The language (Our Little Language (.oll)) is by far not a complete language, and the interpreter only expects perfectly written code. Don't use this for production purposes, and only use it for the educational purpose of learning about creating and interpreting programming languages.
The Instruction in Our Little Language (.oll) are:
PUSH
POP
ADD
SUB
PRINT
READ
JUMP.EQ.0
JUMP.GT.0
_____________
_____________
READ
READ
SUB
JUMP.EQ.0 L1
PRINT "not equal"
HALT
L1:
PRINT "equal"
HALT
_____________
_____________
_____________
READ
JUMP.EQ.0 L1
LOOP:
PUSH 2
SUB
JUMP.EQ.0 L1
JUMP.GT.0 LOOP
PRINT "odd"
HALT
L1:
PRINT "even"
HALT
_____________
- Music -
- Time Codes -
0:00 - Intro
0:04 - What is an interpreter
0:37 - Stack based languages
1:31 - Our Language Instructions
2:58 - Example .oll programs
4:16 - Writing two .oll programs
4:26 - Creating interpreter - parsing
6:40 - Creating interpreter - stack
7:28 - Creating interpreter - execution
9:22 - Running our programming language
10:10 - Outro
- Hashtags -
#programming
#coding
#interpreter
#programminglanguage
#python
#compiler
- Search Terms -
making a programming language
making my own programming language
programming language interpreter
write a program
computer program
python tutorial for beginners
Make sure to let me know in the comments if you want to see this language being expanded. For the ability to do things such as assign variable or call functions.
Disclaimer:
The language (Our Little Language (.oll)) is by far not a complete language, and the interpreter only expects perfectly written code. Don't use this for production purposes, and only use it for the educational purpose of learning about creating and interpreting programming languages.
The Instruction in Our Little Language (.oll) are:
PUSH
POP
ADD
SUB
READ
JUMP.EQ.0
JUMP.GT.0
_____________
_____________
READ
READ
SUB
JUMP.EQ.0 L1
PRINT "not equal"
HALT
L1:
PRINT "equal"
HALT
_____________
_____________
_____________
READ
JUMP.EQ.0 L1
LOOP:
PUSH 2
SUB
JUMP.EQ.0 L1
JUMP.GT.0 LOOP
PRINT "odd"
HALT
L1:
PRINT "even"
HALT
_____________
- Music -
- Time Codes -
0:00 - Intro
0:04 - What is an interpreter
0:37 - Stack based languages
1:31 - Our Language Instructions
2:58 - Example .oll programs
4:16 - Writing two .oll programs
4:26 - Creating interpreter - parsing
6:40 - Creating interpreter - stack
7:28 - Creating interpreter - execution
9:22 - Running our programming language
10:10 - Outro
- Hashtags -
#programming
#coding
#interpreter
#programminglanguage
#python
#compiler
- Search Terms -
making a programming language
making my own programming language
programming language interpreter
write a program
computer program
python tutorial for beginners
Комментарии