[go: up one dir, main page]

0% found this document useful (0 votes)
14 views1 page

Compiler Gropup Assignment

The document outlines a group assignment to develop a lexer in C++ that identifies and categorizes tokens from various constructs such as arithmetic expressions, function definitions, and conditional statements. It specifies the required components, including a Flex source file, a sample C++ program, a README file with compilation instructions, and an output file with results. The assignment is due by November 30, 2017.

Uploaded by

ghstlaptop
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views1 page

Compiler Gropup Assignment

The document outlines a group assignment to develop a lexer in C++ that identifies and categorizes tokens from various constructs such as arithmetic expressions, function definitions, and conditional statements. It specifies the required components, including a Flex source file, a sample C++ program, a README file with compilation instructions, and an output file with results. The assignment is due by November 30, 2017.

Uploaded by

ghstlaptop
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Group Assignment (20%)

Given a C++ program develop a lexer which will be able to identify and return all the
possible tokens available in either of the following cases
Recognize and categorize tokens from the following constructs:
1. Standard Input/Output 6. Function Definitions
2. Arithmetic Expressions 7. Structure Definitions
3. Relational Expressions 8. Variable Initialization
4. Logical Expressions 9. Repetition Statements
5. Array Initialization 10. Conditional Statements
 Compile and run the lexer using the command line
 Provide the output for a sample C++ program using the lexer.
Assignment Requirements:
1. Flex Source File (lexer.l)
 Must contain regex rules for token categories listed above.
2. Sample C++ Program (sample.cpp)
 Should one of the 10 titles.
3. ReadMe File (README.txt)
 Steps to compile and run using Flex and GCC on terminal or CMD.
4. Output File (output.txt)
 Copy-paste the output of the screen sheet from running the lexer with sample.cpp.
Submission Deadline: 30/11/2017E.C

You might also like