Lexical analyser, Computer Engineering

Assignment Help:

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.


Related Discussions:- Lexical analyser

Raid and data stripping, Explained RAID? Ans: High performance devices ...

Explained RAID? Ans: High performance devices tend to be costly. So we can gain very high performance at a reasonable cost using a number of low-cost devices operating in paral

Computer Graphics, Distinguish between uniform scaling differential scaling...

Distinguish between uniform scaling differential scaling

Difference between panel and group box classes, Difference between Panel an...

Difference between Panel and Group Box classes? Panel & Group box both can used as container for other controls like radio buttons & check box. The dissimilarity in panel & gro

Define congestion and grade of service, Define congestion and grade of serv...

Define congestion and grade of service. Congestion : This is uneconomic to give sufficient equipment to carry all the traffic which could possibly be offered to a telec

Write miss policy - cache memories, WRITE MISS POLICY:   Write allo...

WRITE MISS POLICY:   Write allocate   fetch on write   fetch entire block, then write word into block   allocate a new block on each writ   allocate block, but

What are the 3 things that are needed to specify a route, 1. URL Pattern - ...

1. URL Pattern - You can contain placeholders in a URL pattern so that variable data can be passed to the request handler without having a query string. 2. Handler - The handle

What is the syntax of the assembler directive equ, The syntax of the assemb...

The syntax of the assembler directive EQU is ? Ans. The syntax of the assembler directive EQU is as given below: EQU

Various ways of floating point representation in memory, Describe the vario...

Describe the various ways of floating point representation in memory. What is the importance of normalizing the mantissa in this representation? Explain it by example(s)?

What are the cycle based simulators, What are the Cycle based simulators ...

What are the Cycle based simulators Cycle based simulators are more like a high speed electric carving knife in comparison since they focus on a subset of the biggest problem:

Researching strategy - artificial intelligence, Researching strategy - arti...

Researching strategy - artificial intelligence: If our search and researching strategy and swot of it is surety to find all types of hints such the solutions eventually, then

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd