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 ...
-
Using software, analyze the relationship between x = college education and y = percentage single-parent families, for the data in Table 3.6, which are in the U.S. Statewide Crime data file on the...
-
Brad Polson collected cash on account from a client for whom he had provided delivery services one month earlier. Why didn't Polson record revenue when he collected the cash on account?
-
Identify the six different discovery devices. What is the purpose of each device?
-
When a flammable liquid (such as gasoline or charcoal lighter fluid) ignites, it is not the liquid itself that burns: what actually happens is that the liquid vaporizes and the resulting airvapor...
-
I'm struggling and need help APPLY THE CONCEPTS: Net present value and Present value index McCall Corp. is looking to invest in Project A or Project B. The data surrounding each project is provided...
-
A pension fund manager is considering three mutual funds. The first is a stock fund, the second is a long-term government and corporate bond fund, and the third is a T-bill money market fund that...
-
The following information is available for Pina Corporation for 2 0 2 4 ( its first year of operations ) . 1 . Excess of tax depreciation over book depreciation, $ 4 0 , 4 0 0 . The difference will...
-
Calculate the price earnings ratio, PEG ratio, dividend rate, and dividend payout ratio for each of the following companies. Will each ratio consistently rank the companies from "best" to "worst"...
-
Trinity Railway began 20X5 with 900,000 shares of common stock outstanding. On March 1, 20X5, Trinity Railway issued 300,000 additional shares of common stock. 50,000 shares of common stock were...
-
Global Technology is based in the USA and prepares its financial statements in dollars. On December 5, 20X5, Global had two sales transactions with customers in Europe. The first transaction was for...
-
Go to the World Banks databank website at http://databank.worldbank.org/data/reports. aspx?source=2&country=. Find the following annual data for Argentina, for the past 25 years: (i) GDP at current...
-
Go to https://www.federalreserve.gov/monetarypolicy/fomc.htm. This site reports activity by the FOMC. Click on Meeting calendars and information and click on the statement released after the most...
-
The Organization for Economic Cooperation and Development (OECD) and the European Union (EU) have made major headlines in the tax area for the last few years. Use the Wall Street Journal to conduct...
-
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...
-
In an audit of a corporation that has a bond issue outstanding, the trust indenture is reviewed and confirmation as to the issue is obtained from the trustee. List eight matters of importance to the...
-
Robertson Company had accounts receivable of \(\$ 200,000\) at December 31, 200X, and had provided an allowance for uncollectible accounts of \(\$ 6,000\). After performing all normal auditing...
-
Elizabeth Cole, the senior auditor-in-charge of the audit of Thorne Company, a small manufacturer, was busy writing the audit report for another engagement. Accordingly, she sent Martin Joseph, a...
Study smarter with the SolutionInn App