Question
Urdu sentence parser using Flex and Bison write code------------------- Create a parser for Urdu language using Flex and Bison It should input Urdu sentences written
Urdu sentence parser using Flex and Bison write code-------------------
Create a parser for Urdu language using Flex and Bison
It should input Urdu sentences written in Roman script and print the rules used to parse them (if the sentence is grammatical as per your CFG)
If not grammatical, it should say syntax error
Simple CFGs can be searched for online (Hint: also search for Hindi because the grammatical structure is the same; you can also construct from Urdu grammar rules; look up Urdu rule based language translator docs)
Recall that Bison will have problems if you have an ambiguous grammar or a right recursive one
Add one rule at a time and test
You are not required to cover the entire grammatical structure of Urdu
1)Flex file
2)Bison file
3)Exe file that will take my input and tell me whether it is correct or not
3)Document (see bellow)
Document
Write down your CFG in the document
Write down two samples of each type of sentence your grammar can parse
List tokens and draw parse trees for each of these samples
Cite your sources for the grammar (if you use my examples, cite those as well)
Also document grammar rules that you tried but couldnt get to run on Bison, and give an analysis
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