Syntactic Specification - Backus-Naur Form (BNF)
This activity should be attempted using Netscape
In this activity you will be asked to create syntactic specifications in Backus-Naur Form for a series of "mini-languages". If you need practice before you complete this assignment there are two practice sessions that you may utilize:
- An activity in which you can examine several pre-stored syntaces (that is the plural of "syntax") and have the opportunity to submit strings from the mini-language for validation.
- A "free-form" practice activity in which you can create your own syntaces and check the specification against strings in the mini-language that you have defined.
Once you are satisfied that you are proficient in understanding the methods of syntactic specification and can derive the languages that they define, then complete the assignment here.
- Click the START button to expose a language description (i.e. a problem) to be specified in BNF. This will appear in a separate window so that you can easily refer to the description while you create the syntax.
- Enter your solution syntax in the table below.
- Before submitting for grading you may check the syntax for "syntactic" correctness by clicking on the CHECK SYNTAX button.
- In this version of the BNF analyzer embedded spaces in the input strings are ignored.
- 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.
- The syntax may be modified at any time though it will be necessary to check the syntax again before a string is submitted for grading.
- Once you are satisfied that you have a correct solution, click on the DONE button. Your solution will be tested against several strings and scored. Two different problems will be posed, the subsequent one being shown automatically after you have clicked the DONE button the first time. When you have completed both the problems the total score will be submitted to the grade data base system.
Last updated 2001/06/27
© J.A.N. Lee, 2001.