[antlr-interest] Custom lexer and parser constructors

Jim Idle jimi at temporal-wave.com
Tue May 18 09:25:59 PDT 2010


OK - just add the reporter to the paresr members and create a setErrorReporter() method.

 

Jim

 

From: Cameron Ross [mailto:cross at kojeware.com] 
Sent: Tuesday, May 18, 2010 9:19 AM
To: Jim Idle
Cc: antlr-interest at antlr.org
Subject: Re: [antlr-interest] Custom lexer and parser constructors

 

Hi Jim,

 

My previous positing went unanswered so I thought I'd rephrase it to be more generic: http://www.antlr.org/pipermail/antlr-interest/2010-May/038661.html.  Thanks for the lead on the superClass option... I'll look into it.

 

Cameron.

 

On Tue, May 18, 2010 at 12:15 PM, Jim Idle <jimi at temporal-wave.com> wrote:

Using a superClass=xyz option will probably get you where you want to be, but you might be better phrasing your question in terms of what you want to achieve rather than whether you can change the constructors.

However, it is just as easy to add members to the class and supply setter methods.

Jim


> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Cameron Ross
> Sent: Tuesday, May 18, 2010 9:04 AM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] Custom lexer and parser constructors
>
> Hi,
>
> Is there a way to define custom constructors for ANTLR lexers and
> parsers?
>
>
> Thanks,
> Cameon.
>

> 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




-- 
Kojeware Corporation





More information about the antlr-interest mailing list