Question
Consider the grammar of expressions provided in file `grammar.txt`. Write a parser for the given grammar. The parser will use the scanner (written in project
Consider the grammar of expressions provided in file `grammar.txt`.
Write a parser for the given grammar. The parser will use the scanner (written in project 1) to process a file and return true or false, depending on whether the input is syntactically correct according to the given grammar.
(Written in Java)
Note: Your program should be well commented and include information about how to execute it.
The following are links for the code and text files.
scanner: Project 1 Code: https://hastebin.com/ilekepeyul.cs
Grammar.txt. : https://hastebin.com/uzojosivac.sql
testRead.txt: https://hastebin.com/nexunezubo.coffeescript
So, basically I need my project that i wrote to be able to " return true or false, depending on whether the input is syntactically correct according to the given grammar".
the parser should be written in JAVA
Step 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