[antlr-interest] Removing output=AST lets ANTLR fail to generate

Jim Idle jimi at temporal-wave.com
Fri Nov 11 07:33:12 PST 2011


I think it might be the phrasing of your question. It may be a language
barrier issue, but it sounds like "You stupid ANTLR asshats, why can't you
do it this way, which is the way I expect it to work and so it must be the
correct way; you are all stupid!"

But...

Clearly, as you get an error telling you that you have AST shaping code in
there, then you cannot remove that option without removing the AST shaping
directives. Whether or not that can be improved is not very relevant as
3.x is now in  maintenance mode while ANTLR 4 is being thrashed in to
shape. So, perhaps you can rephrase your statement in to a feature request
for ANTLR v4. It is a reasonable request if a little care is taken over
the phrasing.


Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Christian
> Sent: Friday, November 11, 2011 12:15 AM
> To: Eric; antlr-interest at antlr.org
> Subject: Re: [antlr-interest] Removing output=AST lets ANTLR fail to
> generate
>
> > As I understand it, you are creating a grammar and then remove
> > output=AST
> I created a combined grammar that contains operators and rewrite rules.
> When I then remove the option "output=AST", the grammar is not
> generated due to syntax errors. These syntax errors result from the
> operators and rewrite rules. You can reproduce it with any
> corresponding grammar you like.
>
> Christian
>
> Am 10.11.2011 18:33, schrieb Eric:
> > I don't believe that anyone here is avoiding your question. I my self
> > am unable to directly answer your question because it does not make
> > sense to me. As I understand it, you are creating a grammar and then
> > remove output=AST. Since you are expecting a lexer and parser as
> > output, I must take it that you  are using a combined grammar. Based
> > on the limited info given I see no reason why you are not getting an
> > lexer and parser. If you were to post your grammar and the steps you
> > take, someone here might spot something needing advise.
> >
> > Eric
> >
> >
> >
> >
> >
> >
> >
> >     > Hi community,
> >     >
> >     > it seems that ANTLR cannot generate the lexer and parser if
> >     output=AST
> >     > is removed, but the operators and rewrite rules are still left
> >     in the
> >     > grammar. Am I right? If yes, that's really regrettable...and
> >     unflexible.
> >     > You could just ignore rewrite rules and operators, if output !=
> AST,
> >     > couldn't you?
> >     >
> >     > Regards,
> >     > Christian
> >
> >     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


More information about the antlr-interest mailing list