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 ...
-
The operations manager of a tollbooth located at a major exit of a state turnpike is trying to estimate the average number of vehicles that arrive at the tollbooth during a one-minute period during...
-
State whether the following are true or false. If false, explain why. (a) Drawings are an expense recorded in the partners trading, profit and loss and appropriation account (i.e., a separate section...
-
Which of the following pairs of interest rate quotations would represent a pair of different quotes that we could switch back and forth between using only division and multiplication (i.e., without...
-
At December 31, 2013, Newman Engineering's liabilities include the following: 1. $10 million of 9% bonds were issued for $10 million on May 31, 1994. The bonds mature on May 31, 2024, but bondholders...
-
Use a calculator to find sin 172" rounded to the nearest hundredth 0 -0.76 0.14 O-0.14 O 0.76 Use a calculator to find sin 157 rounded to the nearest hundredth. -0.39 0.39 0.51 O-0.51
-
IAS36 Impairment of Assets was issued in June 1998 and subsequently revised in March 2004 and January 2008. Its main objective is to prescribe the procedures that should ensure that an entity's...
-
Weller Industrial Gas Corporation supplies acetylene and other compressed gases to industry. Data regarding the store's operations follow: Sales are budgeted at $340,000 for November, $360,000 for...
-
Security Analysis and Portfolio Q1: Describe the benefits and risks of investing in the current Global market. Be specific concerning present world events and market reactions/trends. Q2: In which...
-
Explore the role of advanced travel behavior modeling frameworks, including activity-based travel demand modeling and dynamic travel forecasting techniques, in understanding the complex interactions...
-
Discuss the application of advanced optimization algorithms, such as genetic algorithms and particle swarm optimization, in solving large-scale transportation network design and operation problems,...
-
A manufacturer is considering eliminating a segment because it shows the following $6,200 loss. All $20,600 of its variable costs are avoidable, and $37,400 of its fixed costs are avoidable. Segment...
-
2C distributes laptops to retail stores and extends credit terms 3/15, n/60 to all its customers. During the month of June 2021, the following merchandising transactions occurred: June 12: Purchased...
-
Shire Company's predetermined overhead rate is based on direct labor cost. Management estimates the company will incur $767,000 of overhead costs and $590,000 of direct labor cost for the period....
-
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...
-
Why does this chapter provide an explanation of the development of mutual funds?
-
What conditions are necessary for a risk-free asset to be free of risk? Provide an example. Is it really risk-free?
-
Will very wide diversification eliminate specific risk? And market risk?
Study smarter with the SolutionInn App