EBNF grammar for a concert calendar
In GO lang
5. EBNF grammar for a concert calendar
· You may assume that the tokens date, time, word and num have already been defined
· A concert calendar is a list of concert events, where each event includes:
• A date and time
• The name of the performing group or artist, optionally followed by "(21+)" if there is a minimum age requirement to see the concert
• A pipe (|) character
• The name of the venue where the concert will be held, like "Pavilion" or "San Jose Ritz"
• A pipe (|) character
• The city where the venue is located
• The price, possibly followed by a + if there are also more expensive tickets. Examples: "$15", "$30+"
Example calendar:
Oct 16 8:00 pm Band X | Pavilion | Concord $20+
Oct 21 10:00 pm BYOB (21+) | Club Nouveau | San Leandro $10
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images