Тёмный

Introduction to Lexical Analyzer 

Neso Academy
Подписаться 2,7 млн
Просмотров 132 тыс.
50% 1

Compiler Design: Introduction to Lexical Analyzer
Topics discussed:
1. Features of Lexical Analyzer.
2. Classification of Tokens.
3. Scanning and Analyzing Phases of the Lexical Analyzer.
4. Understanding how DFA helps in pattern matching in Analyzing Phase.
5. Understanding how comments and whitespaces are dealt with.
6. Working of Lexical Analyzer.
Follow Neso Academy on Instagram: @nesoacademy (bit.ly/2XP63OE)
Contribute: www.nesoacadem...
Memberships: bit.ly/2U7YSPI
Books: www.nesoacadem...
Website ► www.nesoacadem...
Forum ► forum.nesoacad...
Facebook ► goo.gl/Nt0PmB
Twitter ► / nesoacademy
Music:
Axol x Alex Skrindo - You [NCS Release]
#CompilerDesignByNeso #CompilerDesign #LexicalAnalyzer

Опубликовано:

 

20 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 46   
@74N
@74N 2 года назад
I have Compiler Design this semester and I'm sure I'm gonna rock it
@elizmelisia7261
@elizmelisia7261 2 года назад
Hi, how can I contact you?
@shrayanmandal2004
@shrayanmandal2004 Год назад
i want this confidence in my life
@shubhambhatt2704
@shubhambhatt2704 Год назад
How much did you score?
@arnoldsmith6584
@arnoldsmith6584 Год назад
jyada khush mat ho kuch nahi hoga
@PrasadTGS
@PrasadTGS Год назад
@@shubhambhatt2704 😂😂😂😂
@HumphreyTembo-d4p
@HumphreyTembo-d4p 5 месяцев назад
you the best teacher ever .....thank you sir for helping
@ShubhraneelChakraborty-cj8zm
@ShubhraneelChakraborty-cj8zm 5 месяцев назад
Can anyone hear explain about the epsilon transition from the state H to G for integers in C? Like what is it doing and why is it necessary (I had Automata last sem but I forgot some things 🙂).
@rajamoiz1977
@rajamoiz1977 Год назад
You are one of the best teacher in my life
@Epic_Fails200
@Epic_Fails200 2 года назад
Hello sir i love your video ❤ i am a student of ece so i request to make some more Playlist for ece student and again thankyou so much for making wonderful videos Thankyou sir🙏🏻
@jimbo5437
@jimbo5437 2 года назад
Great explanation as always!
@josuegisber8150
@josuegisber8150 2 года назад
This is amazing, thanks a lot!
@dollnguyenstudio9528
@dollnguyenstudio9528 Год назад
very good, sir. I could understand all, appreciate you so much
@BalaguruS-zp5qf
@BalaguruS-zp5qf 2 года назад
bro this semester I had compiler design as a subject my lecturer is so boring in his teaching so can update ur video in this course as soon as possible it will be more help full for me
@PrashantShrivastava-hy3bq
@PrashantShrivastava-hy3bq Год назад
Bro you commented the same thing in previous video 😆😆 You are hardcore roasting your lecturer 🤣🤣
@nithigd1014
@nithigd1014 2 года назад
please please upload all the videos soon as possible i have compiler design this semester.
@arjunkandaswamy1532
@arjunkandaswamy1532 Год назад
sir it is very good explanation can you please complete the playlist of compiler design
@billylee1802
@billylee1802 3 месяца назад
Very good and clear videos!
@MA-qi2gr
@MA-qi2gr 2 дня назад
At 8:30 Can we move from state 1 to state 3 directly with the input f and if it has a letter or digit after f, it uses the loop on 3?
@jalilio5065
@jalilio5065 2 года назад
Please upload full course as early as possible🌸🤕
@SailajaVishnubhatla
@SailajaVishnubhatla 7 месяцев назад
Which step is actually removing comments?is it preprocessing one or lexical analysis one?
@MA-qi2gr
@MA-qi2gr 7 дней назад
I had the same question!
@abhinavkv8486
@abhinavkv8486 Год назад
Which one is removing comments from HLL..? Lexical analyser or preprocessor
@MA-qi2gr
@MA-qi2gr 7 дней назад
I had the same question!
@rajeshprajapati4863
@rajeshprajapati4863 2 года назад
On 04:15 Can't we make self loop on H for (0-9) ?
@rishiupadhyay3956
@rishiupadhyay3956 2 года назад
If we create a self loop on H, the production rules describing this epsilon-NFA would become bit more. On the other hand, having the single epsilon transition from H to G is providing the same functionality. So, simpler and efficient approach.
@johnnygotti1568
@johnnygotti1568 6 месяцев назад
Google Gemini pointed me to your video when I asked how to parse a string into a format
@michaelaladejobi
@michaelaladejobi 8 месяцев назад
You are too brilliant!!!💯🔥🤍
@joelmirramos5096
@joelmirramos5096 4 месяца назад
You are the best!!!!
@ironmonkey1990
@ironmonkey1990 2 месяца назад
Thank you!
@shegyeabera
@shegyeabera 5 месяцев назад
Compiler design chapter 2.
@benyiwahamoah8674
@benyiwahamoah8674 Год назад
I wish you could have left your slides for us
@afro_habesha
@afro_habesha 2 года назад
Tnx lot
@bethechange4658
@bethechange4658 7 месяцев назад
Nice
@rajeshprajapati1851
@rajeshprajapati1851 2 года назад
Cool
@telugunewtons2304
@telugunewtons2304 Год назад
@shegyeabera
@shegyeabera 5 месяцев назад
Nomather !
@Nick-ui9dr
@Nick-ui9dr 2 года назад
I dont think NE SO will be two tokens.... First u just cant have a comment between a identifier or even start a comment just by side of a identifier... there need to be some space or else it will be counted as continued identifier which will nullify it. Secondly even if a analyzer is so stupid to allow that u cant insert a space or delimiter where it wasn't so in that case it will be NESO identifier. But if u look otherwise like u inserted a space NE dint end with ; or comma which again nullify NE as an identifier cause there need to be a comma at least to make it a valid identifier if u separating SO as something different. So most probably analyzer will reject everything after NE here up to the next line cause its senseless to parse corrupt or invalid data. Cause U might be showing errors giving all the wrong reasons. Better to show error at NE & grey out rest of line as invalid... Parse it only when NE is resolved And that too if or only if next line starts sensibly otherwise better to reject all lines up to u find a sensible new line that starts validly. Cause then all these lines most probably be the continuation of previous. Or errorful in themsheves. doesn't matter I guess. But like if there is some fault on 'for' loop header statement... no need to mark out its body as bad also. So if its clean code then display it as such. Btw! not saying your teaching any wrong that might be the way to teach things to newbies but in real world u don't do things that separate. Most probably u wud be doing parsing constructing instruction trees, constructing symbol table along with CFG or sematic analysis in the same go. Putting things aside for a time being that can be resolved later on in the parsing... like some external variable got used or call made but u haven't parsed that part of code where that function is so cant do sematic checking... so u will mark out unresolved things as such and eliminate them from list as u go along resolving them while parsing code down. And whatever left are the final errors. I mean few things u can say for sure they are errors on the spot but some u cant cause they might get resolved later on. I mean if I have to do things I wud have done it like this. Btw! humaari thinking assey hi hai kyunki hum decompiler type guy jayada hai compiler one sey. 😂
@Nick-ui9dr
@Nick-ui9dr 2 года назад
And u writing C compiler here so most probably u wudnt like to start state machine for integer and "IF" on the same node. Of course lots of thing can start at newline other than these three but lets say these three. So amount these three only "if" or an identifier can start at newline not a constant value... it cant be LHS value. So it ud be better if u fork it from identifier. like any newline can start with "i" or "_" ... if "i" it could be if or identifier ... then if "f" it could be if or identifier or else reject if and try validate identifier only. And within identifier u can insert numbers no problem. Its better if u build a app to create rules and autogenerate a parser according to those rules. That wud be less clumsier if not less technical. 🤪 In general when we make state machine like u saying state machines... I wud simply say a parshing logic. we will progress as a valid code can progress. And eliminate the probable possibilities as we encounter offence to some possibility or rule. And if we get to end exjusting all it sure is a error. So the more probalistic one that it could be the case u inform the user. I mean the more closer it was to some case of being ... that u inform the user about that u might have missed this or that. But then again all this when I am assuming it to be simple C case and u parsing from start of line.... or else now a days there are lots of additions like lamda notation... so of course your parser and analyzer need to accommodate for that. Or u might be creating compiler for your own liking or thing. 😂
@HumphreyTembo-d4p
@HumphreyTembo-d4p 5 месяцев назад
you the best teacher ever .....thank you sir for helping
@JHALAKHOTA
@JHALAKHOTA 8 месяцев назад