You are on page 1of 2

Name:Muhammad Atisham

Course:Compiler Construction
Token duplicates must includes:
Keywords:
['int', 'int', 'for', 'for', 'for', 'for', 'for', 'for', 'for', 'for', 'if', 'return']
Identifiers:
: ['main', 'r', 'c', 'a', 'b', 'sum', 'i', 'j', 'cout', 'Enter', 'number', 'of', 'rows',
'between', 'and', 'cin', 'r', 'cout', 'Enter', 'number', 'of', 'columns',
'between', 'and', 'cin', 'c', 'cout', 'endl', 'Enter', 'elements', 'of', 'matrix',
'endl', 'i', 'i', 'r', 'i', 'j', 'j', 'c', 'j', 'cout', 'Enter', 'element', 'a', 'i', 'j', 'cin',
'a', 'i', 'j', 'cout', 'endl', 'Enter', 'elements', 'of', 'matrix', 'endl', 'i', 'i', 'r',
'i', 'j', 'j', 'c', 'j', 'cout', 'Enter', 'element', 'b', 'i', 'j', 'cin', 'b', 'i', 'j', 'i', 'i', 'r',
'i', 'j', 'j', 'c', 'j', 'sum', 'i', 'j', 'a', 'i', 'j', 'b', 'i', 'j',
Symbols:
: ['()', '{', ',', ',', '[', '][', '],', '[', '][', '],', '[', '][', '],', ',', ';', '<<', '"', '(', '):', '";',
'>>', ';', '<<', '"', '(', '):', '";', '>>', ';', '<<', '<<', '"', ':', '"', '<<', ';', '(', ';', '<', ';',
')', '(', ';', '<', ';', ')', '{', '<<', '"', '"', '<<', '<<', '<<', '"', ':', '";', '>>', '[', '][', '];',
'}', '<<', '<<', '"', ':', '"', '<<', ';', '(', ';', '<', ';', ')', '(', ';', '<', ';', ')', '{', '<<', '"',
'"', '<<', '<<', '<<'
Operators:
=,=, +,+,=,=,, -,++,++,++,++,++,++,+,=,=,=,=,=,++,++,-
Relational Operators:
<,<,<,<,<,<,<,< ,>
Single representation:
Keywords: int, for, if ,return,endl,cout,cin,
Identifiers: 'main', 'r', 'c', 'a', 'b', 'sum', 'i', 'j'
Math Operators: =, +, -,++,
Numerical Values: 100,1,0,1
Symbols: (,),},{,, <<,>>,[,],”,

You might also like