|
Answer 2 |
![]()
The implementation of any programming language requires a specification of
the syntax rules to be used in
parsing the source code of a program. Often these
rules are specified by using syntax diagrams (See on-line notes).
Design a set of syntax diagrams to represent any TWO of the following:
| Numerical dates written in European format: (dd-mm-yyyy) | |
| UK telephone numbers in the form: (Areacode) Telephone_number (e.g. (020)
7882 7836). | |
| Any sentence of English text, provided it begins with a capital letter and
ends with a full stop. | |
| Any Roman numeral between I (one) and C (one hundred) -- inclusive -- in either upper or lower case characters. |
Main Syntax Diagram
Sub Diagrams
Main Syntax Diagram
Sub Diagrams