Blog Stats
- 159,186 hits
Top Posts & Pages
Categories
Twitter Updates
Tweets by Devesh299Meta
Tag Archives: context free grammar
Program to recognize strings ‘aaab’, ‘abbb’, ‘ab’, ‘a’ , aabb using the grammer (an bn ,n>=0).
Lex part : Yacc Part : Sample Input/Output : $ lex prog5b.l $ yacc -d prog5b.y $ cc -c lex.yy.c y.tab.c $ cc -o a.out lex.yy.o y.tab.o -lfl $ ./a.out Enter the string: aaaabb Invalid string $ ./a.out Enter the … Continue reading
Posted in C, Compiler Design
Tagged c++, compiler, context free grammar, parser, recognize strings
2 Comments