Перейти к содержимому

A Compiler For Our Own Programming Language // Full Guide

bvdl․io

0:00 / 0:00

A Compiler For Our Own Programming Language // Full Guide

85 824 просмотра · 3 г. назад
bvdl․io
29,5 тыс. подписчиков
85 824 просмотра · 3 г. назад
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):    • Making a Programming Language & Interprete...   Learning Resources: - ‪@TsodingDaily‬ Porth Series:    • Porth   SonicTK ASM_Tutorial (‪@YiLiangSiew‬) https://sonictk.github.io/asm_tutorial/ - ‪@ImmoLandwerth‬ Compiler Playlist:    • Building a Compiler   Program Memory Layout (image): https://en.wikipedia.org/wiki/Data_se... 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:    • 🧈 Lofi (Royalty Free Music) - "BUTTER" by ...   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