[antlr-interest] C# TARGET ANNOUNCEMENTS
Gavin Lambert
antlr at mirality.co.nz
Sat Apr 12 20:09:54 PDT 2008
At 14:27 13/04/2008, Micheal J wrote:
>I was just answering the question you asked about CommonToken
>(i.e. "does CommonToken already fulfil the role of Token in
>the C# runtime?"). It doesn't.
I think Johannes' point is that Token doesn't really have a role
in the IToken hierarchy, since it doesn't actually implement
anything, and the interface already specifies all the abstract
methods.
What it does do is act as a container for handy constants related
to tokens, but there's no particular benefit to having it be a
base class as far as I can see. (Probably it ought to be made a
static class now, not just an abstract class. Although that's a
V2-only-ism.)
(Although on the subject of vestigial parts, what's with
Lexer.TOKEN_dot_EOF?)
More information about the antlr-interest
mailing list