[antlr-interest] Can one identify the type of parser needed for a given BNF grammar
Loring Craymer
lgcraymer at yahoo.com
Mon Jul 11 11:51:07 PDT 2011
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 <researcher0x00 at gmail.com>
> To: antlr-interest at 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
>
More information about the antlr-interest
mailing list