Reference no: EM133238459
Case: Design, implement and test a grammar for a data language.
A source file (input.txt file) for the language is composed of one or more lines, where each line is a comma-separated list of the following fields
- Field 1: An arbitrary string of one or more letters and digits, no spaces allowed
- Field 2: An integer
- Field 3: A Boolean value (true/false)
- Field 4: A sentence (an arbitrarily long string of ASCII characters that allows spaces but does not allow a new line)
Develop and then test a grammar for this language. Your grammar's generated parser must recognize the following 2-line sample input file as being syntactically correct.
Your parse tree for this input file must have 7 tokens (i.e., nodes) for each line: one token for each of the three commas, one token for Field 1, one token for Field 2, one token for Field 3 and one token for Field 4.
John, 45, true, Did this person come to see me the other day?
Jane, 41, false, I have yet to meet this person!
Your grammar correctly describes Field 1 as described above.
Your grammar correctly describes Field 2 as described above.
Your grammar correctly describes Field 3 as described above.
Your grammar correctly describes Field 4 as described above.
Your parser correctly parses the above sample input file with the John and Jane entries.
A Multi-Domain Language - Racket (15 points)
Use Racket to code a web app or a systems app. Refer to our resources on Racket programming.
Describe the purpose of the app. Explain why you consider it to be a web app (or a systems app).
Your source code must implement the described functionality.
Your source code must show (in an inline comment section) that you have improved its readability. Use an authoritative source (like a peer-reviewed article) to show that your effort is indeed known to improve the readability of a program written in a functional programming language. Cite your source within the source code.
Your source code must show (in an inline comment section) that you have improved its cost (i.e., the time and work it would take to maintain it or add some functionalities to it). Use an authoritative source (like a peer-reviewed article) to show that your effort is indeed known to improve the cost of a program written in a functional programming language. Cite your source within the source code.
Your source code must show (in an inline comment section) that you have improved its efficiency (i.e., use less space and/or time to execute a task). Use an authoritative source (like a peer-reviewed article) to show that your effort is indeed known to improve the efficiency of a program written in a functional programming language. Cite your source within the source code.