#include
#include
void main()
{
char reg[20];
int q[20][3],i,j,len,a,b;
clrscr();
for(a=0;a<20;a++)
{
for(b=0;b<3;b++)
{
q[a][b]=0;
}
}
printf("Regular expression: \n");
scanf("%s",reg);
len=strlen(reg);
i=0;
j=1;
while(i { if(reg[i]=='a'&®[i+1]!='/'&®[i+1]!='*') { q[j][0]=j+1; j++; } if(reg[i]=='b'&®[i+1]!='/'&®[i+1]!='*') { q[j][1]=j+1; j++; } if(reg[i]=='e'&®[i+1]!='/'&®[i+1]!='*') { q[j][2]=j+1; j++; } if(reg[i]=='a'&®[i+1]=='/'&®[i+2]=='b') { q[j][2]=((j+1)*10)+(j+3); j++; q[j][0]=j+1; j++; q[j][2]=j+3; j++; q[j][1]=j+1; j++; q[j][2]=j+1; j++; i=i+2; } if(reg[i]=='b'&®[i+1]=='/'&®[i+2]=='a') { q[j][2]=((j+1)*10)+(j+3); j++; q[j][1]=j+1; j++; q[j][2]=j+3; j++; q[j][0]=j+1; j++; q[j][2]=j+1; j++; i=i+2; } if(reg[i]=='a'&®[i+1]=='*') { q[j][2]=((j+1)*10)+(j+3); j++; q[j][0]=j+1; j++; q[j][2]=((j+1)*10)+(j-1); j++; } if(reg[i]=='b'&®[i+1]=='*') { q[j][2]=((j+1)*10)+(j+3); j++; q[j][1]=j+1; j++; q[j][2]=((j+1)*10)+(j-1); j++; } if(reg[i]==')'&®[i+1]=='*') { q[0][2]=((j+1)*10)+1; q[j][2]=((j+1)*10)+1; j++; } i++; } printf("Transition function \n"); for(i=0;i<=j;i++) { if(q[i][0]!=0) printf("\n q[%d,a]-->%d",i,q[i][0]); if(q[i][1]!=0) printf("\n q[%d,b]-->%d",i,q[i][1]); if(q[i][2]!=0) { if(q[i][2]<10) printf("\n q[%d,e]-->%d",i,q[i][2]); else printf("\n q[%d,e]-->%d & %d",i,q[i][2]/10,q[i][2]%10); } } getch(); }
Something like this:statement -> for (opt_expression; opt_expression; opt_expression) statementstatement -> while (expression) statementstatement -> do statement while (expression);opt_expression -> | expression
c program was introduced in the year 1972 by Dennis RitchieNo, it was the C language, not the C program.
In Java, or C, the expression is simply:i == jIf the two are equal, this expression will evaluate to true; if not, it will evaluate to false.In Java, or C, the expression is simply:i == jIf the two are equal, this expression will evaluate to true; if not, it will evaluate to false.In Java, or C, the expression is simply:i == jIf the two are equal, this expression will evaluate to true; if not, it will evaluate to false.In Java, or C, the expression is simply:i == jIf the two are equal, this expression will evaluate to true; if not, it will evaluate to false.
no
how to create a c program for left factoring.
34.768
A statement in C is an expression terminated with a semi-colon. That is, a semi-colon turns an expression into a statement.
c code for top down parser
Something like this:statement -> for (opt_expression; opt_expression; opt_expression) statementstatement -> while (expression) statementstatement -> do statement while (expression);opt_expression -> | expression
Mr. Jessup P. Navarro is the current Administrator of the Philippine National Food Authority (NFA). However, since the NFA is under the Department of Agriculture (DA), the Secretary of DA, Sec. Arthur C. Yap, chairs the NFA Council.
The algebraic expression for "9 more than c" is ( c + 9 ). This expression indicates that you take the value of ( c ) and add 9 to it.
The algebraic expression for the quotient of ( c ) and 8 is written as ( \frac{c}{8} ). This expression represents the result of dividing the variable ( c ) by the number 8.
c program was introduced in the year 1972 by Dennis RitchieNo, it was the C language, not the C program.
the features of a C program
It is simply: a+c
In Java, or C, the expression is simply:i == jIf the two are equal, this expression will evaluate to true; if not, it will evaluate to false.In Java, or C, the expression is simply:i == jIf the two are equal, this expression will evaluate to true; if not, it will evaluate to false.In Java, or C, the expression is simply:i == jIf the two are equal, this expression will evaluate to true; if not, it will evaluate to false.In Java, or C, the expression is simply:i == jIf the two are equal, this expression will evaluate to true; if not, it will evaluate to false.
I think it is 'execution of a C program'.