Creating a programming language is a dream for many programmers. In this video I go over how you can create a simple compiler a for a programming language that we designed and interpreted in the previous video. This will help you get started creating and understanding how make and gain an intuition for your own compiler and 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.
Previous Video (Language + Interpreter):
[ Ссылка ]
Learning Resources:
- @TsodingDaily Porth Series: [ Ссылка ]
- SonicTK ASM_Tutorial (@YiLiangSiew) [ Ссылка ]
- @ImmoLandwerth Compiler Playlist: [ Ссылка ]
Program Memory Layout (image):
[ Ссылка ]
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
_____________
program1.oll:
_____________
READ
READ
SUB
JUMP.EQ.0 L1
PRINT "not equal"
HALT
L1:
PRINT "equal"
HALT
_____________
_____________
program2.oll:
_____________
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 -
Link: [ Ссылка ]
- Time Codes -
0:00 - Intro
0:15 - Video Outline
0:25 - Compiler Overview
0:51 - Assembly Specifics
1:40 - Learning material
2:00 - Setting up the compiler files
2:13 - 1. Parser
4:20 - 2. Assembly Translation
12:40 - 3. Assembler (nasm)
12:50 - 4. Linker (gcc)
13:28 - ASM .data PRINT (printf)
16:50 - ASM .bss READ (scanf)
18:19 - Testing the compiler
18:39 - Outro
- Hashtags -
#programming
#coding
#interpreter
#programminglanguage
#python
#compiler
- Search Terms -
compiler design
making a programming language
making my own programming language
programming language interpreter
write a program
computer program
python tutorial for beginners
compiler design playlist
assembly language
x86_64 instruction set
Intel Syntax
Ещё видео!