Compiler Design Project
Compiler Design Project
Compiler Design Project
OF
“Compiler Design”
Bachelor of Technology
In
Submitted by
Bhaskar Yadav (2100430100012)
Shikha Singh (2200430109004)
Shishir Singh (2100430100047)
We are indebted to our respected Head of the Department Dr. Yashpal Singh for guiding us.
The team is also grateful to our project guide Prof. Sanjai Kumar Gupta, for their
invaluable guidance for this project. We also thank our respected faculty members of the
Computer Science and Engineering department for their indomitable contribution and
guidance without which this project would have been impossible to complete.Our sincerest
thanks to all the teachers, seniors and colleagues whose help and guidance brought this project
to successful completion.
Submitted by:
RESOURCE:
C++
PROGRAM LOGIC:
PROCEDURE:
PROGRAM:
#include<stdio.h>
#include<conio.h>
#include<ctype.h>
#include<iostream>
using namespace std;
int main()
{
char a[10];
int flag,i=1;
cout<<"\n Enter an Identifier:";
gets(a);
if(isalpha(a[0]))
{
flag=1;
}
else
{
cout<<"\n Not A valid identifier:";
}
while (a[i]!='\0')
{
if(!isdigit(a[i]) && !isalpha(a[i]))
{
flag=0;
break;
}
i++;
}
if(flag==1)
{
cout<<"\nValid Identifier";
}
return 0;
}