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

Find out data changing from special code to temporal code, Data can be chan...

Data can be changed from special code to temporal code by using ? Ans. By using Shift Registers data can be changed from special code to temporal code. A Register wherein data ge

Define edge triggered d flip flop, Define Edge Triggered D flip-flop? D...

Define Edge Triggered D flip-flop? D latch has only two inputs C(control) and D(data). The operation of a D flip-flop is a lot simpler and it has only one input addition to the

What are the types of electronic payment system, What are the types of elec...

What are the types of electronic payment system? Types of the electronic payment system are as given below: The most Internet payment way for Business to Customer is credit

Define parsing, Define Parsing Parsing is the method of analyzing a te...

Define Parsing Parsing is the method of analyzing a text, made up of a sequence of tokens, to define its grammatical structure with respect to a given formal grammar. Parsing

Path & Path Production, Take the following flow graph and use the procedure...

Take the following flow graph and use the procedure in chapter 8 to derive an equivalent regular expression. Show all intermediate graphs (to ensure that you follow the procedure,

Explain process of file transfer protocol, Q. Explain process of File Trans...

Q. Explain process of File Transfer Protocol? FTP (File Transfer Protocol), a standard Internet protocol, is the simplest way to exchange files between computers on Internet. L

How different are interface and abstract class in .net, How different are i...

How different are interface and abstract class in .Net? Abstract classes cannot be instantiated it can have or can't have abstract method basically known as must inherit as th

Various threats posed by server in client server environment, Explain vario...

Explain various threats posed through servers into a client server environment. Server Destroyed within an Accident: Power failures, Leaking pipes and equipment failures are no

Perform multiplication with showing content of accumulator, Perform multipl...

Perform multiplication with showing the contents of accumulator, B register and Y register during each step. (Accumulator, B, Y are 4-bit registers) B=06 Y=02

Performance and issues in pipelining-throughput, Performance and Issues in ...

Performance and Issues in Pipelining Throughput:  Throughput of a pipeline can be defined as the number of results that have been getting per unit time. It can be denoted as:

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