Syntactic Specification - Backus-Naur Form (BNF) **
Free Practice Version

This is an "beta" version of a class activity in the course "Introduction to Computer Science" that includes a brief introduction to compilers, syntax and syntactic specification using BNF. The rules are as follows:

Procedure:

  1. Enter the syntax into the table below.
  2. Check the syntax for "syntactic" correctness by clicking on the CHECK SYNTAX button.
  3. Certain preferences for the format of the input strings are available - click SET PREFERENCES to set
  4. Thereafter you may test strings against this syntax by clicking the SUBMIT STRING button without having to check the syntax again. Where possible reasons for invalid strings will be given.
  5. The syntax may be modified at any time though it will be necessary to check the syntax again before a string is submitted.











** There was a discussion on the proper title for this methodology of specification at the 1978 History of Programming Languages Conference, it originally having been given the title Backus Normal Form, after John Backus the developer of FORTRAN and then the developer of this system for the language ALGOL. The first major use of the specification language was by Peter Naur, the secretary of the ALGOL committee and the author of the first ALGOL Report. Naur slightly extended the notation and thereafter it got the name Backus-Naur Form. Naur denies the attribution!


Last updated 2000/12/31
© J.A.N. Lee, 2000.