University : Liverpool John Moores University UniLearnO is not sponsored or endorsed by this college or university.
Country : United Kingdom
Assignment Task :

Introduction

This assignment is an individual task, please read all details of this coursework spec. You will expand a given lexical analyser/parser (written in Java) to handle a simple language (CalcInt), as well as expanding a context free grammar for the language’s specification. You should follow an established Software Development Lifecycle to design and develop an efficient solution to the problem specification.

 

Learning Outcomes to be assessed

LO1. Explain the key concepts in specifying and evaluating a programming language

LO2. Apply appropriate formal methods to specify a programming language

LO3. Synthesise appropriate algorithms and data structures to fulfil a problem specification

LO4. Appraise Imperative and Declarative programming paradigms as an appropriate mechanism for a variety of problem domains

 

Detail of the task

Problem Specification – CalcAlpha Language

You will design and implement an extension to an interpreter for an extension to the CalcInt Language that is specified below. You are provided with an interpreter, written in Java, which is an interpreter for the current (unextended) version of CalcInt. You should use the provided Java interpreter (in CalcX.zip on Canvas) as a basis for your coding.

 

Upon entering source code into your program, the output that should be produced is:

  1. Either: 

    1. “Lexical analysis successful.\n” if the program is correctly passed through the lexical analyser, at which point it should output a list of tokens;

    2. “Error in lexical analysis of program.\n” after which your program should stop (possibly also outputting other error messages).

  2. If the program passes lexical analysis, your program should output: 

    1. “Parsing successful.\n” if the parsing phase of your interpreter successfully parses the output of your lexical analyser, otherwise:

    2. “Error in parsing of the program.\n” after which your program should stop (possibly also outputting other error messages).

  3. If the input program successfully parses, and there are no other errors, then your program should interpret the parsed program and output the result (e.g. a signed integer). 

 

This IT Computer Science Assignment has been solved by our  IT Computer Science Experts at UniLearnO. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

  • Uploaded By : Grace
  • Posted on : December 04th, 2018
  • Downloads : 365

Whatsapp Tap to ChatGet instant assistance