Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Backus-Naur Form Parse Tree. Question 2 1. A certain magazine distributor stores each subscription it distributes in a database and assigns each subscription a code
Backus-Naur Form Parse Tree. Question 2
1. A certain magazine distributor stores each subscription it distributes in a database and assigns each subscription a code number. That code number looks like: JI PO 81#0301870189018901900190019178 Here the first three letters of the code are the first three letters of the subscriber's last name. The next three characters are the first three numbers in the street address. This field is omitted if there is no street address (for example, in the case where the address is a post office box). The next character is always a number sign ("#"). The next two characters indicate the number of subscription terms, which can be an integer from 1 to 99. The following four characters indicate the starting date of the first subscription term in the format mmyy. A pair of start/end dates is given for each subscription term. The last two characters in the code form a two-digit ID code for the magazine. In the above sample code, the fields would be interpreted as follows: JIP First three letters of subscribers last name 081 First three digits of street address # Number sign 03 Number of subscription terms 0187 Start date of term 1 0189 End date of term 1 0189 Start date of term 2 0190 End date of term 2 0190 Start date of term 3 0790 End date of term 3 78 Magazine ID code Give a specification for a language that recognizes all forms of subscription code numbers using BNF and syntax diagrams (not EBNF). Be sure your language accepts exactly what is specified earlier nothing more or less. You may have to invent a few names for nonterminal symbols. You may assume thatStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started