Lexical Analyzer for Arithmetic Expressions

C program to design a Lexical Analyzer for Arithmetic Expressions :

In this program for lexical analyzer for arithmetic expressions, tokens have to be identified and its respective attributes have to be printed.

LEXEMES TOKEN
variable-name <2,#address>
numeric-constant <3,#address>
= <4,4>
+ <43,43>
+= <430,430>
<45,45>
-= <450,450>
* <42,42>
*= <420,420>
/ <47,47>
/= <470,470>
% <37,37>
%= <370,370>
^ <94,94>
^= <940,940>

C SOURCE CODE :

OUTPUT :

lexical analyzer for arithmetic expressions


Leave a Reply

Your email address will not be published. Required fields are marked *