Make expression analyser which compile arithmetic expression

Assignment Help Programming Languages
Reference no: EM132233146

Assignment - Expression Analyser

Introduction - This assignment requires you to build an expression analyser which compiles arithmetic expressions into a form that can be evaluated by a stack-based interpreter, together with documentation.

You are also required to produce and present details of the formal specification of the expression analyser. The parser should have options to display the internal representation of parsed expressions in an easily readable form (e.g. using graphviz or similar- if you are using Antlr it does show the parse tree). The final program should produce sensible error messages if given ill-formed expressions.

1. You need to submit the Specification and Implementation electronically by the published deadline.

2. You need to demonstrate the implementation in the lab, (date 19-Feb).

The Specification - You are expected to provide a specification of the languages and translations that are involved in your expression compiler. These should include:

1. the tokens of the source (and target) language;

2. the syntax of the expressions of the source language;

3. the syntax of the target language;

4. a declarative description of the translation.

If you extend the system to deal with floating point values, then these should also be described.

The Tokens - Formulate regular expressions that define what tokens are recognised. These should be structured definitions. The top level should be the regular expression that matches any token. The next level should be the names of the main token types.

The Expressions - You should state the syntax of the expressions that your system recognises (the source expressions) using BNF or EBNF notation. The formulation should be expressed in terms of the tokens you have defined.

The Target Language - Provide a formalisation of the target language in (E)BNF.

The Translation - Give a declarative description of how the source language is to be translated in the target language. This should be a recursive definition stated mathematically, or in clear English.

The Implementation - You can try using libraries, such as java.util.regex, and ANTLR. In the latter case, you will be expected to select and learn about the tools by yourself. Your report should then contain a description of how the tools were applied.

Hand-coded systems will be assessed for coding quality. Systems produced using tools will be assessed for the effectiveness with which those tools were used.

Extended features - Some marks will be awarded for program features. Features include

1. visual rendering of the parse tree.

2. support for floating-point expressions as well as integers.

3. helpful and informative errors messages,

You are expected to attempt at least one such feature.

Modularity - Program code will be assessed for its modularity. A clear separation of the different aspects of the system (tokenisation, parsing) is expected.

Documentation - Your program code should be documented.

Notes -

1. The task is fully described in the PDF file. It has to do with building an expression analyser which compiles arithmetic expressions that can be evaluated by a stack-based interpreter.

2. Report of the assignment to be written in Microsoft Word. The report should contain as required:

a. The specification of the analyser.

b. Documented Implementation which basically means the documentation of the program code.

3. The implementation refers to the expression analyser which is the program code.

3. The assignment requires extended features as you will see in the instructions.

Attachment:- Assignment File.rar

Reference no: EM132233146

Questions Cloud

Rational and political models of strategic decision making : Compare and contrast the strengths and weaknesses of Rational and Political models of strategic decision making.
Create some sort of optical effect : Project uses transformation processes or tools to create some sort of optical effect. This transformation can be achieved by manually editing, scaling.
Through all stages of the product life cycle : Choose a consumer product that you use on a daily basis that has been in the market long enough to have moved through all stages of the product life cycle.
Creation packages like endnote-refworks : Create bibliography for two articles using CiteThisForMe or another relevant reference creation packages like EndNote, RefWorks, ProCite and Reference Manage.
Make expression analyser which compile arithmetic expression : CE305 Assignment - Expression Analyser. build an expression analyser which compiles arithmetic expressions into a form that can be evaluated
News agency due to downturn in magazine sales : This arrangement works well for four (4) months until Ned is unexpectedly dismissed from his job at the news agency due to a downturn in magazine sales.
Substitutes for commodity which forms major raw material : Looking for substitutes for a commodity which forms a major raw material in the goods manufactured by the company is a correct business decision;
Write non-tail-recursive and other tail-recursive function : Write two versions, one non-tail-recursive and the other tail-recursive - Complete the code for the function that takes an integer n as argument
Identify local non-profit organization-agency to profile : Identify a local non-profit organization/agency to profile. What is their mission statement? What does their organizational chart suggest about their structure?

Reviews

len2233146

2/12/2019 10:45:58 PM

The Submission - The electronic submission should include the specification and the documented implementation. The documentation for the implementation can be included as a section in the report, as clear and detailed comments in the program source files, or as a separate document. The Demonstration - (TBC) You will be expected to demonstrate your program(s) in the lab session following the submission . You may wish to start extending your expression analyser ready for the second assignment. Add support for variables, and assignment statements that assign values to those variables. Add control flow for multiple statements, with Boolean expressions.

len2233146

2/12/2019 10:45:52 PM

The task is fully described in the PDF file I have attached. It has to do with building an expression analyser which compiles arithmetic expressions that can be evaluated by a stack-based interpreter. All the instructions for the Assignment are given in the PDF file I have attached. Format Please I would like the format of the assignment in the following way. That means how I want my work to be arranged: Report I would like the report of the assignment to be written in Microsoft Word. The report should contain as required: The specification of the analyser. Documented Implementation which basically means the documentation of the program code.

len2233146

2/12/2019 10:45:47 PM

Implementation The implementation refers to the expression analyser which is the program code. I will just like to have all the code files correctly labelled and clearly labelled. You can put all the code files in one folder if necessary. The assignment requires extended features as you will see in the instructions. Please I would like to have at least 2 out of the 3 extended features in my work. Please I would like a simple text document clearly labelled showing me instructions on how to run the code and run my program.

len2233146

2/12/2019 10:45:41 PM

Please in general, I would like to have everything labelled clearly so I know what each part is for. This include titles in the report so everything will be clear. Please look at the marking scheme carefully to have an idea of how the marks will be graded and to guide you in completing the work. The marking scheme can also be found in the PDF file. There is no specific amount of words that needs to be in the report. Please the amount of words in the report should be as many as necessary. Thank you.

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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