a-Develop Java or C++ programs to do the following tasks:
1- Building an NFA from a given regular expression.
2- Converting a giving NFA into a DFA.
3- Building a DFA from a given regular expression directly without going through an NFA.
b- For the following grammar write a Java or C++ program that uses the LR(1) method to decide whether a given string can be derived in the grammar. If the sentence is derivable, your program should output the derivation of the sentence.
1) S -->L=R
2) S -->R
3) L -->*R
4) L -->id
5) R --> L
c- Write an implementation for the type system rules included in the type checking slide