Compile the compiler using the ant command

Assignment Help JAVA Programming
Reference no: EM132464474

CSC 460/660 - Compiler Construction - University of Nevada

The Espresso Compiler Project

Question:

You are of course free to do things in which ever order you like, but I suggest the following approach.

• Read through the grammar.

• Using the grammar rules, pick out all the terminals and compile a list of them, in the right order, with their names.

• Finish the flex file by adding in all the missing terminals; use the examples already given in the file to get the syntax correct.

• Add all terminals to the CUP file in the right order, and remember they are all of type Token.

• Add all the non-terminals to the CUP file. Since we are not building a parse tree in this phase, simply use the type AST as the type of all the non-terminals. We will refine this when we start building the parse tree in the next phase.

• Add the productions according to the grammar (see below how to interpret the grammar).

Do not construct any parse tree at this time. You may leave the action part of the production, i.e., the part that appears between {: :} blank. For debugging purposes, you could also put print statements that print out the names (and values) associated with the productions. This makes it easier to trace any potential errors. Be VERY careful when you transcribe the grammar; the slightest mistake can cause many hundreds of shift/reduce and reduce/reduce conflicts. I suggest you do it in an iterative fashion, slowly adding more and more information to the file. Do not type in the grammar by hand-copy it from the web page and then 'fix it up'. This will save you a lot of time and headaches caused by mistyping. Also be careful about semicolons; (!) all CUP productions are terminated by a semicolon. The grammar contains ';' as a terminal symbol, but in CUP that would be represented by the terminal SEMICOLON (this is what the semicolon is called by Flex. If you miss these SEMICOLON terminals you will get a lot of shift/reduce and reduce/reduce conflicts, so look for these as the first thing you do if you have such error messages.

• Compile the compiler using the ant command.

• Run the 'espressoc' script to test your compiler.

• Compare to my reference implementation.

Attachment:- Compiler Construction.rar

Reference no: EM132464474

Questions Cloud

PGBM02 Managing and Leading People Assignment : PGBM02 Managing and Leading People Assignment Help and Solution - The University of Sunderland, UK. Critically analyse the role of Line Manager
Selected to head up the team to conduct hand-washing audit : Selected to head up the team to conduct hand-washing audits on all the nursing units. Whom do you want on your team and why?
What types of communication did observe : What types of communication did you observe?Describe differences in communication amongst people (consider differences such as age, gender, ethnicity).
What is the author advice to consumers and to businesses : What is the difference between how consumers perceive personalized ads and how marketers perceive them?What is author's advice to consumers and to businessess
Compile the compiler using the ant command : The Espresso Compiler Projec - Using the grammar rules, pick out all the terminals and compile a list of them, in the right order, with their names.
Accounting firm computer network : For each of the following, state whether you think X is a Binomial random variable, Poisson random variable or neither.
Determine how companies are adopting lean practices : Determine how Companies are adopting lean practices, including inventory management, to improve their operations.Do you think these principles would help manage
Breakeven volume between option 1 and option 2 : What is the breakeven volume between option 1 and option 2? You should calculate this answer, but be sure you verify with your graph.
Which statistical test should be used to analyze the data : As a researcher I am interested to know whether participating in sports positively influences self-esteem in young girls. I go ahead and identify a group

Reviews

len2464474

2/27/2020 11:27:56 PM

compiler construction Please open the Espresso.pdf file. Then, look at chapter 1: phase one scanning and parsing, all steps of the assignment are in the chapter one From page7-20 Also, the requirements of phase one is written one the "work list section page 11-12" I will send the script file to your Email. Deadline is today before 8:00pm "California time" Please I need to receive the solution file in 12 hours from now.

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

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

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