#include #include #include #include #include using namespace std; struct stru1 { char non_ter[1],pro[25]; }cfg[25]; int n,st=-1,j,i,t=-1,m; int v,c,p=1; char str[20],stack[20],ch,tmp[10]; void match(int k); void matchl(int k); int main() { printf("Enter the number of productions:\n"); scanf("%d",&n); printf("\n"); printf("Enter the productions on LEFT and RIGHT sides:\n"); for(i=0;i \n"); scanf("%s",cfg[i].pro); printf("\n"); } printf("Enter the input string:\n"); scanf("%s",str); printf("\n"); i=0; do { ch=str[i]; stack[++st]=ch; tmp[0]=ch; match(1); i++; }while(str[i]!='\0'); c=st; v=st; puts(stack); printf("\n"); while(st) { --st; v=st; t=-1; p=0; while(v<=c) { ...
Network programming and scalable micro-services in Azure