0

anny one can help me to generate this grammar using python please!!!

#include <stdio.h> #include <string.h> int s(),compound(),label(),experssion(),selection(),iteration(),jump(),slist(),w(),slistprime(); char *ip; char string[50]; int w(){ if(*ip=='w'){ip++; if(*ip=='h'){ip++; if(*ip=='i'){ip++; if(*ip=='l'){ip++; if(*ip=='e'){ip++; if(*ip=='('){ip++; if(*ip=='e'){ip++; if(*ip==')'){ip++; if(ip==" "){ip++; return 1; } } } } } } } } } } int s(){ if(compound()) return 1; else if(label()) return 1; else if(experssion()) return 1; else if(selection()) return 1; else if(iteration()) return 1; else if(jump()) return 1;} int compound(){ if(*ip=='{'){ ip++; if(*ip=='}'){ ip++; return 1; } else if (slist()) return 1; else if(*ip=='d'){ip++; if (slist()){ if(*ip=='}') {ip++; return 1; } } } } else return 0; } int slist(){ if (slistprime()) return 1; } int slistprime(){ if (s()) { if(slistprime) return 1; } else return 1; //epsil

15th Dec 2021, 10:00 PM
Rayeh Mohammed Riad
Rayeh Mohammed Riad - avatar
1 Odpowiedź
0
what is it?
16th Dec 2021, 12:44 AM
Slick
Slick - avatar