compilers-sender@esegue.segue.boston.ma.us (10/26/90)
I am working on a project where we are writing a LR(1) parser generator. We need some test grammars for real programming languages like C, Ada, Pascal, ALGOL or any other interesting languages. We need the grammars to test the efficiency of our parser generator. We are interested in both LALR(1), LR(1) and non-LR(1) grammars. If you have a grammar in yacc compatible format, or any other BNF like format, we would very much appreciate if you would send us a copy of the grammar via e-mail. We shall only use the grammars for testing and will not use the grammars for any other purposes. We don't need the code sections for the reduce actions. If you don't want to send these code sections to us, you can use the C program below to filter out the code sections from yacc grammars. #include <stdio.h> main() { int ch, lev = 0; while ((ch = getchar()) != EOF) { if (ch == '{') lev++; else if (ch == '}') lev--; else if (lev == 0) putchar(ch); if (lev < 0) lev = 0; } } NB: this program will not work if you have strings with '{' or '}' Thanks in advance Michael Ringgaard | Phone: + 45 86151546 Computer Science Department | Internet: mring@daimi.aau.dk Aarhus University | 8000 Aarhus, DENMARK | -- Send compilers articles to compilers@esegue.segue.boston.ma.us {ima | spdcc | world}!esegue. Meta-mail to compilers-request@esegue.