oh, i do:
protected abstract void foo() {}
Ter
On Feb 24, 2010, at 11:36 AM, Christian Pontesegger wrote:
> Terence Parr wrote:
>> You can either define abstract methods within @members and then subclass the
>> parser or you can create a subclass of Parser with the abstract methods or
>> concrete methods then use superClass.
>>
> Thats what I intend to do, have
>
> @members {
>
> protected abstract void foo();
> ...
> }
>
> but then the generated class will have an error due to the missing
> "abstract" modifier in the class definition. Unfortunately the @headers
> section is pasted right before some other imports. If it were the last
> before the class definition I could put my "abstract" modifier there.
>
> I want to derive from my abstract parser and have several implementing
> parsers with different functionality. Right now I am declaring dummy
> methods within @members and overwrite them in my subclasses. But thats
> not the way java is meant to be, right?
>
> So if it is not possible to do that now, maybe this is some input for a
> future version of ANTLR.
>
> 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
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.