Backus-Naur Form

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • BNF, or Backus-Naur form is an elegant and succinct way of expressing a grammar in very few lines. Find out more about how this works in today's random Wednesday tutorial!
    Content from Wikipedia was displayed in this video, and is accessible at the following URL: en.wikipedia.or...
    The content is licensed CC-BY-SA-3.0
    Full Text: creativecommon...
    = 0612 TV =
    0612 TV, a sub-project of NERDfirst.net, is an educational RUclips channel. Started in 2008, we have now covered a wide range of topics, from areas such as Programming, Algorithms and Computing Theories, Computer Graphics, Photography, and Specialized Guides for using software such as FFMPEG, Deshaker, GIMP and more!
    Enjoy your stay, and don't hesitate to drop me a comment or a personal message to my inbox =) If you like my work, don't forget to subscribe!
    Like what you see? Buy me a coffee → www.nerdfirst.n...
    0612 TV Official Writeup: nerdfirst.net/0...
    More about me: about.me/lcc0612
    Official Twitter: / 0612tv
    = NERDfirst =
    NERDfirst is a project allowing me to go above and beyond RUclips videos into areas like app and game development. It will also contain the official 0612 TV blog and other resources.
    Watch this space, and keep your eyes peeled on this channel for more updates! nerdfirst.net/
    -----
    Disclaimer: Please note that any information is provided on this channel in good faith, but I cannot guarantee 100% accuracy / correctness on all content. Contributors to this channel are not to be held responsible for any possible outcomes from your use of the information.

