Tasks For Final Exam
Tasks For Final Exam
Attention:
All the students need to finish the project independently and
give the final report( A report just give the designing scheme with
words, tables, figures and so on, not just paste the source code ).
If plagiarism is checked, all the similar reports are given as fail
(<60).s
s
Objective:
The objective of this assignment is to implement three important
components of a compiler: regular expression to DFA conversion, LL(1)
parser construction, and LR(0) parser construction. These tasks will
help in understanding the fundamental concepts and techniques used in
compiler design.
Tasks:
1. Regular Expression to DFA Conversion:
Implement an algorithm to convert a given regular expression into
an equivalent Non-Deterministic Finite Automaton (NFA).
Convert the NFA into a Deterministic Finite Automaton (DFA).
Minimize the DFA by eliminating redundant states, if necessary.
Write a program to automate the conversion process.
The example regular expression:
(a|b)*ca*
Deliverables:
1. Source code for the regular expression to DFA conversion program.
2. Source code for the LL(1) parser program.
3. Source code for the LR(0) parser program.
4. A report documenting the design choices, algorithms, and test
cases used for each component.
5. Test cases to verify the correctness and functionality of each
program.
6. Instructions for running the programs and conducting the tests.
7. Make sure to include relevant comments and explanations in the
source code to enhance readability.
Additional Guidelines:
1. Make use of suitable programming languages for implementing the
assignments, such as Python, C++, Java, or any other language of
your choice.
2. Test the programs with different inputs to ensure their
correctness and handle possible edge cases.
3. Document any assumptions made during the implementation and
testing process.