Produce the collection of sets

Assignment Help Computer Engineering
Reference no: EM131690203

Assignment cparse

Your assignment is to read in a start symbol of a set of productions followed by the set of productions from stdin and produce the collection of sets of LR(0)  items  to stdout. An example input file is given on the next page and is in the ~uh/proj3/cparse.in file. The program makes the following assumptions about the input.

(1) The start symbol is the first character on the first line.

(2) Productions start at the beginning of each of the following lines and are of the form N->rhs, where N is a nonterminal and rhs is a string of nonterminals and terminals. A "|" representing alternative rhs's is not allowed.

(3) A nonterminal is a single uppercase letter.

(4) A terminal is a single character that is not an uppercase letter, "@", or a "'".

The output consists of two parts. First, the augmented grammar should be printed. Next, the sets of LR(0) items will be printed. An example output file is given on the next page and is in the ~uh/proj3/cparse.out file.  The form of your output should match my output exactly, which will facilitate grading.  The program makes the following assumptions about the output.

(1) The position is represented with a "@".

(2) The augmented grammar start symbol is represented by a "'".

(3) A set of items is represented by the form I#, where # is a number.  Sets are numbered starting from zero.

(4) The size of an item is no more than 20 characters (including a NULL character).

Attachment:- Assignment File.rar

Reference no: EM131690203

Questions Cloud

Work process flowchart analyzed : the company that the assignments should be done at is called Mideast Data Systems-Oman - This is the guideline for research project
Damages are typically awarded for pain suffering-lost wages : Compensatory damages are typically awarded for pain suffering and lost wages
Discuss what should be considered when designing instruction : In light of Ausubel's assimilation theory, discuss what should be considered when designing instruction for a simple task like painting a wall.
What is malcolm x significance for their religious tradition : What is his/her significance for their religious tradition? What would you argue are his/her main contributions toward his/her tradition?
Produce the collection of sets : COP 4020 Assignment cparse. Read in a start symbol of a set of productions followed by set of productions from stdin and produce collection of sets of LR(0)
Estimate the debt ratio for iou if it eliminates dividends : IOU Inc. has $ 5 billion in debt outstanding (carrying an interest rate of 9%), and 10 million shares trading at $ 50 per share.
Level of connectivity for both society and businesses : Although there are a number of benefits to this level of connectivity for both society and businesses,
Nectar in a sieve : Respond to the following in the form of a short essay. Your essay should consist of at least five paragraphs.
Estimate the debt ratio each year for the given years : MiniSink Inc. is a manufacturing company that has $ 100 million in debt outstanding and 9 million shares trading at $ 100 per share.

Reviews

len1690203

10/25/2017 2:27:53 AM

Assignment started I just need the file fixed to actually meet the requirements. You may not assume any limit to the number of productions, items in a set, or the number of sets. Submit your *single* source file cparse.c (or cparse.cpp) to Canvas assignment link. A grade of zero will be recorded for missed exams and late assignments unless prior arrangements are made. Assignments turned in after the due date, but by the next 3 days of the due date will be penalized 10%. Assignments will not be accepted after this.

Write a Review

Computer Engineering Questions & Answers

  Write the bubble sort

The village of Marengo conducted a census and collected records that include household data, including the number of occupants in each household.

  Which sort of graphic is the right choice, vector or bitmap

When your boss or client hands you a job, how would you make the determination which type of graphic is the right choice, Vector or Bitmap, in your response, define what parameter you would use and what variable you would have to weigh in your dec..

  Determining the total balances forward and total withdrawals

A heading is to emerge at the top of each page and allowance is to be made for the 45 detail lines per page. At the end of the report, print total balances forward, total withdrawals, total deposits, total interest earned and total final account b..

  Define the three way tcp/ip handshake in connection setup

Come up with a diagram and explain the three way TCP/IP handshake in connection setup and the 3 way TCP/IP handshake in connection release.

  Questiona house has a house number and an x y location

questiona house has a house number and an x y location where x and y are numbers between - 10 and 10. the key member

  Discuss about the general sampling

Write a report addressed to Mason & Jarr stating whether they did or did not observe the essential elements of auditing standards in each case.

  Explain two types of health care information systems

Analyze the impact of the effect on organizational decision-making.Make recommendations for implementation and improvements.

  Define what situations are appropriate for hard disks

define what situations are appropriate for Tape. Explain why.define what situations are appropriate for hard disks. Explain why.

  About letter is transmitted in an electrical-light,and radio

there is a common misconception that analog technology is no longer used in the transmission of digital data. However, analog transmission of data is transmitted using electricity, light, and radio. Transmissions in the air use radio, microwave, a..

  Explain how bar code readers work

How does the use of online transaction processing (OLTP) improve the timeliness of online real-time processing?- Explain how bar code readers work.

  Explain the type of protocol you would use in this situation

Your company has a network that contains several NetWare 4.11 servers and uses IPX as the routing protocol. Each of the network segments has minimum one NetWare server on it. Which of the following responds to a Get Nearest Server (GNS)request from..

  Questionpart ain this assignment you will use server

questionpart ain this assignment you will use server manager to configure all device hardware drives and ports on

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