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. Selecting integerated learning experiences? It is important that we select appropriate experiences for children, more so those that are from the child's world and emerge fro

Explain the difference between a subroutine & macro. It is inefficient to have to write code for standard routines.  For instance reading a character form the keyboard or savin

Why is Cloud Computing important? There are many implication of cloud technology, for both developers and end users. For developers, cloud computing gives increased amounts of

Determine the begin - end keywords Group several statements together. Cause the statements to be evaluated sequentially (one at a time) -> Any timing within sequential group

In MS Access, the long and short date option does not show 4 digit years. How do I achieve the mm/dd/yyyy format? Ans) In the date field properties of the table, form, or prop

Explain about the Public Key Cryptography. Public Key Cryptography: It is a cryptographic system which uses two keys as a public key identified to everyone and a private

Nanoprogramming:  Second compromise: nanoprogramming  it use a 2-level control storage organization  Top level is a vertical format memory  Output of the top level

Design an algorithm (using pseudocode) that takes in as an input, two 2-D int arrays that are assumed to be 2 black-and-white images: initialImage x, whose dimensions are IxJ, and

Illustrate some notations of object modeling notations A classifier is a mechanism which describes behavioural and structural features. In UML significant classifiers are cla

Cache Memories - computer architecture: Speed of the primary memory is very low in comparison with the speed of processor For well performance, the processor can't spend