Computer Science (Compiler Design)
College of Computing and Informatics Assignment 1 Deadline: Day 03/03/2024 @ 23:59 [Total Mark for this Assignment is 8 ] Student Details: Name: ID: CRN: Instructions: • You must submit two separate copies (one Word file and one PDF file) using the Assignment Template on Blackboard via the allocated folder. These files must not be in compressed format. • It is your responsibility to check and make sure that you have uploaded both the correct files. • Zero mark will be given if you try to bypass the SafeAssign (e.g. misspell words, remove spaces between words, hide characters, use different character sets, convert text into image or languages other than English or any kind of manipulation). • Email submission will not be accepted. • You are advised to make your work clear and well-presented. This includes filling your information on the cover page. • You must use this template, failing which will result in zero mark. • You MUST show all your work, and text must not be converted into an image, unless specified otherwise by the question. • Late submission will result in ZERO mark. • The work should be your own, copying from students or other resources will result in ZERO mark. • Use Times New Roman font for all your answers. Question One Pg. 01 Learning Outcome(s): Understand the concept of scanning and parsing and constructing an Abstract Syntax Tree. Question One 2 Marks The parser is used to construct sentences out of words in a natural language by a context-free grammar (CFG) that considers the two subsets known as LL(1) and LR(1) grammars. a. What is the difference between LL(1) and LR(1) grammars. b. Find out whether the following grammar is LL(1) or not: S → aSbS | bSaS| ∈ Question Two Pg. 02 Learning Outcome(s): Understand the concept of scanning and parsing and constructing an Abstract Syntax Tree. Question Two 2 Marks A finite automaton (FA) is an abstract machine that can be used to represent certain forms of computation in a graph that consists of states and edges from an alphabet Σ. Convert the following regular expression to finite automaton (FA): (a|b)*(abb|a) Question Three Pg. 03 Learning Outcome(s): Understand the concept of scanning and parsing and constructing an Abstract Syntax Tree. Question Three 2 Marks Describe the concept of the abstract syntax tree (AST), and solve the following statement: for(a=10 ; a < 100 ; a+5) Print a; Question Four Pg. 04 Learning Outcome(s) Understand the concept of scanning and parsing and constructing an Abstract Syntax Tree. Question Four 2 Marks The symbol table is referenced throughout the semantic analysis stage to evaluate the correctness of some code, describe its concepts and six operations in details.
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.
