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 couldn’t get to run on Bison, and give an analysis