Program one & Report:
Find a BNF grammar specification for one of the following languages, either online or in published material: Java, C++, Swift or PHP. Once you have found the specification, write a different minor program (described below) in that language. Include the source code of the program in your report.
Using the BNF grammar specification, include in your report a step-by-step walkthrough of the process of parsing your program and a description of the final parse tree. You should complete parsing down to the final tokens. Include only the relevant parts of the grammar specification.
Write a different minor program (described below) in one of the following languages: Prolog, Visual Prolog, Mercury, or CLIPS. Include the source code of the program in your report.
Select anyone of Minor Programs:
• A program to bulk-rename a large group of files according to a wildcard-based pattern entered by the user.
• A simple text-based game, on the level of high/low, hangman, or mastermind.
• A simple expert system for choosing between products of a certain type.
• Input an arithmetic problem expressed as a string and output the correct answer.