This is a subset of C+ language. Description of the language as follow: Detail Note #DEFINE...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
This is a subset of C+ language. Description of the language as follow: Detail Note #DEFINE // define is keyword DEFINE / Nothing Reserve words CONST, FLOAT , INT, BREAK, CONTINUE , ELSE , FOR , SWITCH, VOID, CASE, ENUM , SIZEOF, TYPEDEF ,CHAR ,DO, IF, RETURN, UNION, WHILE, GIFT, DEAN, HOD, and, #INCLUDE // include is keyword INCLUDE // Nothing " cannot be an identifier. cannot be last symbol of id. Must have one or more digit. or Identifiers examples (vallu e, r2ate, Clo_unter, 2test123, etc Can start with Digit. Numbers example (123,223, 23.5, 0.45 etc) <>,!=,,=, =,*, +,1,, >>>,<<, ++, +=,, --, &&, |I. |& as XOR, &| as NOR; 3. 4 Operators User input/output Input>>>, output« use instead of >> 6. "<<" use instead of << 7. Punctuations 8 Comments /this is comment Project Description: For this assignment, you have to implement a lexical analyzer, also called a scanner. This assignment includes following parts: PARTS Output Marks Define Lexical Specification (Regular Expressions) for all 1 token types. Document 2 Generate NFA for each regular expression or complete DFA Document 10 4 Code (Pre Lex and Lexical Analysis) Source Code Files 85 Total 100 Absolute 10 Evaluating Criteria: 1. Source code should reflect the detail given in documents (other parts). 2. A text file with valid source code will be input of the scanner and Token file will be output of the scanner tool. 3. All points discussed in the class related to scanner implementation should reflect in the assignment. 4. Application should not do which is not supposed to do. SCANNER Sourcecode.txt Token.txt Error.txt 5. In case of invalid source code tool must generate error list. This is a subset of C+ language. Description of the language as follow: Detail Note #DEFINE // define is keyword DEFINE / Nothing Reserve words CONST, FLOAT , INT, BREAK, CONTINUE , ELSE , FOR , SWITCH, VOID, CASE, ENUM , SIZEOF, TYPEDEF ,CHAR ,DO, IF, RETURN, UNION, WHILE, GIFT, DEAN, HOD, and, #INCLUDE // include is keyword INCLUDE // Nothing " cannot be an identifier. cannot be last symbol of id. Must have one or more digit. or Identifiers examples (vallu e, r2ate, Clo_unter, 2test123, etc Can start with Digit. Numbers example (123,223, 23.5, 0.45 etc) <>,!=,,=, =,*, +,1,, >>>,<<, ++, +=,, --, &&, |I. |& as XOR, &| as NOR; 3. 4 Operators User input/output Input>>>, output« use instead of >> 6. "<<" use instead of << 7. Punctuations 8 Comments /this is comment Project Description: For this assignment, you have to implement a lexical analyzer, also called a scanner. This assignment includes following parts: PARTS Output Marks Define Lexical Specification (Regular Expressions) for all 1 token types. Document 2 Generate NFA for each regular expression or complete DFA Document 10 4 Code (Pre Lex and Lexical Analysis) Source Code Files 85 Total 100 Absolute 10 Evaluating Criteria: 1. Source code should reflect the detail given in documents (other parts). 2. A text file with valid source code will be input of the scanner and Token file will be output of the scanner tool. 3. All points discussed in the class related to scanner implementation should reflect in the assignment. 4. Application should not do which is not supposed to do. SCANNER Sourcecode.txt Token.txt Error.txt 5. In case of invalid source code tool must generate error list.
Expert Answer:
Answer rating: 100% (QA)
Answer1 Lexial Analysis is the first phase of the compiler also known as scanner It converts the hig... View the full answer
Related Book For
Probability and Statistics for Engineering and the Sciences
ISBN: 978-1305251809
9th edition
Authors: Jay L. Devore
Posted Date:
Students also viewed these programming questions
-
The accompanying data is a subset of the data reported in the article "Synovial Fluid pH, Lactate, Oxygen and Carbon Dioxide Partial Pressure in Various Joint Diseases" (Arthritis and Rheumatism,...
-
The following data is a subset of data obtained in an experiment to study the relationship between x = soil pH and y = A1 Concentration/EC ("Root Responses of Three Gramineae Species to Soil Acidity...
-
Why do long steam pipes often have one or more relatively large U-shaped sections of pipe?
-
Hot Locks Company developed the following information for its hair dryer sales: Sales price $ 125.00 per unit Variable manufacturing cost $ 44.75 per unit Variable selling expense ...
-
Steel is an alloy of iron and nickel. A steel recycling company has two piles of scrap steel. Pile A contains steel with 5.25% nickel content. Pile B contains steel with 2.84% nickel. The company has...
-
Describe the kind of information needed by the users listed. Owners (present and future) Managers Creditors (present and future) Government agencies
-
Refer to the information in Problem 21-1B. Tohono Companys actual income statement for 2017 follows. Required 1. Prepare a flexible budget performance report for 2017. Analysis Component 2. Analyze...
-
Suzaki Manufacturing Company is considering three new projects, each requiring an equipment investment of $22,000. Each project will last for 3 years and produce the following cash inflows. The...
-
Solve the linear programming problem by the method of corners. (There may be more than one correct answer.) C=5x+by Minimize subject to 4x + y 42 2x+ y 30 x+3y 2 30 x20, y 20 The minimum is C 52.5...
-
The AGRI Venture: An Integrated Marketing Communications Program. Chapter 16 states that there are three major forms of cooperative advertising: horizontal, ingredient-sponsored and vertical. Discuss...
-
Problem 1.2-4 Material description of an 3.0 1.00 0.75 2.5 0.50 0.25 0.00 2.0 axisymmetric stagnation point flow %2 1.0 1.5 2.0 2.5 The motion of a fluid is described in 3.0 material coordinates by:...
-
Evaluate each risk as to whether it is high, medium or low priority and assign an order for treating risks. Scope of assessment: Critical success factors: Stakeholders: Risk Consequences Severity...
-
C III = Question 19 Not yet answered Marked out of 1.00 P Flag question Question 20 Not yet answered LSUS noodle Marked out of 1.00 P Flag question 78F Partly sunny T...
-
Using the methods of allocating costs found in the textbook, determine the costs of each of the ED level charges provided. What method was used in allocating costs? Why was this method used? What are...
-
Calculate the frequency of a photon with energy of 4.57 10-7 J. Select the correct answer: a. 3.03 x 10-62 THZ b. 6.90 104 Hz c. 6.90 104 THz O d. 4.35 x 10- Hz e. 6.90 x 1016 THz
-
Your home is currently valued at $200000. You have a first mortgage in the amount of $120000. If your lender applies a 90 percent loan-to-value ratio for approving home equity lines of credit, what...
-
Photosynthesis by land plants leads to the fixation each year of about 1 kg of carbon on the average for each square meter of an actively growing forest. The atmosphere is approximately 20% O 2 and...
-
Big Jim Company sponsored a picnic for employees and purchased a propane grill equipped with a standard-sized propane tank for the picnic. To make sure there was enough propane for all the cooking...
-
The article "The Effects of a Pneumatic Stool and a One-Legged Stool on Lower Limb Joint Load and Muscular Activity During Sitting and Rising" (Ergonomics, 1993: 519-535) gives the accompanying data...
-
The mode of a continuous distribution is the value x* that maximizes f (x). a. What is the mode of a normal distribution with parameters m and s? b. Does the uniform distribution with parameters and...
-
Subgroups of power supply units are selected once each hour from an assembly line, and the high-voltage output of each unit is determined. a. Suppose the sum of the resulting sample ranges for 30...
-
OMalley Corporation was incorporated and began business on January 1, 2015. It has been successful and now requires a bank loan for additional working capital to finance expansion. The bank has...
-
Presented below is information related to Viel Company at December 31, 2015, the end of its first year of operations. (a) income from operations, (b) net income, (c) net income attributable to Viel...
-
Financial Reporting Problem Marks and Spencer plc (M&S) The financial statements of M&S (GBR) are presented in Appendix A. The companys complete annual report, including the notes to the financial...
Study smarter with the SolutionInn App