Backus-Naur Form – layman explanation

I came upon this term at work, or its abbreviation BNF, that sent me on a search of trying to understand it. So here’s a post to solidify my understanding.

Here’s a youtube post that summarizes it quite nicely. https://www.youtube.com/watch?v=8cEhCx8pwio

What is BNF?

It is a way to describe how software language can be written, similar to how human language can be spoken. It is liken to the grammar, and I think it is easiest to think as so too. The difference between BNF and normal grammar is that normal grammar has a lot of exclusions. The interesting and main similarity is that BNF uses a definition to be used in another definition. I think the video above explains succintly.

To relate to my experience, I was telling my son that computers uses ones and zeros while humans counts differently. I asked him to subtract 9 million from 10 million, and he answered one million. I repeated without the millions and he dully answered. I then asked him to count his fingers and he got the understanding that we use only ten numbers only actually, being one to ten (which I corrected to 0 to 9).

He then went even further and said that actually we learn the same way, where we use what we understand then to discover even more things. Or we use things that we have to make more things (that we have). Kinda like Lego.

So yeah, BNF is like a catalogue describing the lego blocks in programming. I’ll settle for that now.

Thank you for reading.

Similar Posts

  • Foreign Stranger

    Recently I was walking through the city when an old man in his 60s asked me for directions. At least that what I thought because I didn’t understand what he was saying as he wasn’t speaking in English. I thought of taking my phone and letting him talk to Google Translate but my phone’s battery…

  • |

    Just Get It Done

    I am getting old and older and I am now becoming more comfortable with the concept to just get the things done. I used to spend hours customising my phone or PC background, but nowadays I just use the default ones. While doing my work recently, I must say I ‘submit’ a very shitty work…

  • Passive and Active: Learning and Level Crossings

    In railway signalling, one of the most problematic or challenging part is, subjectively, the level crossings. It is the part where the road meets the rail, where normal railway operation which is rigid and structured, meets the road operation that in some ways, very loose and has many variables. It’s an interface and interface always…

  • |

    IRSE Module A

    Recently I passed the IRSE Module A, and I thought I’d be sharing my thoughts and opinion about it, while it’s still relatively fresh in my mind. This exam, and its other module, has always had a ‘bad’ reputation, being touted and taunted as a difficult exam, but after sitting for it, I think that…

  • Spoken vs Written Speech

    I think I”ve written this book before but I felt like writing it again, as I recently joined a webinar which was about Railway and Systems Engineering. The presentation was full of interesting points and the slides were well made. There were diagrams drawn or excerpts from papers that explain complex concepts in simple summaries,…

  • |

    IRSE Exam Module A

    I am writing this ‘in conjuction’ to the closing date for the registration of the exam, which is tomorrow, but if you are reading it later than that, please take whatever you can from this. If you have been working in the railway industry for some time, I strongly suggest taking the IRSE Exam Module…

Leave a Reply

Your email address will not be published. Required fields are marked *