[antlr-interest] Re: "protected" lexer rules
Lubos Vnuk
lubos.vnuk at rts.at
Wed Nov 10 05:37:55 PST 2004
> Yuck. That has a similar problem to "subrule"
> in that "subtoken" already has meaning when
> talking about the parts of a complicated rule
I have never heard of referring to a part of a complicated lexer rule
as a subtoken. I'd call it a segment, a part, a fragment... Isn't a
subtoken supposed to be a token as well as a subset is a set or a
subprocedure is still a procedure? If yes, then the 'A' in the
following example cannot be called "subtoken":
rule: ABC subrule;
ABC: 'A' BC;
protected
BC: 'B' 'C';
I know that based on this reasoning you may object that BC shouldn't
be called "subtoken" either as a subtoken cannot actually exist as it
contradicts the definition of a token...but isn't this the exact and
explicit meaning of what we have been trying to say by "protected" so
far?
Regards,
Lubos.
P.S.: I vote for any of these: subtoken, imaginary token, virtual
token, helper token, abstract token, auxiliary token, sublexeme
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list