Комментарии • 254

  • @gabriel-oc4pt
    @gabriel-oc4pt Год назад +16

    9 years later and this vid is still helping students out (at least it helped me tremendously thank you!) 🙏

    • @NERDfirst
      @NERDfirst  Год назад +1

      Hello and thank you very much for your comment! Great to hear you found the video useful =)

    • @mono8935
      @mono8935 Год назад

      Oh yess!

    • @Adozerec
      @Adozerec Год назад

      Fuckyeaaaaah

  • @realeques
    @realeques 10 лет назад +39

    This i need in my playlist ! because:
    ::= |

    • @NERDfirst
      @NERDfirst  10 лет назад +7

      Hahaha, good application!
      Thank you for your comment =)

  • @Cronay
    @Cronay 8 лет назад +61

    Evne though this video is already 2 years old I wanted to say thank you. Wel explained.

    • @NERDfirst
      @NERDfirst  8 лет назад +3

      +Cro nay Thank you very much for your comment! Glad to be of help =)

    • @designbulk
      @designbulk 8 лет назад

      +lcc0612 Very nice job man! You described it extremely well! Thank you :)

    • @NERDfirst
      @NERDfirst  8 лет назад +2

      +designbulk You're welcome! Glad you liked the video =)

    • @oprabin
      @oprabin 8 лет назад +1

      Now it's almost 3.
      and I sill thank him.

    • @NERDfirst
      @NERDfirst  8 лет назад +5

      You're welcome =) Always good to hear my work has been useful!

  • @prabhusingh7481
    @prabhusingh7481 10 лет назад +12

    You made it sound so easy and comprehensible. Clarity on fundamental ideas is the crux of this video. Great job!.

    • @NERDfirst
      @NERDfirst  10 лет назад +1

      Hello, and thank you so much for your comment. I'm really happy you found this video helpful!

  • @PranavSharma01
    @PranavSharma01 8 лет назад +1

    You explained it well and as someone said in the comments below that your hand movements do not make this video boring at all. Thank you for doing this video.

    • @NERDfirst
      @NERDfirst  8 лет назад

      +Pranav Sharma Hello and thank you very much for your comment! Glad the hand movements weren't too distracting =)

  • @emilyw6762
    @emilyw6762 8 лет назад +2

    i like all your hand gestures, they keep me focused ! thanks for this awesome video

    • @NERDfirst
      @NERDfirst  8 лет назад

      Thank you very much! Glad you found the video useful =)

  • @persisn7965
    @persisn7965 2 года назад

    Here in 2022 and the channel, the content and the edit is a whole mood

    • @NERDfirst
      @NERDfirst  2 года назад

      Hello and thank you very much for your comment! Glad you liked the video =)

  • @aMwWSpHhHdn2
    @aMwWSpHhHdn2 4 года назад +3

    Great enthusiasm and well explained.

    • @NERDfirst
      @NERDfirst  4 года назад

      Hello and thank you very much for your comment! Glad to be of help =)

  • @diax7831
    @diax7831 8 месяцев назад

    10 years later and this vid is still helping students out

    • @NERDfirst
      @NERDfirst  8 месяцев назад

      Hello and thank you very much for your comment! Always happy to be of help :)

  • @chiyar123
    @chiyar123 3 года назад

    you just helped me a lot. Even this video is 7 years old. thanks!

    • @NERDfirst
      @NERDfirst  3 года назад +1

      You're welcome! Very happy to be of help =)

  • @LouSassle324
    @LouSassle324 3 года назад +1

    Thank you for the simple explanation, even someone like me was able to understand with ease!

    • @NERDfirst
      @NERDfirst  3 года назад

      You're welcome! Very happy to be of help =)

  • @mingxuanyao983
    @mingxuanyao983 9 лет назад +6

    You really made it easy to understand. You did it! Thx!!!

  • @ajturner4152
    @ajturner4152 6 лет назад

    I know this is really old now, but still super helpful for Computer Science students 4 years later!

    • @NERDfirst
      @NERDfirst  6 лет назад

      Hello and thank you very much for your comment! That's great to hear :) All the best for your journey in CS!

  • @TheEnslayer
    @TheEnslayer 8 лет назад +2

    On behalf of my computing class. You explained the backus naur form very well in your video. thx m8 i r8 8/8

    • @NERDfirst
      @NERDfirst  8 лет назад

      +TheEnslayer Cheers! Glad to be of help to you and your class =)

  • @langgaojonathane.462
    @langgaojonathane.462 4 года назад

    I have a report for tomorrow. I think this video will help me to explain it well. Thank you

    • @NERDfirst
      @NERDfirst  4 года назад

      You're welcome! All the best for your report =)

  • @alisonchen6800
    @alisonchen6800 8 лет назад +2

    This is so awesome and so concise. Watching this video before a quiz. Thanks so much. Please keep making these!

    • @NERDfirst
      @NERDfirst  8 лет назад

      Hello and thank you very much for your comment! Very happy to be of help, hope you do well for your quiz =)

  • @MrPsycko666
    @MrPsycko666 2 года назад

    Day before my test, bro you are telling it with so much joy and that helps me a lot. Thanks for the great video

    • @NERDfirst
      @NERDfirst  2 года назад

      Hello and thank you very much for your comment! Really happy you liked the video =) All the best for your test!

  • @mintlou
    @mintlou 9 лет назад +7

    Thanks for this! Trying to understand these concepts with a text book is quite difficult.

    • @NERDfirst
      @NERDfirst  9 лет назад +2

      mintlou You're welcome! Very happy to be of help =) And I agree, it's not always easy to self-learn some things in computer science!

  • @victorejiofor8115
    @victorejiofor8115 2 года назад

    Thanks, friend you made it very easy to understand looking foward to more videos.

    • @NERDfirst
      @NERDfirst  2 года назад

      You're welcome! Very happy to be of help =)

  • @johnlane9873
    @johnlane9873 10 лет назад +1

    Do have a test in 2 days and you helped me big time! Thanks soo much!

    • @NERDfirst
      @NERDfirst  10 лет назад

      You're welcome! Very happy to be of help =)
      Thank you for your comment, and all the best for your test =)

  • @sorakannki6246
    @sorakannki6246 2 года назад

    Thanks for this smart and short introduction to BNF

    • @NERDfirst
      @NERDfirst  2 года назад

      You're welcome! Glad to be of help =)

  • @lilbuckbreaker3868
    @lilbuckbreaker3868 2 года назад

    Thank you! The lectures provided by my uni are so lazy and have so many gaps that I almost gave up on learning about lexers, but your video helped me a lot!

    • @NERDfirst
      @NERDfirst  2 года назад

      Hello and thank you very much for your comment! Glad to be of help :)

  • @fatemakhalfan6980
    @fatemakhalfan6980 2 года назад

    Thanks a lot for making things easy to understand.

    • @NERDfirst
      @NERDfirst  2 года назад

      You're welcome! Very happy to be of help =)

  • @davidgcornett
    @davidgcornett 3 года назад

    This really helped me grasp the concept. Thanks from 2021!

    • @NERDfirst
      @NERDfirst  3 года назад

      You're welcome! Very happy to be of help =)

  • @generationalthinkersacademy
    @generationalthinkersacademy 7 лет назад

    still watching this in 2017.great job man thanks a hexa times

    • @NERDfirst
      @NERDfirst  7 лет назад

      You're welcome! Happy to be of help =)

  • @ZachBugay
    @ZachBugay 7 лет назад

    Fantastic job explaining BNF and giving some examples. Thank you very much.

    • @NERDfirst
      @NERDfirst  7 лет назад

      You're welcome! Very happy to be of help =)

  • @tabithatheissen4568
    @tabithatheissen4568 Год назад

    Wow you are such a good explainer ! So simple and yet SO understandable ! Thank you very much

    • @NERDfirst
      @NERDfirst  Год назад

      You're welcome! Very happy to be of help =)

  • @mersancanonigo1018
    @mersancanonigo1018 3 года назад

    I really love your explanation sir.

    • @NERDfirst
      @NERDfirst  3 года назад

      Hello and thank you for your comment! Glad you liked the video =)

  • @tomatosauce9328
    @tomatosauce9328 11 месяцев назад

    A huge thank you. You just saved me

    • @NERDfirst
      @NERDfirst  11 месяцев назад

      You're welcome! Very happy to be of help =)

  • @elocore1702
    @elocore1702 4 года назад

    Thank you! I needed to know this for my computer science class during quarentine cuz teacher is being useless

    • @NERDfirst
      @NERDfirst  4 года назад +1

      You're welcome! Very happy to be of help =)

  • @patrickcampbell8413
    @patrickcampbell8413 8 лет назад +2

    You're fantastic at explaining things, cheers

    • @NERDfirst
      @NERDfirst  8 лет назад

      Hello and thank you very much for your comment! Glad you found the video useful =)

  • @jengler7734
    @jengler7734 2 месяца назад

    great video and amazing explanation !!

    • @NERDfirst
      @NERDfirst  2 месяца назад +1

      Hello and thank you very much for your comment! Glad you liked the video :)

  • @MenukaIshan
    @MenukaIshan 8 лет назад

    LOL I love how this video is explained and your hand movements are cool. They brake boringness of the theoretical part.
    Thanks anyway

    • @NERDfirst
      @NERDfirst  8 лет назад

      +Menuka Ishan Thank you very much for your comment! Glad you liked the video =)

  • @michaelsavaglia1967
    @michaelsavaglia1967 9 лет назад

    Thankyou so much, the way my teacher explained it made it seem so complicated but youve cleared everything up:D

    • @NERDfirst
      @NERDfirst  9 лет назад

      Michael Savaglia You're welcome! Very happy to be of help =)

  • @christophebutler5407
    @christophebutler5407 5 лет назад

    Great video. Thanks for sharing.

    • @NERDfirst
      @NERDfirst  5 лет назад

      You're welcome! Very happy to be of help =)

  • @fredweasleylives00
    @fredweasleylives00 7 лет назад +1

    Thanks for making this video, it's really helped me out with my hw assignment :).

    • @NERDfirst
      @NERDfirst  7 лет назад

      You're welcome! Glad to be of help :)

  • @ComeCloserDarling
    @ComeCloserDarling 4 года назад

    Great explanation, saved me a lot of time!

    • @NERDfirst
      @NERDfirst  4 года назад

      Hello and thank you for your comment! Happy to be of help =)

  • @NumberIdiocy
    @NumberIdiocy 10 лет назад

    Thanks for the video! Now I have to find this way to implement this into the project.

    • @NERDfirst
      @NERDfirst  10 лет назад

      Ohai, glad you found your way here =P
      Thanks for your comment! Good luck with the implementation =D

  • @Unclewich
    @Unclewich 10 лет назад +2

    I learned something. Thanks!

    • @NERDfirst
      @NERDfirst  10 лет назад +1

      Hello Unclewich, and thank you so much for your comment!
      Glad you found this video helpful. There certainly is a novelty factor to it which I felt would be interesting =D

  • @gabetatoe
    @gabetatoe 6 лет назад

    Ayyy thanks , I managed to understand BNF the day b4 my examination thru your video, yey xD

    • @NERDfirst
      @NERDfirst  6 лет назад

      Hello and thank you for your comment! Hope the exam went well :)

  • @katrinanaidas7799
    @katrinanaidas7799 7 лет назад

    omg ricky from trailer park boys has that same shirt. you are my hero.

    • @NERDfirst
      @NERDfirst  7 лет назад

      Hahahaha that's interesting. I had that shirt for years, no idea it's a design that gets on TV =P

  • @pjcyborg
    @pjcyborg 9 лет назад

    Excellent explanation, is it possible to define nested parentheses using BNF grammar ?
    ::= 'A'|'B'|'C'|...
    ::= |
    := '(' | ')'
    Will this check for nested parentheses?

    • @finanzkrise
      @finanzkrise 9 лет назад

      Piyush Jain Try
      ::= 'A'|'B'|'C'|...
      ::= |
      ::= '(' ')' | | |

  • @Tashevery
    @Tashevery 6 лет назад

    Thank you, big thanks

    • @NERDfirst
      @NERDfirst  6 лет назад

      You're welcome! Glad to be of help :)

  • @geoyws
    @geoyws 5 лет назад

    Thanks for the explaining it so clearly!

    • @NERDfirst
      @NERDfirst  5 лет назад

      You're welcome! Very happy to be of help =)

  • @elmerguevara2636
    @elmerguevara2636 4 года назад

    great explanation !

    • @NERDfirst
      @NERDfirst  4 года назад

      Hello and thank you very much for your comment! Glad you liked the video =)

  • @alessandroporfirio1910
    @alessandroporfirio1910 6 лет назад

    Thank you for your explanation!

    • @NERDfirst
      @NERDfirst  6 лет назад

      You're welcome! Glad to be of help :)

  • @outrageous5468
    @outrageous5468 9 лет назад +1

    Bossed the explanation! Thanks!!

    • @NERDfirst
      @NERDfirst  9 лет назад +1

      Outrageous You're welcome! Glad you liked the video =)

  • @hatemamin8989
    @hatemamin8989 6 лет назад

    Very well explained, many tanks!

    • @NERDfirst
      @NERDfirst  6 лет назад

      You're welcome! Very happy to be of help :)

  • @jg5645
    @jg5645 5 лет назад

    Nice! Thanks for the explanation!

    • @NERDfirst
      @NERDfirst  5 лет назад

      You're welcome! Glad to be of help =)

  • @santiagolosa4751
    @santiagolosa4751 6 лет назад

    Thank you! This video helped me a lot!

    • @NERDfirst
      @NERDfirst  6 лет назад +1

      You're welcome! Very happy to be of help =)

  • @larflame_scott
    @larflame_scott 2 года назад

    Thanks man for the video

    • @NERDfirst
      @NERDfirst  2 года назад

      You're welcome! Happy to be of help =)

  • @Lestca1
    @Lestca1 9 лет назад +1

    Impressive presentation!

    • @NERDfirst
      @NERDfirst  9 лет назад

      Leo Carlsson Thank you very much for your comment! Glad you liked the video =)

  • @user-fl8ul1me9r
    @user-fl8ul1me9r 7 лет назад

    Cool, Thank you very much. It is really helpful.

    • @NERDfirst
      @NERDfirst  7 лет назад

      +郑成功 You're welcome! Glad to be of help :)

  • @csxwin
    @csxwin 7 лет назад

    Very clear explanation. thank you

    • @NERDfirst
      @NERDfirst  7 лет назад

      You're welcome! Glad to be of help =)

  •  10 лет назад

    Great explanation. Thank you so much :)

    • @NERDfirst
      @NERDfirst  10 лет назад +1

      You're welcome! I'm very happy to be of help, and I'm glad you found the video useful. Thank you very much for your comment =)

  • @omidreyhani
    @omidreyhani 7 лет назад

    One word brilliant. Please make more videos :)

    • @NERDfirst
      @NERDfirst  7 лет назад

      Hello and thank you very much for your comment! More videos come twice a week =)

  • @theroguenob
    @theroguenob 2 года назад

    watching the as a quick refresh for BNF and seriously the recursive call made me spit my water out that was funny

    • @NERDfirst
      @NERDfirst  2 года назад

      Heh, glad you liked it!

  • @sergioaraujo4519
    @sergioaraujo4519 8 лет назад +3

    Nice video! Next time make some exercises too please

    • @NERDfirst
      @NERDfirst  8 лет назад +3

      Hello and thank you for your comment! This is something I've considered before, but unfortunately it's not easy to find the time to set and discuss exercise questions and answers!
      Maybe in the future, if this stuff finally pays the bills, I can consider doing it!

  • @codex7299
    @codex7299 4 месяца назад

    WE WANT MORE!!!

    • @codex7299
      @codex7299 4 месяца назад

      Christ 10 years ago... wow

    • @NERDfirst
      @NERDfirst  4 месяца назад

      Hello and thank you very much for your comment! Yeah this is from a loooong time ago, but at least I'm still here, lurking in the comments.
      Any specific topics you're interested in? I'll see what I can do.

  • @angeleze6312
    @angeleze6312 2 года назад

    This is good, but please practical examples, like writing names of people, thanks

    • @NERDfirst
      @NERDfirst  2 года назад

      Hello and thank you for your comment! Good idea, might want to revisit this topic in the future.

  • @vixinhaler
    @vixinhaler 10 лет назад

    Thank you for this! Very helpful!

    • @NERDfirst
      @NERDfirst  10 лет назад +1

      Jacob Vasu You're welcome! Very happy to be of help =)

  • @TheJapGuyFreaksOut
    @TheJapGuyFreaksOut 4 года назад

    hmm so the space in between is the lettuce. I understood, thanks! I will ace my test.

    • @NERDfirst
      @NERDfirst  4 года назад +1

      Hello and thank you for your comment! Hope the test went well =)

    • @TheJapGuyFreaksOut
      @TheJapGuyFreaksOut 4 года назад

      @@NERDfirst thanks, my test will be on April 19th. It will be in Japanese but I like things explained in English by people like you better cuz it's easier to understand. thanks!

  • @mohamedjehadbaeth4097
    @mohamedjehadbaeth4097 9 лет назад

    well done! Thumbs up

    • @NERDfirst
      @NERDfirst  9 лет назад +1

      Mohamed Jehad Baeth Thank you! Glad you liked the video =)

  • @RoyalBlueFox1
    @RoyalBlueFox1 9 лет назад

    This helped so much! thanks!

    • @NERDfirst
      @NERDfirst  9 лет назад

      Sam Hoey You're welcome! Very happy to be of help =)

  • @damithwickramasinghe4264
    @damithwickramasinghe4264 10 лет назад

    Hi, can you explain how to write a BNF parser to check syntax in java??

    • @NERDfirst
      @NERDfirst  10 лет назад

      Hello and thank you for your comment!
      There is waaay too much to talk about for that! I recommend you look up some external libraries for this purpose. Perhaps try BNF for Java: bnf-for-java.sourceforge.net

  • @tawfikayman9877
    @tawfikayman9877 7 лет назад

    you are awesome man

    • @NERDfirst
      @NERDfirst  7 лет назад

      Thank you! Glad you liked the video =)

  • @benripka6977
    @benripka6977 6 лет назад

    high quality stuff. thanks!

    • @NERDfirst
      @NERDfirst  6 лет назад

      You're welcome! Glad to be of help =)

  • @db18022
    @db18022 6 лет назад

    Nice explanation, thanks bruh!

    • @NERDfirst
      @NERDfirst  6 лет назад

      You're welcome! Glad to be of help =)

  • @Shakzey
    @Shakzey 9 лет назад

    awesome dude. awesome

    • @NERDfirst
      @NERDfirst  9 лет назад

      siksreik Thank you very much! Glad you liked the video =)

  • @deshantdevkota2563
    @deshantdevkota2563 3 года назад

    thank you man

    • @NERDfirst
      @NERDfirst  3 года назад +1

      You're welcome! Happy to be of help :)

  • @RevenTr
    @RevenTr 10 лет назад

    In what kind of programs or context is this format used?

    • @NERDfirst
      @NERDfirst  10 лет назад +1

      Heya RevenTr! Thanks for your comment =)
      More often than not, BNF is used on paper. Its primary purpose is to communicate how the grammar is set up in a command-based program.
      That's not to say there aren't programs out there that will perform BNF parsing, of course. Since BNF is so general, any program can actually incorporate it, and use it as a tool to drive command-based input.

  • @jacktheninja
    @jacktheninja 3 года назад

    Thanks!

    • @NERDfirst
      @NERDfirst  3 года назад

      You're welcome! Happy to be of help =)

  • @Wezla
    @Wezla 6 лет назад

    Helpful!

    • @NERDfirst
      @NERDfirst  6 лет назад

      Thank you! Glad to be of help =)

  • @GGLiEx
    @GGLiEx 6 лет назад

    thank you :)

    • @NERDfirst
      @NERDfirst  6 лет назад

      You're welcome! Glad to be of help :)

  • @pascalmusabyimana8245
    @pascalmusabyimana8245 3 года назад

    Keep going bro

  • @rokerumaluku
    @rokerumaluku 4 года назад

    Thanks a lot ^^

    • @NERDfirst
      @NERDfirst  4 года назад

      You're welcome! Happy to be of help =)

  • @roylee3196
    @roylee3196 6 лет назад

    Thanks for the explanation :) However technically, are these equivalent?
    1. ::= |
    2. ::= |

    • @NERDfirst
      @NERDfirst  6 лет назад +1

      Hello and thank you for your comment! While both the definitions you have specified would "work correctly" (ie. You can construct words out of letters, or build bigger words by "attaching" letters to words), if you "traced" them by following the logic, they would behave a little differently.
      If I had a sequence of letters ["H","E","L","L","O"], definition (1) would assemble the word "HELLO", since each subsequent letter is appended to the existing word.
      However, definition (2) would give us "OLLEH", because each incoming letter is added _before_ the existing word.
      I don't see this as being a major concern, since the order of input is generally beyond the scope of BNF. However, to make it easier to intuitively understand, I would prefer definition (1), since we could simply "trace" it to see how it works.

    • @roylee3196
      @roylee3196 6 лет назад

      Very detailed explanations. Again, thank you! :)

    • @NERDfirst
      @NERDfirst  6 лет назад

      You're welcome! Glad to be of help :)

  • @kuttikrishnankodoth1463
    @kuttikrishnankodoth1463 10 лет назад

    Awsome!!!!

    • @NERDfirst
      @NERDfirst  10 лет назад

      Thank you very much for your comment! Glad you enjoyed the video =)

  • @SupremeOfficer
    @SupremeOfficer 10 лет назад

    Thanks man

    • @NERDfirst
      @NERDfirst  10 лет назад

      You're welcome! Very happy to be of help =) Thank you for your comment!

  • @johnlane9873
    @johnlane9873 10 лет назад

    Dude you rock

    • @NERDfirst
      @NERDfirst  10 лет назад

      Thank you very much! Glad you found the video helpful =)

  • @loser7755
    @loser7755 6 лет назад

    Very nice! ;)

    • @NERDfirst
      @NERDfirst  6 лет назад

      Thank you very much! Glad you liked the video =)

  • @Joseph-xo4my
    @Joseph-xo4my 7 лет назад

    Thank you so much!

    • @NERDfirst
      @NERDfirst  7 лет назад

      You're welcome! Very happy to be of help =)

  • @toufiq-ul-alam6475
    @toufiq-ul-alam6475 7 лет назад

    Worked wonder brother. Hope to talk to you more about PC stuff.

    • @NERDfirst
      @NERDfirst  7 лет назад

      Hello and thank you for your comment! Glad you liked the video! If there's more you'd like to discuss, feel free to leave a comment anytime or shoot me a message!

  • @shankarnair9009
    @shankarnair9009 8 лет назад

    i like your passion.. but i do have a suggestion.. you mention ' " ' [double quotes] instead of " ' " [single quote] as not being part of BNF.. Kindly make that correction.. Great passion. keep it up.

    • @NERDfirst
      @NERDfirst  8 лет назад +1

      +Shankar Nair Hello and thank you for your comment! Could you give me a timestamp where I made that statement? The closest thing I found is at 1:55, but that refers to when I used "..." onscreen. The statement was in reference to the ellipsis, not the quotes.

    • @shankarnair9009
      @shankarnair9009 8 лет назад

      +lcc0612 Hi, Look at the time stamp around 2 minutes where you say you have put double quotes for convenience but you are showing single quotes for the letters..

    • @NERDfirst
      @NERDfirst  8 лет назад +1

      +Shankar Nair Hello again. As I have mentioned in my previous post, what I have added for convenience is this: ...
      Not double quotes.

  • @hilsCyber99
    @hilsCyber99 2 года назад

    wow/ Just wow.

  • @tiagoallesklar
    @tiagoallesklar Год назад

    Still helpful in 2022

    • @NERDfirst
      @NERDfirst  Год назад

      Hello and thank you for your comment! Glad you found the video helpful. The good thing is, this stuff doesn't exactly go out of date, so I'm hopeful it'll remain relevant decades down the line.

  • @KobraKai2
    @KobraKai2 7 лет назад

    Hello, im doing an intro comp sci course, i have to make a grammar for us telephone numbers then modify it so that only certain numbers will be used in certain portions. the beginning part was easy i think
    ::=
    ::=
    >area code> ::=
    ::= 0|1|2|3|4|5|6|7|8|9
    So I could be entirely wrong, it seems like I have alot of non terminals called but to me that much makes sense,
    however if i wanna modify the grammar to say that the 2nd digit of area code has to be a 0 or a 1, or say the first digit of the has to be a 4 or a 5
    is there a way to do this?? Im lost

    • @NERDfirst
      @NERDfirst  7 лет назад

      Hello and thank you for your comment! You are able to mix literal values with references to rules, so if you want to say that the 2nd digit of the area code can only be 0 or 1, you can say:
      ::= "0" | "1"

    • @KobraKai2
      @KobraKai2 7 лет назад

      why the hell didnt i think of that?
      I was thinking somethign like this
      ::=
      ::= 0|1
      ::= 0|1|2|3|4|5|6|7|8|9
      seems much more complicated now
      I hate to be a further bother but im a begginner and kinf of lost, Im trying to figure out the following Grammar but am stuck
      ::= |
      ::= | >next>
      ::= A
      I thought at first this was an example of recursion< but im so god ^%#$ frustrated at this right now i cant think straight, ive been trying to draw a parse tree with an input string of arbitrary A's but cant get it
      do you have any siuggestions or maybe resources i could look at?

    • @NERDfirst
      @NERDfirst  7 лет назад

      Your method using is actually the best way to go if the restrictions are more complicated. It's a good train of thought so keep that in mind, it's just that the current situation happened to fit for a simpler solution.
      If you want to be able to work with a string of arbitrary As, then very basic recursion is enough!
      ::= "A"
      ::= |
      That means a word can be "built" by starting from a letter, and attaching more letters at the end. Let me know if this isn't clear, I'll throw together a very quick video to demonstrate this.

    • @KobraKai2
      @KobraKai2 7 лет назад

      Thanks so much for entertaining what must be "ridiculous" questions for you.
      I do see clearly now, what you mean about teh basic recursion I guess what Im getting at is how to tell what a grammar is describing:
      ::= |
      ::= ,
      ::= A
      To me this grammar is describing an input string on either A or AA, so if I were to use an input string of more than two A's, Im thinking my compiler would give me an error?
      However, I have another grammar that is slightly different:
      ::= |
      ::= , |
      ::= A
      I was thinking that this grammar described an arbitrary number of As, but if I draw a parse tree for something like this, and im sure im doing somethign wrong
      It's been a while since ive been in school, again, I appologize
      A A A A A
      \ /
      \ /
      ?

    • @NERDfirst
      @NERDfirst  7 лет назад

      No worries =) This is actually quite fun so I don't mind at all!
      Let's try and figure out what you have written:
      ::= |
      ::= , (Is the comma on this line intentional? I'm going to assume it is. Either way, it helps us be clearer so I'll keep it in)
      ::= A
      With the rules, we can either work forwards (construct) or backwards to see if things fit the rules.
      Working backwards: "A" is a valid , since a goal is a letter and "A" is a letter.
      Working forwards (construction): A goal can also be a letter appended to (from ::= ). We start by building the first letter which is "A". must be a comma followed by a letter, and the only letter we have is A, so the only other valid goal is "A, A".
      You are right to say nothing else is possible. Since we don't use recursion and don't have a case for three-letter long goals (or longer ones), nothing else is valid.
      ***
      For your second part, you can in fact have strings of arbitrary length, thanks to the rules for . The second half reads:
      ::=
      That means I can build a object by sticking a letter to its front, and it still remains a next object so I can repeat this as many times as I like.
      Now, I have to admit that a parse tree isn't something I'm familiar with, and in fact I question how useful it is in this context because the definition is recursive in nature and it's not something that's easy (or good!) to represent using a tree, but let's try it anyway for the string "AAA". Here's what I got: drive.google.com/file/d/0B2Ia5aQpQ8CnclpfMjBmVnhEOEU/view?usp=sharing

  • @pumpkinator09
    @pumpkinator09 3 года назад

    This video was super helpful! Is there any chance we can get one on extended BNF?

    • @NERDfirst
      @NERDfirst  3 года назад

      Hello and thank you very much for your comment! Glad to be of help =)
      I haven't actually heard of extended BNF before today! I'll put this idea on the list, look it through, and see where it gets me.

  • @abdullahiibrahim292
    @abdullahiibrahim292 8 лет назад

    Good video

    • @NERDfirst
      @NERDfirst  8 лет назад

      +Abdullahi Ibrahim Thank you very much! Glad you liked the video =)

  • @x9466x
    @x9466x 4 года назад

    Thanks

    • @NERDfirst
      @NERDfirst  4 года назад

      You're welcome! Glad to be of help =)

  • @4F6D
    @4F6D 4 года назад

    Cant i just do
    Phrase ::= | ‘ ‚
    ?

    • @NERDfirst
      @NERDfirst  4 года назад

      Hello and thank you for your comment! If you did it this way, you can't have a phrase longer than two words!
      For example: "Hello there" is a phrase because it is . However, "How are you" is not a phrase because the definition of a phrase does not allow .
      That's why we simply say ::= |
      This means that, if we have a phrase, adding a word to the back of it still makes it a phrase. I can have a 1 word phrase or a 100 word phrase, they're all covered by the definition.

    • @4F6D
      @4F6D 4 года назад

      0612 TV w/ NERDfirst damn, Thank you

  • @sandeep3107
    @sandeep3107 7 лет назад

    how to read this
    Example E ::= E + T | T
    T ::= T * F | F
    F ::= id | constant | (E)
    where E is Expression, T is Term, and F is Factor

    • @NERDfirst
      @NERDfirst  7 лет назад

      Hello and thank you for your comment! I think what makes this confusing is that firstly, it's quite messily written (which can be corrected for), and a few elements are either undefined or not clearly defined (not quite as easy to correct). Let me first rewrite it in something that looks closer to BNF for clarity:
      ::= '+' |
      ::= '*' |
      ::= | | "(" ")"
      The following terms are unclear: "+", "*", "(", ")". Are these literals? I assume they are.
      The following terms are probably expression, in which case you have to supply their definitions: , .

  • @kwakubempong6122
    @kwakubempong6122 2 года назад +1

    Do more videos

    • @NERDfirst
      @NERDfirst  2 года назад

      Hello and thank you for your comment! Next video is being edited right now! Don't worry, the new videos will come. For now, don't forget to check out the rest of the catalog!

  • @rickychandra9980
    @rickychandra9980 10 лет назад +1

    Thank you for your clear and comprehensive explanation. The given examples are also very good. Maybe less gestures would be better, it could be distracting :) .

    • @NERDfirst
      @NERDfirst  10 лет назад

      Ricky Chandra Hello and thank you very much for your comment! Glad you liked the video! I've been told about the gestures, and I'm working on them (to a certain extent! They help me think =P).

  • @hh1291992
    @hh1291992 10 лет назад +1

    great job

    • @NERDfirst
      @NERDfirst  10 лет назад +1

      Hello, and thank you very much for your comment! Glad you liked the video =)

    • @hh1291992
      @hh1291992 10 лет назад

      it's my duty :)

  • @qoloqo
    @qoloqo 3 года назад

    Gosh 8 years ago

    • @NERDfirst
      @NERDfirst  3 года назад

      Hello and thank you for your comment! Luckily the concepts haven't changed =)

    • @qoloqo
      @qoloqo 3 года назад

      @@NERDfirst Thank you for the video!

  • @fatihsonmez
    @fatihsonmez 5 лет назад

    I saw what you did there with recursive :D

    • @NERDfirst
      @NERDfirst  5 лет назад +1

      Hello and thank you for your comment! Not really sure what I did there =P Care to explain?

    • @fatihsonmez
      @fatihsonmez 5 лет назад

      @@NERDfirst 3:27 what recursive means? well, it means recursive :D

    • @NERDfirst
      @NERDfirst  5 лет назад +1

      Oh! I forgot I did that heh. That was one of my favorite nerd jokes at the time =P

    • @fatihsonmez
      @fatihsonmez 5 лет назад

      @@NERDfirst I like it tho :D

    • @NERDfirst
      @NERDfirst  5 лет назад

      Heh glad you liked it =)

  • @emmanuelemmanouilides9484
    @emmanuelemmanouilides9484 3 года назад

    hahah awesome intro

  • @devcalejado
    @devcalejado 9 лет назад

    Really fucking good.

    • @NERDfirst
      @NERDfirst  9 лет назад +1

      Rederick Deathwill Cheers! Happy to be of help =)

  • @GaurangIngale08
    @GaurangIngale08 4 года назад

    Fantastic explanation, thank you! The only thing which annoyed me was your hands dancing around all over the place.

    • @NERDfirst
      @NERDfirst  4 года назад

      Hello and thank you for your comment! I've heard! The movements help me think, but I'm working on cutting them down =)