[antlr-interest] Inherit grammar and specify base scanner class at the same time

Stanimir Stamenkov stanio at myrealbox.com
Mon Jan 30 08:17:10 PST 2006


/Ric Klaren/:
> On 1/25/06, Stanimir Stamenkov <stanio at myrealbox.com> wrote:
>>
>> if I specify:
>>
>> class MyLexer extends SuperLexer("name.stanio.MyScanner");
>>
>> the ANTLR tool reports an error.
> 
> I would not be surprised if this is a bug. The inheritance thing isn't 
> the prettiest in the world. If you have to add/change a lot of action 
> code in the sub grammar then it's usually pretty much useless anyway. 
> (although some people seem to be happy with using it)

Thank you for giving me a direction. Unfortunately I'm pretty new to 
ANTLR and the grammars in question are given on me, so I won't be 
able to make any significant modifications to them soon. Looking at 
the grammars I didn't actually see any rules/actions overridden, so 
I'll have to live with it and perform hacks as I find appropriate.

I've found the ANTLR feedback page [1] and I'll post a bug report 
for it.

[1] http://www.antlr.org/misc/feedback

-- 
Stanimir


More information about the antlr-interest mailing list