Building a Parser from scratch. Lecture [2/18]: Numbers | Strings

  Рет қаралды 39,420

Dmitry Soshnikov

Dmitry Soshnikov

Күн бұрын

Пікірлер: 37
@DmitrySoshnikov-education
@DmitrySoshnikov-education 7 ай бұрын
⭐ *New Coupons:* www.dmitrysoshnikov.education/p/parser-from-scratch/?coupon_code=RDP5_29 | www.udemy.com/course/parser-from-scratch/?couponCode=EF968F0D3A9E74891DDC
@edwingarcia5043
@edwingarcia5043 3 жыл бұрын
People help me: The part s += this._cursor++ // skip " This is adding the length of the string to the variable "s" So: string = 'ok' Results in: 'ok4 the closing quote is not being included, but I try with this: s += string[this._cursor++] // skip " And it works now.
@DmitrySoshnikov-education
@DmitrySoshnikov-education 3 жыл бұрын
Great catch on the typo! And yes, your solution is correct. That is also why we switch to automatic regexp tokenizer, to avoid manual handling and typos like this.
@SillyNaughty
@SillyNaughty 3 жыл бұрын
These are excellent content! Naming variables "string" and "number" tho... super naughty
@DmitrySoshnikov-education
@DmitrySoshnikov-education 3 жыл бұрын
Thanks! That's why they are switched to generic tokens in the next video ;)
@tylergoodwyn1534
@tylergoodwyn1534 4 жыл бұрын
Your courses are amazing. Looking forward to this series
@DmitrySoshnikov-education
@DmitrySoshnikov-education 4 жыл бұрын
Thanks, glad you like it, and glad to see more engineers interested in deeper topics.
@TarekkMA
@TarekkMA 4 жыл бұрын
Thanks a lot for this awesome series. You are amazing.
@philperry6564
@philperry6564 4 жыл бұрын
Do you teach how to code a Parse generator in your Parsing Algorithms course or do you use an existing one? If not, do you have a course or recommend one or a book that shows how to do that?
@DmitrySoshnikov-education
@DmitrySoshnikov-education 4 жыл бұрын
The "Parsing Algorithms" class is a combination of the theoretical part covering automatic parsing techniques (LL, LR), and the practical part - building a parser using Syntax tool (the language-agnostic parser generator). From the first part you would understand how to build a parser generator, but we don't go into detailed implementation, mainly high-level theory. This theory should be enough though to build your own parser generator.
@philperry6564
@philperry6564 4 жыл бұрын
@@DmitrySoshnikov-education Sounds good, will probably buy your course next month.
@supersim1357
@supersim1357 Жыл бұрын
To solve the homework, we could simply add the condition: || string[0] === "''", to the initial if statement in the tokenizer then simply change the while statement from: while[string[this.cursor] !== '"' && !this.isEOF()); to while[string[this.cursor] !==string[0] && !this.isEOF());
@DmitrySoshnikov-education
@DmitrySoshnikov-education Жыл бұрын
That's good one, congrats! Also, in the following lectures we switch to automatic (RegExp-based) tokenizer which does this under the hood.
@supersim1357
@supersim1357 Жыл бұрын
@@DmitrySoshnikov-education I appreciate your feedback
@JorgeLopez-ec2bn
@JorgeLopez-ec2bn 3 жыл бұрын
Very interesting videos. Why are some of them (i.e. Lecture 3) marked as private?
@DmitrySoshnikov-education
@DmitrySoshnikov-education 3 жыл бұрын
Hi Jorge, you can enroll to full class here: dmitrysoshnikov.com/courses/parser-from-scratch/
@JorgeLopez-ec2bn
@JorgeLopez-ec2bn 3 жыл бұрын
@@DmitrySoshnikov-education Thanks for your response but that's a pay option. Nothing against it but I thought it was a problem with the video.
@smkshep
@smkshep 3 жыл бұрын
why are some of them now unlisted/private, for example 3rd part? :( awesome videos dude!
@DmitrySoshnikov-education
@DmitrySoshnikov-education 3 жыл бұрын
Thanks, glad you find it's useful. The full course is now available at dmitrysoshnikov.com/courses/parser-from-scratch/
@ChillerDragon
@ChillerDragon 2 ай бұрын
@@DmitrySoshnikov-education seems like your ssl expired o.O
@ivandrofly
@ivandrofly 5 ай бұрын
4:24
@DanielTateNZ
@DanielTateNZ Жыл бұрын
Number.isNan isn't a function... shouldn't it be isNaN? This tokenizer doesn't seem to work at all. Since out of index is undefined it should be something like while (!Number.isNaN(Number(string[this._cursor]))) {
@DmitrySoshnikov-education
@DmitrySoshnikov-education Жыл бұрын
Yes, it's isNaN of course, see 3:36. Glad you figured this out - this lecture is also transitional between the RegExp based tokenizer.
@imfastboi
@imfastboi 3 жыл бұрын
Oh .... I'm Kinda disappointed since the videos were on KZbin I thought that I would be able to find the whole course but it's paid ... I'm not saying that you selling your courses is bad because everybody needs to live but I just didn't understand from the start that it was supposed to be paid .
@xspydazx
@xspydazx 3 жыл бұрын
some of the videos were actually up for a while but i think he took them down , all the videos he is sharing are actually here... the rest are on the courses blocked off. github.com/spydaz/SpydazWeb-AI-_Emulators/tree/master/LexParseEval i began making here in visual basic ... After a while you will begin to figure out from the different project he has on GitHub (Letter & Eva + Syntax)... from the BNF files ... you will find all the Regex you need there and if you use java you can generate the tokenizer/parser...... and following the essentials of interpretation bits you can begin the eval function ... as the processes are the same as well its possible to create a mini lang.(I don't use java so its not a course for me to enjoy)....but it looks very good ... you may need to watch the videos a few times ....
@DmitrySoshnikov-education
@DmitrySoshnikov-education 4 жыл бұрын
⭐ *Enroll:* dmitrysoshnikov.com/courses/parser-from-scratch/ 📚 Udemy: www.udemy.com/course/parser-from-scratch/?referralCode=E3BF78C54F214B02775E 👉 DS Education: www.dmitrysoshnikov.education/p/parser-from-scratch/
@hellamaxine
@hellamaxine 4 жыл бұрын
Will you make the other lectures available on KZbin for free?
@messiahwesley2418
@messiahwesley2418 3 жыл бұрын
Sorry to be offtopic but does any of you know a way to log back into an instagram account..? I stupidly forgot my password. I appreciate any tricks you can offer me.
@daviddustin1773
@daviddustin1773 3 жыл бұрын
@Messiah Wesley instablaster ;)
@messiahwesley2418
@messiahwesley2418 3 жыл бұрын
@David Dustin Thanks so much for your reply. I got to the site through google and I'm in the hacking process atm. Looks like it's gonna take quite some time so I will reply here later with my results.
@messiahwesley2418
@messiahwesley2418 3 жыл бұрын
@David Dustin It worked and I actually got access to my account again. I am so happy! Thanks so much you really help me out!
@babakfp
@babakfp 3 жыл бұрын
OMG, it's soooooooooooooooooooooooooo hard :/
@edwingarcia5043
@edwingarcia5043 3 жыл бұрын
Yeah! Btw did you improve in doing this? Or did you just stop learning about parsing?
@babakfp
@babakfp 3 жыл бұрын
@@edwingarcia5043 I was learning to create a parser for the Prettier and then to create a prettier plugin for EJS. I stopped learning it because I lost interest...
Building a Parser from scratch. Lecture [1/18]: Tokenizer | Parser
14:02
Dmitry Soshnikov
Рет қаралды 159 М.
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
Arenas, strings and Scuffed Templates in C
12:28
VoxelRifts
Рет қаралды 100 М.
Object-Oriented Programming is Embarrassing: 4 Short Examples
28:03
Brian Will
Рет қаралды 2,1 МЛН
Recursive Descent Parsing
29:02
hhp3
Рет қаралды 75 М.
Parsing Explained - Computerphile
14:58
Computerphile
Рет қаралды 248 М.
C++ Super Optimization: 1000X Faster
15:33
Dave's Garage
Рет қаралды 332 М.
Fast Inverse Square Root - A Quake III Algorithm
20:08
Nemean
Рет қаралды 5 МЛН
Functional Parsing - Computerphile
22:46
Computerphile
Рет қаралды 140 М.
Grammars, parsing, and recursive descent
30:31
Kay Lack
Рет қаралды 21 М.