Lexical analyser, Computer Engineering

The aim of this project is for you to construct a fully working compiler for a small simple programming language, SPL. The compiler will read in SPL source code and produce ANSI C as output.

A full description of the language is given in this document, from which, over the course of the semester, you will construct a compiler using some of the techniques learnt in the lectures and by using the Unix utilities Lex and Yacc or the Cygwin/linux utilities Flex and Bison.

At this point in the course you will not be able to attempt most of this project. Do not worry. Over the next few weeks you will be given the information necessary to attempt the various stages of the project as they arise.

The project is almost a whole semester long and is split in to five components, with milestones staged throughout the course of the semester. You should aim to show your completed work at each stage to a laboratory demonstrator who can track your progress and offer advice that might help you advance to the next part.

The component stages are as follows

A BNF description of the SPL language described by the roadmaps given in this document. This should be submitted on paper.

A Lexical Analyser file which will enable Flex or Lex to generate a working lexical analyser for the language.

A partially complete Parser file containing all of the code necessary to create a parse tree using the Yacc or Bison tools.

A complete Parser file which also includes a code generation function so that you now have a fully working compiler using the tools Yacc or Bison.

A word-processed report on the complete project. This should include printed examples demonstrating the operation of your compiler on both correct and incorrect code, and listings of the components.

If you are unable to complete any part for the whole SPL language you should reduce the language to a subset so that you can complete the compiler.

Posted Date: 3/9/2013 2:26:43 AM | Location : United States







Related Discussions:- Lexical analyser, Assignment Help, Ask Question on Lexical analyser, Get Answer, Expert's Help, Lexical analyser Discussions

Write discussion on Lexical analyser
Your posts are moderated
Related Questions
Q. Characteristics of input- output channels? The I/O channel represents an extension of DMA concept. An I/O channel has ability to execute I/O instructions that gives complete

For JK flipflop J = 0, K=1, the output after clock pulse will be ? Ans. J=0 and K=1, such inputs will reset the flip-flop, after the clock pulse. Therefore whatever be the earlie

What are the two types of branch prediction techniques available?  The two types of branch prediction methods are  1) Static branch prediction  2) Dynamic branch predicti

Q. Instruction Queue in Bus Interface Unit? Instruction queue is employed to store the instruction ‘bytes' fetched. Please conceren two points here: that it's (1) A Byte (2) Qu

Q. What is a virtual address? Von Neumann had suggested that execution of a program is possible only if program and data are residing in memory. In such a condition program len

Explain difference between macro call and macro expansion. Macro expansion: While a macro name is used along with a set of actual parameters this is replaced through a code g

Explain one dimensional arrays In one dimensional arrays array name is really a pointer to the first element in the array. Second element of the array can be accessed by using

What is USB USB (UNIVERSAL SERIAL BUS) is intended to connect peripheral devices like mouse, keyboards, modems and sound cards to microprocessor through a serial data path and

Now let's get a grip on how to add interactivity to your web documents by way of the tag. With this tag you can add to your web pages a guestbook, surveys, order forms, ge

Question 1: (a) What do you meant by an expert system? (b) Describe benefits of the EDI. (c) Describe what you understand by: (i) File Infectors (ii) Boot Sect