Questions in attached file

• implement lexical analysers using lex (Problem 3);

• implement parsers using lex and yacc (Problems 1, 4);

• practise proof by induction (Problem 2);

• practise using the Pumping Lemma for regular languages (Problem 7);

• build a Turing machine (Problem 5);

• learn more about Turing machines (Problems 5–7).

Solutions to Problem 5 must be implemented in the simulator tuataraMonash Document Preview:

Monash UniversityFaculty of Information Technologynd2 Semester 2018FIT2014Assignment 2Regular Languages, Context-Free Languages, Lexical analysis, Parsing,and Turing machinesDUE: 11:55pm, Friday 5 October 2018In these exercises, you will implement lexical analysers using lex (Problem 3); implement parsers using lex and yacc (Problems 1, 4); practise proof by induction (Problem 2); practise using the Pumping Lemma for regular languages (Problem 7); build a Turing machine (Problem 5); learn more about Turing machines (Problems 5{7).Solutions to Problem 5 must be implemented in the simulator tuataraMonash (version 2.1 ofTuatara), which is available on Moodle.How to manage this assignment You should start working on this assignment now, and spread the work over the time untilit is due. Aim to do at least three questions before the mid-semester break. Do as much aspossible before your week 10 prac class. There will not be time during the class itself to dothe assignment from scratch; there will only be time to get some help and clarication. Don’t be deterred by the length of this document! Much of it is an extended tutorial to getyou started with lex and yacc (pp. 2{5) and documentation for functions, written in C, thatare provided for you to use (pp. 5{7); some sample outputs also take up a fair bit of space.Although lex and yacc are new to you, the questions about them only require you to modifysome existing input les for them rather than write your own input les from scratch.InstructionsInstructions are as for Assignment 1, except that some of the lenames have changed. The leto download is now asgn2.tar.gz, and unpacking it will create the directory asgn2 within yourFIT2014 directory. You need to construct new lex les, using chain.l as a starting point, forProblems 1, 3 & 4, and you’ll need to construct a new yacc le from chain.y for Problem 4. Yoursubmission must include (as well as the appropriate PDF les for the…

Attachments:

prac2.pdf