Reference no: EM131265622
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 ˜cop4020p/LIB/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 non-terminal and rhs is a string of non-terminals and terminals. A "|" representing alternative rhs's is not allowed.
(3) A non-terminal 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 ˜cop4020p/LIB/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).
You can use the following printf strings to format your output:
"I%d:\n" - set of items number
" %-20s goto(%c)=I%d\n" - item with a goto
" %-20s\n" - item without a goto
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) using the following submit.sh command on
shell.cs.fsu.edu
% submit.sh deliverables.sh
Attachment:- Project Assignment.rar
State the six management functions
: 1. A primary responsibility of any manager is to monitor change. How do managers monitor change? Please be specific. 2. State the six (6) management functions and how each plays a role in a manager's daily routine?
|
Overcoming stage fright team
: Discuss the previous questions as a class. - Then, in groups of three or four talk about ways to overcome these fears.
|
Analyse challenges in accounting facing the industry
: Analyse challenges in Accounting facing the industry using quantitative and qualitative analytical tools - write a detailed analysis of the strengths and limitations of your entire project
|
Calculate the phase current in the second machine
: Two star-connected generators are connected in parallel and supply a balanced load of 1500 kVA at 11 kV line voltage and 0.8 lagging power factor.
|
Produce the collection of sets of lr
: COP 4020 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 nex..
|
The amount to be reported as an investment in helbert stock
: On January 1, Zabel Corporation purchased a 25% equity in Helbert Corporation for $181,000. At December 31, Helbert declared and paid a $47,000 cash dividend and reported net income of $176,800. Journalize the transactions. Determine the amount to be..
|
Problem regarding the friedman assessment
: After watching the video, The World Is Flat, discuss whether or not you agree with Friedman's assessment that the world is flat. While there is no correct answer to this question, you must justify your point of view.
|
Determine the output torque of the prime-mover
: A 3-phase hydroelectric synchronous generator is read to be 110 MW, 0.8 pf lagging, 6-kV, Y- connected, 50 Hz, 100-rpm.
|
Explain the type of direct reading instrument
: Discuss the type of direct reading instrument that you would need to use as part of an OSHA compliant confined space atmospheric testing program.
|