Preview

Compiler Construction Quiz

Satisfactory Essays
Open Document
Open Document
1134 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Compiler Construction Quiz
ALLAMA IQBAL OPEN UNIVERSITY, ISLAMABAD
(Department of Computer Science)

WARNING 1. PLAGIARISM OR HIRING OF GHOST WRITER(S) FOR SOLVING THE ASSIGNMENT(S) WILL DEBAR THE STUDENT FROM AWARD OF DEGREE/CERTIFICATE, IF FOUND AT ANY STAGE. 2. SUBMITTING ASSIGNMENT(S) BORROWED OR STOLEN FROM OTHER(S) AS ONE’S OWN WILL BE PENALIZED AS DEFINED IN “AIOU PLAGIARISM POLICY”.

Course: Compiler Construction (3468) Semester: Autumn, 2012
Level: BS (CS) Total Marks: 100

ASSIGNMENT No. 1

Note: All questions carry equal marks.

Q. 1 (a) Define Compiler, using a diagram describes the three phases of analysis of source program. (b) Explain all the phases of Compiler. (c) Consider the following grammar. S ―> XaYb X ―> bXc | b Y ―> dYa | d Find the first sets for each non-terminal of the given grammar.

Q. 2 (a) Explain the error detection and reporting mechanisms. (b) Write the intermediate representation code of the following position: = initial + rate * 60

Q. 3 (a) Convert the following NFA into equivalent DFA using subset construction Algorithm. [pic] Note: Show all necessary steps that are involved in subset construction algorithm. (b) Convert the Following regular expression into NFA using Thompson’s construction. a ((b|b*c)d)* |d*a

Q. 4 (a) Given the following grammar. G → E E → T + E | T T → F * T | F F → a i) Is this grammar ambiguous? Explain! ii) Draw all parse trees for sentence “a+a*a+a”. (b) Consider the following grammar. S→ A A→ A+A | B++ B → y Draw parse tree for the input “y+++y++”

Q. 5 (a) Explain the role of the Lexical Analyzer and Parser in detail. (b) Differentiate between Top-down parsing and Bottom-up parsing.

ASSIGNMENT No. 2
Total Marks: 100

Note: All questions carry

You May Also Find These Documents Helpful

  • Powerful Essays

    Mgt7019-5 It Challenges

    • 3406 Words
    • 14 Pages

    Academic Integrity: All work submitted in each course must be the Learner’s own. This includes all assignments, exams, term papers, and other projects required by the faculty mentor. The known submission of another person’s work represented as that of the Learner’s without properly citing the source of the work will be considered plagiarism and will result in an unsatisfactory grade for the work submitted or for the entire course, and may result in academic dismissal.…

    • 3406 Words
    • 14 Pages
    Powerful Essays
  • Satisfactory Essays

    U7 Task 1

    • 528 Words
    • 5 Pages

    Copied work will be graded as a FAIL and disciplinary action may be taken against you…

    • 528 Words
    • 5 Pages
    Satisfactory Essays
  • Powerful Essays

    RomineHBTM8102 1

    • 1747 Words
    • 6 Pages

    Academic integrity: All work submitted in each course must be your own original work. This includes all assignments, exams, term papers, and other projects required by your instructor. Knowingly submitting another person’s work as your own, without properly citing the source of the work, is considered plagiarism. This will result in an unsatisfactory grade for the work submitted or for the entire course. It may also result in academic dismissal from the University.…

    • 1747 Words
    • 6 Pages
    Powerful Essays
  • Satisfactory Essays

    Academic Integrity: All work submitted in each course must be the Learner’s own. This includes all assignments, exams, term papers, and other projects required by the faculty mentor. The known submission of another person’s work represented as that of the Learner’s without properly citing the source of the work will be considered plagiarism and will result in an unsatisfactory grade for the work submitted or for the entire course, and may result in academic dismissal.…

    • 1313 Words
    • 14 Pages
    Satisfactory Essays
  • Good Essays

    Academic Integrity: All work submitted in each course must be the Learner’s own. This includes all assignments, exams, term papers, and other projects required by the faculty mentor. The knowing submission of another persons work represented as that of the Learner’s without properly citing the source of the work will be considered plagiarism and will result in an unsatisfactory grade for the work submitted or for the entire course, and may result in academic dismissal.…

    • 689 Words
    • 3 Pages
    Good Essays
  • Best Essays

    Academic Integrity: All work submitted in each course must be the Learner’s own. This includes all assignments, exams, term papers, and other projects required by the faculty mentor. The known submission of another person’s work represented as that of the Learner’s without properly citing the source of the work will be considered plagiarism and will result in an unsatisfactory grade for the work submitted or for the entire course, and may result in academic dismissal.…

    • 2269 Words
    • 10 Pages
    Best Essays
  • Powerful Essays

    Academic Integrity: All work submitted in each course must be the Learner’s own. This includes all assignments, exams, term papers, and other projects required by the faculty mentor. The knowing submission of another persons work represented as that of the Learner’s without properly citing the source of the work will be considered plagiarism and will result in an unsatisfactory grade for the work submitted or for the entire course, and may result in academic dismissal.…

    • 2350 Words
    • 10 Pages
    Powerful Essays
  • Good Essays

    Utilize the Plagiarism Checker resource prior to submitting each assignment to ensure originality. Should plagiarism be found, the checker will provide references to be cited. Consequences for violating academic rules and guidelines may vary per incident, to the schools discretion but should not be taken lightly. Students considering academic dishonesty should expect this behavior to lead to a failing grade, expulsion from school, and loss of financial aid funds.…

    • 1216 Words
    • 5 Pages
    Good Essays
  • Good Essays

    Programming Homework

    • 366 Words
    • 2 Pages

    What is the necessary input and how you will obtain the required output from the given input?…

    • 366 Words
    • 2 Pages
    Good Essays
  • Powerful Essays

    Unit 1 Assignment 4

    • 1458 Words
    • 8 Pages

    Copied work will be graded as a FAIL and disciplinary action may be taken against you…

    • 1458 Words
    • 8 Pages
    Powerful Essays
  • Better Essays

    h and s

    • 1427 Words
    • 6 Pages

    Copied work will be graded as a FAIL and disciplinary action may be taken against you…

    • 1427 Words
    • 6 Pages
    Better Essays
  • Powerful Essays

    Assignment 10

    • 2020 Words
    • 9 Pages

    Academic Integrity: All work submitted in each course must be the Learner’s own. This includes all assignments, exams, term papers, and other projects required by the faculty mentor. The known submission of another person’s work represented as that of the Learner’s without properly citing the source of the work will be considered plagiarism and will result in an unsatisfactory grade for the work submitted or for the entire course, and may result in academic dismissal.…

    • 2020 Words
    • 9 Pages
    Powerful Essays
  • Good Essays

    Polling America

    • 623 Words
    • 3 Pages

    Academic integrity: All work submitted in each course must be your own original work. This includes all assignments, exams, term papers, and other projects required by your instructor. Knowingly submitting another person’s work as your own, without properly citing the source of the work, is considered plagiarism. This will result in an unsatisfactory grade for the work submitted or for the entire course. It may also result in academic dismissal from the University.…

    • 623 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    manage risk

    • 1369 Words
    • 10 Pages

    Plagiarism/Cheating is a serious offence. If a student is found plagiarising/cheating, it may result in a penalty of suspension/cancellation of student’s enrolment.…

    • 1369 Words
    • 10 Pages
    Powerful Essays
  • Good Essays

    serious offense. If you plagiarize, you will receive a zero for the assignment and be referred to Student…

    • 4725 Words
    • 19 Pages
    Good Essays