[antlr-interest] [3.1.1] ANTLR3_MIN_TOKEN_TYPE define possibly incorrect

Sven Van Echelpoel sven.van.echelpoel at empolis.com
Mon Mar 23 07:52:38 PDT 2009


Hi,

in antlr3commontoken.h there is a define for the minimum ID of a
generated token type. It is called ANTLR3_MIN_TOKEN_TYPE. Here's how it
is found in that header:

/** Imaginary token type to signal the end of a stream of child nodes.
 */
#define	ANTLR3_TOKEN_UP		3

/** First token that can be used by users/generated code
 */
#define	ANTLR3_MIN_TOKEN_TYPE	ANTLR3_UP + 1
                                ^^^^^^^^^
                             This is nowhere defined

It looks to me that this define actually should be:

#define ANTLR3_MIN_TOKEN_TYPE ANTLR3_TOKEN_UP + 1

or am I missing something?

Sven



More information about the antlr-interest mailing list