Parsing Structs & Struct / ArrayList Instantiations | Writing a Custom Language Parser in Golang

  Рет қаралды 704

tylerlaceby

tylerlaceby

2 ай бұрын

This video covers the parsing of structs and struct/ array instantiations using the pratt parsing technique. This is episode 5 of the language series.
⭐⭐ GitHub Repo ⭐⭐
- github.com/tlaceby/parser-series
🔔 JOIN THE COMMUNITY 🔔
kzfaq.info... -- Subscribe xD
----------------------------------------
-- Social Links --
Discord - / discord
GitHub - github.com/tlaceby/

Пікірлер: 19
@Somfic
@Somfic 24 күн бұрын
please continue the series!! this is awesome
@rakinar2
@rakinar2 2 ай бұрын
Amazing series! Would also love to see another series about building a compiler and type checking.
@DoubleDotStudio
@DoubleDotStudio Ай бұрын
I agree. It would be nice to see other series that build on this one.
@XannMagus
@XannMagus 9 күн бұрын
I'm following along implementing this in Rust. I have used enums to model the AST node types, and I already had written a lexer, where I use an FSM instead of regex to tokenize the input. I also have an enum for the different operators, which I use in place of the Token enum in expressions. It makes it a lot more verbose but also easier to reason about at least for me, notably a simple `if let` makes it trivial to check the kind of Expression for the instantiation parsing. Thanks for the series, and I hope you continue, I really like your way of explaining stuff and keeping the errors in makes it more relatable (and satisfying when I can spot bugs before you realize they exist) :)
@tylerlaceby
@tylerlaceby 8 күн бұрын
Haha. The panic that comes about when I realize I made an error during recording is unmatched. I usually don't write any code beforehand or do more than one take so when I make.mkstakes you can hear the fear in my voice lmao. Glad you are doing it the Rust way. That's awesome to hear.
@DoubleDotStudio
@DoubleDotStudio Ай бұрын
This is an amazing series. Keep it going. It's taken quite a while for me to follow this one since I've been quite busy with other projects but this one is as good as ever. Love your videos man can't wait for the next one. :)
@StregasGate
@StregasGate 26 күн бұрын
This series is fantastic!
@_slier
@_slier 20 күн бұрын
instead of using reflection( which is slow ), you can simply use type assertion.. something like ` foo, ok := bar.(your_type)`
@Virgoblack97
@Virgoblack97 2 ай бұрын
Must be nice being able to create stuff like this , can you guide me on what book to read
@tylerlaceby
@tylerlaceby 2 ай бұрын
Awww thanks. I suggest the dragon book. And crafting interpreters by throrston bell.
@Virgoblack97
@Virgoblack97 2 ай бұрын
@@tylerlaceby thank you
@marinbb6946
@marinbb6946 28 күн бұрын
What mechanical keyboard were u using in ur previous videos it sounds really nice im interested
@tylerlaceby
@tylerlaceby 24 күн бұрын
I don't know sadly. It was a cheap keyboard off Amazon. It was a red dragon I think.
@liontv3297
@liontv3297 2 ай бұрын
which theme are you using?
@tylerlaceby
@tylerlaceby 2 ай бұрын
I think this is Ayu
@andrewkraevskii
@andrewkraevskii 2 ай бұрын
Your thumbnail says it is 4th part not 5th
@tylerlaceby
@tylerlaceby 2 ай бұрын
Crap. Thanks 😊
@kittyboochanyesbongono8467
@kittyboochanyesbongono8467 2 ай бұрын
Remember the creating your own programming language tutorial with JavaScript and TypeScript? Can you make a tutorial on how to have Deno make it somehow to work, yeah, like the apps you need to get for the playlist
@tylerlaceby
@tylerlaceby 2 ай бұрын
Well the concept is the same for basically any language. For example I have write a nearly identical parser to this in C, C++, Zig, Rust, TS and of course Go. So you just need to translate the go Syntax to TS or whatever language you want. Then you can follow along without any issue even though we’re using different languages. If you have more questions reach out in my discord servers help thread. Cheers.
DO YOU HAVE FRIENDS LIKE THIS?
00:17
dednahype
Рет қаралды 65 МЛН
Каха ограбил банк
01:00
К-Media
Рет қаралды 11 МЛН
Мы никогда не были так напуганы!
00:15
Аришнев
Рет қаралды 5 МЛН
I made a coding language... In Scratch!
3:21
spooderCode
Рет қаралды 3,1 М.
Dynamic Arrays in C
11:46
Dylan Falconer
Рет қаралды 64 М.
100+ Linux Things you Need to Know
12:23
Fireship
Рет қаралды 60 М.
ARRAYLIST VS LINKEDLIST
21:20
Core Dumped
Рет қаралды 52 М.
How to Install Scoop on Windows 11
1:03
BC Ko
Рет қаралды 1,3 М.
Самый дорогой кабель Apple
0:37
Romancev768
Рет қаралды 3,2 М.
ИГРОВОВЫЙ НОУТ ASUS ЗА 57 тысяч
25:33
Ремонтяш
Рет қаралды 329 М.
Мой инст: denkiselef. Как забрать телефон через экран.
0:54
YOTAPHONE 2 - СПУСТЯ 10 ЛЕТ
15:13
ЗЕ МАККЕРС
Рет қаралды 170 М.
Hisense Official Flagship Store Hisense is the champion What is going on?
0:11
Special Effects Funny 44
Рет қаралды 2,6 МЛН