And then you have to figure out how to prune the GLR-generated "forests". C++ is nasty; it can be parsed with ANTLR (as shown by NEXT and David Wigg's adaptions of that grammar), but I believe that the right strategy with ANTLR is actually to use multi-pass recognition to sort out the ambiguities. That has not been done yet.
The problem is that C++ cannot be adequately described with a context-free grammar; you have to do some context-sensitive processing to resolve the syntax that is semantically ambiguous. --Loring ----- Original Message ---- > From: The Researcher <researcher0...@gmail.com> > To: antlr-interest@antlr.org > Sent: Mon, July 11, 2011 11:25:07 AM > Subject: [antlr-interest] Can one identify the type of parser needed for a >given BNF grammar > > Maybe I dreaming but maybe lady luck is with me today. > > Does anyone know of program, paper, algorithm that given a BNF grammar it > will tell you what type of algorithm/parser can parse it. > > Types of algorithms/parsers would be Regular Expression (RE), LL, LR, LALR, > GLR, SLR and how much look ahead is needed? > > If another website is better for posting this, that would be appreciated. > > The tie into to ANTLR here is that the more I learn about parsing C++ the > more the answer comes back GLR. > > Thanks Eric > > List: http://www.antlr.org/mailman/listinfo/antlr-interest > Unsubscribe: >http://www.antlr.org/mailman/options/antlr-interest/your-email-address > List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.