1. Introduction

Computer languages need to be defined in terms of their grammar and syntax. Data encoding also need to be defined on some way so that programmers can validate data input and allocate the appropriate data type to the information.

The question is how is this defining to be done?

The obvious first choice is to write out the rule in English or other spoken language. For example try to define what an 'Integer' data type consists of.

Effort 1

"The Integer data type represents whole numbers. Each integer is made up of one or more characters ranging from zero (0) to nine (9). Other than memory limitations, an integer can be of any length."

Not bad for a first effort. But there are problems with this approach

  • Only English speakers can read and understand it.
  • Very verbose, it takes an awful lot of words to define something as basic as an integer

This is why Mr Backus and Mr Naur came up with a more elegant solution nearly fifty years ago.

Their method is now called the 'Backus-Naur Form' or BNF.

 

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: BNF Notation

 

 

 

Copyright © www.teach-ict.com