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

Jim Idle jimi at temporal-wave.com
Mon Mar 23 08:34:16 PDT 2009


Sven Van Echelpoel wrote:
> 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
Yes, it probably supposed to be that, but it isn't actually used 
anywhere any more. I have changed it though.

Jim


More information about the antlr-interest mailing list