Serious compatibility problems with versions 5.9, 6.0 and 6.1 #505

Closed
aunkrig opened this Issue Dec 15, 2014 · 28 comments

Projects

None yet

3 participants

@aunkrig
aunkrig commented Dec 15, 2014

The values of the constants declared in "GeneratedJavaTokenTypes" have changed (for no obvious reason) in versions 5.9, 6.0 and 6.1. Any CS extension for versions up to and including 5.8 will most likely not function with versions 5.9, 6.0 and 6.1. After recompilation with these versions, they will (most probably) function, but no longer with versions 5.8 and older.

I will attach the "GeneratedJavaTokenTypes.java" source file for versions 5.6, 5.7, 5.8, 5.9, 6.0, 6.1 and 6.1.1 for reference.

The file is identical for versions 5.6, 5.7 and 5.8. I'd call that the "reference".

In version 5.9 three new tokens were inserted (METHOD_REF = 28, DOUBLE_COLON = 84 and LAMBDA = 181) and all the constants were "shifted up" respectively.

In version 6.0 the 7 token types 146...152 were replaced with 9 tokens 146...154: The 7 original tokens were renamed and reordered, and ML_COMMENT was replaced with BLOCK_COMMENT_BEGIN+BLOCK_COMMENT_END+COMMENT_CONTENT. Also 2 new tokens were added: SINGLE_LINE_COMMENT_CONTENT = 184 and BLOCK_COMMENT_CONTENT = 185.

In versions 6.1 and 6.1.1 the constant values remain constant, compared with version 6.0.

Because the constant values are compiled into any CS extension, it is next to impossible to write an extension that is compatible with two or more of the CS versions 5.8, 5.9 and 6.0.

I propose that the original value be resurrected as quickly as possible and the compatibility problem with versions 5.9, 6.0 and 6.1 be documented. WRT the huge user base, the impact should absolutely be kept as small as possible.

@aunkrig
aunkrig commented Dec 15, 2014

5.6:

package com.puppycrawl.tools.checkstyle.grammars;

public abstract interface GeneratedJavaTokenTypes
{
  public static final int EOF = 1;
  public static final int NULL_TREE_LOOKAHEAD = 3;
  public static final int BLOCK = 4;
  public static final int MODIFIERS = 5;
  public static final int OBJBLOCK = 6;
  public static final int SLIST = 7;
  public static final int CTOR_DEF = 8;
  public static final int METHOD_DEF = 9;
  public static final int VARIABLE_DEF = 10;
  public static final int INSTANCE_INIT = 11;
  public static final int STATIC_INIT = 12;
  public static final int TYPE = 13;
  public static final int CLASS_DEF = 14;
  public static final int INTERFACE_DEF = 15;
  public static final int PACKAGE_DEF = 16;
  public static final int ARRAY_DECLARATOR = 17;
  public static final int EXTENDS_CLAUSE = 18;
  public static final int IMPLEMENTS_CLAUSE = 19;
  public static final int PARAMETERS = 20;
  public static final int PARAMETER_DEF = 21;
  public static final int LABELED_STAT = 22;
  public static final int TYPECAST = 23;
  public static final int INDEX_OP = 24;
  public static final int POST_INC = 25;
  public static final int POST_DEC = 26;
  public static final int METHOD_CALL = 27;
  public static final int EXPR = 28;
  public static final int ARRAY_INIT = 29;
  public static final int IMPORT = 30;
  public static final int UNARY_MINUS = 31;
  public static final int UNARY_PLUS = 32;
  public static final int CASE_GROUP = 33;
  public static final int ELIST = 34;
  public static final int FOR_INIT = 35;
  public static final int FOR_CONDITION = 36;
  public static final int FOR_ITERATOR = 37;
  public static final int EMPTY_STAT = 38;
  public static final int FINAL = 39;
  public static final int ABSTRACT = 40;
  public static final int STRICTFP = 41;
  public static final int SUPER_CTOR_CALL = 42;
  public static final int CTOR_CALL = 43;
  public static final int LITERAL_package = 44;
  public static final int SEMI = 45;
  public static final int LITERAL_import = 46;
  public static final int LBRACK = 47;
  public static final int RBRACK = 48;
  public static final int LITERAL_void = 49;
  public static final int LITERAL_boolean = 50;
  public static final int LITERAL_byte = 51;
  public static final int LITERAL_char = 52;
  public static final int LITERAL_short = 53;
  public static final int LITERAL_int = 54;
  public static final int LITERAL_float = 55;
  public static final int LITERAL_long = 56;
  public static final int LITERAL_double = 57;
  public static final int IDENT = 58;
  public static final int DOT = 59;
  public static final int STAR = 60;
  public static final int LITERAL_private = 61;
  public static final int LITERAL_public = 62;
  public static final int LITERAL_protected = 63;
  public static final int LITERAL_static = 64;
  public static final int LITERAL_transient = 65;
  public static final int LITERAL_native = 66;
  public static final int LITERAL_synchronized = 67;
  public static final int LITERAL_volatile = 68;
  public static final int LITERAL_class = 69;
  public static final int LITERAL_extends = 70;
  public static final int LITERAL_interface = 71;
  public static final int LCURLY = 72;
  public static final int RCURLY = 73;
  public static final int COMMA = 74;
  public static final int LITERAL_implements = 75;
  public static final int LPAREN = 76;
  public static final int RPAREN = 77;
  public static final int LITERAL_this = 78;
  public static final int LITERAL_super = 79;
  public static final int ASSIGN = 80;
  public static final int LITERAL_throws = 81;
  public static final int COLON = 82;
  public static final int LITERAL_if = 83;
  public static final int LITERAL_while = 84;
  public static final int LITERAL_do = 85;
  public static final int LITERAL_break = 86;
  public static final int LITERAL_continue = 87;
  public static final int LITERAL_return = 88;
  public static final int LITERAL_switch = 89;
  public static final int LITERAL_throw = 90;
  public static final int LITERAL_for = 91;
  public static final int LITERAL_else = 92;
  public static final int LITERAL_case = 93;
  public static final int LITERAL_default = 94;
  public static final int LITERAL_try = 95;
  public static final int LITERAL_catch = 96;
  public static final int LITERAL_finally = 97;
  public static final int PLUS_ASSIGN = 98;
  public static final int MINUS_ASSIGN = 99;
  public static final int STAR_ASSIGN = 100;
  public static final int DIV_ASSIGN = 101;
  public static final int MOD_ASSIGN = 102;
  public static final int SR_ASSIGN = 103;
  public static final int BSR_ASSIGN = 104;
  public static final int SL_ASSIGN = 105;
  public static final int BAND_ASSIGN = 106;
  public static final int BXOR_ASSIGN = 107;
  public static final int BOR_ASSIGN = 108;
  public static final int QUESTION = 109;
  public static final int LOR = 110;
  public static final int LAND = 111;
  public static final int BOR = 112;
  public static final int BXOR = 113;
  public static final int BAND = 114;
  public static final int NOT_EQUAL = 115;
  public static final int EQUAL = 116;
  public static final int LT = 117;
  public static final int GT = 118;
  public static final int LE = 119;
  public static final int GE = 120;
  public static final int LITERAL_instanceof = 121;
  public static final int SL = 122;
  public static final int SR = 123;
  public static final int BSR = 124;
  public static final int PLUS = 125;
  public static final int MINUS = 126;
  public static final int DIV = 127;
  public static final int MOD = 128;
  public static final int INC = 129;
  public static final int DEC = 130;
  public static final int BNOT = 131;
  public static final int LNOT = 132;
  public static final int LITERAL_true = 133;
  public static final int LITERAL_false = 134;
  public static final int LITERAL_null = 135;
  public static final int LITERAL_new = 136;
  public static final int NUM_INT = 137;
  public static final int CHAR_LITERAL = 138;
  public static final int STRING_LITERAL = 139;
  public static final int NUM_FLOAT = 140;
  public static final int NUM_LONG = 141;
  public static final int NUM_DOUBLE = 142;
  public static final int WS = 143;
  public static final int SL_COMMENT = 144;
  public static final int ML_COMMENT = 145;
  public static final int ESC = 146;
  public static final int HEX_DIGIT = 147;
  public static final int VOCAB = 148;
  public static final int EXPONENT = 149;
  public static final int FLOAT_SUFFIX = 150;
  public static final int ASSERT = 151;
  public static final int STATIC_IMPORT = 152;
  public static final int ENUM = 153;
  public static final int ENUM_DEF = 154;
  public static final int ENUM_CONSTANT_DEF = 155;
  public static final int FOR_EACH_CLAUSE = 156;
  public static final int ANNOTATION_DEF = 157;
  public static final int ANNOTATIONS = 158;
  public static final int ANNOTATION = 159;
  public static final int ANNOTATION_MEMBER_VALUE_PAIR = 160;
  public static final int ANNOTATION_FIELD_DEF = 161;
  public static final int ANNOTATION_ARRAY_INIT = 162;
  public static final int TYPE_ARGUMENTS = 163;
  public static final int TYPE_ARGUMENT = 164;
  public static final int TYPE_PARAMETERS = 165;
  public static final int TYPE_PARAMETER = 166;
  public static final int WILDCARD_TYPE = 167;
  public static final int TYPE_UPPER_BOUNDS = 168;
  public static final int TYPE_LOWER_BOUNDS = 169;
  public static final int AT = 170;
  public static final int ELLIPSIS = 171;
  public static final int GENERIC_START = 172;
  public static final int GENERIC_END = 173;
  public static final int TYPE_EXTENSION_AND = 174;
  public static final int DO_WHILE = 175;
  public static final int RESOURCE_SPECIFICATION = 176;
  public static final int RESOURCES = 177;
  public static final int RESOURCE = 178;
  public static final int STD_ESC = 179;
  public static final int BINARY_DIGIT = 180;
  public static final int ID_START = 181;
  public static final int ID_PART = 182;
  public static final int INT_LITERAL = 183;
  public static final int LONG_LITERAL = 184;
  public static final int FLOAT_LITERAL = 185;
  public static final int DOUBLE_LITERAL = 186;
  public static final int HEX_FLOAT_LITERAL = 187;
  public static final int HEX_DOUBLE_LITERAL = 188;
  public static final int SIGNED_INTEGER = 189;
  public static final int BINARY_EXPONENT = 190;
}
@aunkrig
aunkrig commented Dec 15, 2014

5.7:

package com.puppycrawl.tools.checkstyle.grammars;

public abstract interface GeneratedJavaTokenTypes
{
  public static final int EOF = 1;
  public static final int NULL_TREE_LOOKAHEAD = 3;
  public static final int BLOCK = 4;
  public static final int MODIFIERS = 5;
  public static final int OBJBLOCK = 6;
  public static final int SLIST = 7;
  public static final int CTOR_DEF = 8;
  public static final int METHOD_DEF = 9;
  public static final int VARIABLE_DEF = 10;
  public static final int INSTANCE_INIT = 11;
  public static final int STATIC_INIT = 12;
  public static final int TYPE = 13;
  public static final int CLASS_DEF = 14;
  public static final int INTERFACE_DEF = 15;
  public static final int PACKAGE_DEF = 16;
  public static final int ARRAY_DECLARATOR = 17;
  public static final int EXTENDS_CLAUSE = 18;
  public static final int IMPLEMENTS_CLAUSE = 19;
  public static final int PARAMETERS = 20;
  public static final int PARAMETER_DEF = 21;
  public static final int LABELED_STAT = 22;
  public static final int TYPECAST = 23;
  public static final int INDEX_OP = 24;
  public static final int POST_INC = 25;
  public static final int POST_DEC = 26;
  public static final int METHOD_CALL = 27;
  public static final int EXPR = 28;
  public static final int ARRAY_INIT = 29;
  public static final int IMPORT = 30;
  public static final int UNARY_MINUS = 31;
  public static final int UNARY_PLUS = 32;
  public static final int CASE_GROUP = 33;
  public static final int ELIST = 34;
  public static final int FOR_INIT = 35;
  public static final int FOR_CONDITION = 36;
  public static final int FOR_ITERATOR = 37;
  public static final int EMPTY_STAT = 38;
  public static final int FINAL = 39;
  public static final int ABSTRACT = 40;
  public static final int STRICTFP = 41;
  public static final int SUPER_CTOR_CALL = 42;
  public static final int CTOR_CALL = 43;
  public static final int LITERAL_package = 44;
  public static final int SEMI = 45;
  public static final int LITERAL_import = 46;
  public static final int LBRACK = 47;
  public static final int RBRACK = 48;
  public static final int LITERAL_void = 49;
  public static final int LITERAL_boolean = 50;
  public static final int LITERAL_byte = 51;
  public static final int LITERAL_char = 52;
  public static final int LITERAL_short = 53;
  public static final int LITERAL_int = 54;
  public static final int LITERAL_float = 55;
  public static final int LITERAL_long = 56;
  public static final int LITERAL_double = 57;
  public static final int IDENT = 58;
  public static final int DOT = 59;
  public static final int STAR = 60;
  public static final int LITERAL_private = 61;
  public static final int LITERAL_public = 62;
  public static final int LITERAL_protected = 63;
  public static final int LITERAL_static = 64;
  public static final int LITERAL_transient = 65;
  public static final int LITERAL_native = 66;
  public static final int LITERAL_synchronized = 67;
  public static final int LITERAL_volatile = 68;
  public static final int LITERAL_class = 69;
  public static final int LITERAL_extends = 70;
  public static final int LITERAL_interface = 71;
  public static final int LCURLY = 72;
  public static final int RCURLY = 73;
  public static final int COMMA = 74;
  public static final int LITERAL_implements = 75;
  public static final int LPAREN = 76;
  public static final int RPAREN = 77;
  public static final int LITERAL_this = 78;
  public static final int LITERAL_super = 79;
  public static final int ASSIGN = 80;
  public static final int LITERAL_throws = 81;
  public static final int COLON = 82;
  public static final int LITERAL_if = 83;
  public static final int LITERAL_while = 84;
  public static final int LITERAL_do = 85;
  public static final int LITERAL_break = 86;
  public static final int LITERAL_continue = 87;
  public static final int LITERAL_return = 88;
  public static final int LITERAL_switch = 89;
  public static final int LITERAL_throw = 90;
  public static final int LITERAL_for = 91;
  public static final int LITERAL_else = 92;
  public static final int LITERAL_case = 93;
  public static final int LITERAL_default = 94;
  public static final int LITERAL_try = 95;
  public static final int LITERAL_catch = 96;
  public static final int LITERAL_finally = 97;
  public static final int PLUS_ASSIGN = 98;
  public static final int MINUS_ASSIGN = 99;
  public static final int STAR_ASSIGN = 100;
  public static final int DIV_ASSIGN = 101;
  public static final int MOD_ASSIGN = 102;
  public static final int SR_ASSIGN = 103;
  public static final int BSR_ASSIGN = 104;
  public static final int SL_ASSIGN = 105;
  public static final int BAND_ASSIGN = 106;
  public static final int BXOR_ASSIGN = 107;
  public static final int BOR_ASSIGN = 108;
  public static final int QUESTION = 109;
  public static final int LOR = 110;
  public static final int LAND = 111;
  public static final int BOR = 112;
  public static final int BXOR = 113;
  public static final int BAND = 114;
  public static final int NOT_EQUAL = 115;
  public static final int EQUAL = 116;
  public static final int LT = 117;
  public static final int GT = 118;
  public static final int LE = 119;
  public static final int GE = 120;
  public static final int LITERAL_instanceof = 121;
  public static final int SL = 122;
  public static final int SR = 123;
  public static final int BSR = 124;
  public static final int PLUS = 125;
  public static final int MINUS = 126;
  public static final int DIV = 127;
  public static final int MOD = 128;
  public static final int INC = 129;
  public static final int DEC = 130;
  public static final int BNOT = 131;
  public static final int LNOT = 132;
  public static final int LITERAL_true = 133;
  public static final int LITERAL_false = 134;
  public static final int LITERAL_null = 135;
  public static final int LITERAL_new = 136;
  public static final int NUM_INT = 137;
  public static final int CHAR_LITERAL = 138;
  public static final int STRING_LITERAL = 139;
  public static final int NUM_FLOAT = 140;
  public static final int NUM_LONG = 141;
  public static final int NUM_DOUBLE = 142;
  public static final int WS = 143;
  public static final int SL_COMMENT = 144;
  public static final int ML_COMMENT = 145;
  public static final int ESC = 146;
  public static final int HEX_DIGIT = 147;
  public static final int VOCAB = 148;
  public static final int EXPONENT = 149;
  public static final int FLOAT_SUFFIX = 150;
  public static final int ASSERT = 151;
  public static final int STATIC_IMPORT = 152;
  public static final int ENUM = 153;
  public static final int ENUM_DEF = 154;
  public static final int ENUM_CONSTANT_DEF = 155;
  public static final int FOR_EACH_CLAUSE = 156;
  public static final int ANNOTATION_DEF = 157;
  public static final int ANNOTATIONS = 158;
  public static final int ANNOTATION = 159;
  public static final int ANNOTATION_MEMBER_VALUE_PAIR = 160;
  public static final int ANNOTATION_FIELD_DEF = 161;
  public static final int ANNOTATION_ARRAY_INIT = 162;
  public static final int TYPE_ARGUMENTS = 163;
  public static final int TYPE_ARGUMENT = 164;
  public static final int TYPE_PARAMETERS = 165;
  public static final int TYPE_PARAMETER = 166;
  public static final int WILDCARD_TYPE = 167;
  public static final int TYPE_UPPER_BOUNDS = 168;
  public static final int TYPE_LOWER_BOUNDS = 169;
  public static final int AT = 170;
  public static final int ELLIPSIS = 171;
  public static final int GENERIC_START = 172;
  public static final int GENERIC_END = 173;
  public static final int TYPE_EXTENSION_AND = 174;
  public static final int DO_WHILE = 175;
  public static final int RESOURCE_SPECIFICATION = 176;
  public static final int RESOURCES = 177;
  public static final int RESOURCE = 178;
  public static final int STD_ESC = 179;
  public static final int BINARY_DIGIT = 180;
  public static final int ID_START = 181;
  public static final int ID_PART = 182;
  public static final int INT_LITERAL = 183;
  public static final int LONG_LITERAL = 184;
  public static final int FLOAT_LITERAL = 185;
  public static final int DOUBLE_LITERAL = 186;
  public static final int HEX_FLOAT_LITERAL = 187;
  public static final int HEX_DOUBLE_LITERAL = 188;
  public static final int SIGNED_INTEGER = 189;
  public static final int BINARY_EXPONENT = 190;
}
@aunkrig
aunkrig commented Dec 15, 2014

5.8:

package com.puppycrawl.tools.checkstyle.grammars;

public abstract interface GeneratedJavaTokenTypes
{
  public static final int EOF = 1;
  public static final int NULL_TREE_LOOKAHEAD = 3;
  public static final int BLOCK = 4;
  public static final int MODIFIERS = 5;
  public static final int OBJBLOCK = 6;
  public static final int SLIST = 7;
  public static final int CTOR_DEF = 8;
  public static final int METHOD_DEF = 9;
  public static final int VARIABLE_DEF = 10;
  public static final int INSTANCE_INIT = 11;
  public static final int STATIC_INIT = 12;
  public static final int TYPE = 13;
  public static final int CLASS_DEF = 14;
  public static final int INTERFACE_DEF = 15;
  public static final int PACKAGE_DEF = 16;
  public static final int ARRAY_DECLARATOR = 17;
  public static final int EXTENDS_CLAUSE = 18;
  public static final int IMPLEMENTS_CLAUSE = 19;
  public static final int PARAMETERS = 20;
  public static final int PARAMETER_DEF = 21;
  public static final int LABELED_STAT = 22;
  public static final int TYPECAST = 23;
  public static final int INDEX_OP = 24;
  public static final int POST_INC = 25;
  public static final int POST_DEC = 26;
  public static final int METHOD_CALL = 27;
  public static final int EXPR = 28;
  public static final int ARRAY_INIT = 29;
  public static final int IMPORT = 30;
  public static final int UNARY_MINUS = 31;
  public static final int UNARY_PLUS = 32;
  public static final int CASE_GROUP = 33;
  public static final int ELIST = 34;
  public static final int FOR_INIT = 35;
  public static final int FOR_CONDITION = 36;
  public static final int FOR_ITERATOR = 37;
  public static final int EMPTY_STAT = 38;
  public static final int FINAL = 39;
  public static final int ABSTRACT = 40;
  public static final int STRICTFP = 41;
  public static final int SUPER_CTOR_CALL = 42;
  public static final int CTOR_CALL = 43;
  public static final int LITERAL_package = 44;
  public static final int SEMI = 45;
  public static final int LITERAL_import = 46;
  public static final int LBRACK = 47;
  public static final int RBRACK = 48;
  public static final int LITERAL_void = 49;
  public static final int LITERAL_boolean = 50;
  public static final int LITERAL_byte = 51;
  public static final int LITERAL_char = 52;
  public static final int LITERAL_short = 53;
  public static final int LITERAL_int = 54;
  public static final int LITERAL_float = 55;
  public static final int LITERAL_long = 56;
  public static final int LITERAL_double = 57;
  public static final int IDENT = 58;
  public static final int DOT = 59;
  public static final int STAR = 60;
  public static final int LITERAL_private = 61;
  public static final int LITERAL_public = 62;
  public static final int LITERAL_protected = 63;
  public static final int LITERAL_static = 64;
  public static final int LITERAL_transient = 65;
  public static final int LITERAL_native = 66;
  public static final int LITERAL_synchronized = 67;
  public static final int LITERAL_volatile = 68;
  public static final int LITERAL_class = 69;
  public static final int LITERAL_extends = 70;
  public static final int LITERAL_interface = 71;
  public static final int LCURLY = 72;
  public static final int RCURLY = 73;
  public static final int COMMA = 74;
  public static final int LITERAL_implements = 75;
  public static final int LPAREN = 76;
  public static final int RPAREN = 77;
  public static final int LITERAL_this = 78;
  public static final int LITERAL_super = 79;
  public static final int ASSIGN = 80;
  public static final int LITERAL_throws = 81;
  public static final int COLON = 82;
  public static final int LITERAL_if = 83;
  public static final int LITERAL_while = 84;
  public static final int LITERAL_do = 85;
  public static final int LITERAL_break = 86;
  public static final int LITERAL_continue = 87;
  public static final int LITERAL_return = 88;
  public static final int LITERAL_switch = 89;
  public static final int LITERAL_throw = 90;
  public static final int LITERAL_for = 91;
  public static final int LITERAL_else = 92;
  public static final int LITERAL_case = 93;
  public static final int LITERAL_default = 94;
  public static final int LITERAL_try = 95;
  public static final int LITERAL_catch = 96;
  public static final int LITERAL_finally = 97;
  public static final int PLUS_ASSIGN = 98;
  public static final int MINUS_ASSIGN = 99;
  public static final int STAR_ASSIGN = 100;
  public static final int DIV_ASSIGN = 101;
  public static final int MOD_ASSIGN = 102;
  public static final int SR_ASSIGN = 103;
  public static final int BSR_ASSIGN = 104;
  public static final int SL_ASSIGN = 105;
  public static final int BAND_ASSIGN = 106;
  public static final int BXOR_ASSIGN = 107;
  public static final int BOR_ASSIGN = 108;
  public static final int QUESTION = 109;
  public static final int LOR = 110;
  public static final int LAND = 111;
  public static final int BOR = 112;
  public static final int BXOR = 113;
  public static final int BAND = 114;
  public static final int NOT_EQUAL = 115;
  public static final int EQUAL = 116;
  public static final int LT = 117;
  public static final int GT = 118;
  public static final int LE = 119;
  public static final int GE = 120;
  public static final int LITERAL_instanceof = 121;
  public static final int SL = 122;
  public static final int SR = 123;
  public static final int BSR = 124;
  public static final int PLUS = 125;
  public static final int MINUS = 126;
  public static final int DIV = 127;
  public static final int MOD = 128;
  public static final int INC = 129;
  public static final int DEC = 130;
  public static final int BNOT = 131;
  public static final int LNOT = 132;
  public static final int LITERAL_true = 133;
  public static final int LITERAL_false = 134;
  public static final int LITERAL_null = 135;
  public static final int LITERAL_new = 136;
  public static final int NUM_INT = 137;
  public static final int CHAR_LITERAL = 138;
  public static final int STRING_LITERAL = 139;
  public static final int NUM_FLOAT = 140;
  public static final int NUM_LONG = 141;
  public static final int NUM_DOUBLE = 142;
  public static final int WS = 143;
  public static final int SL_COMMENT = 144;
  public static final int ML_COMMENT = 145;
  public static final int ESC = 146;
  public static final int HEX_DIGIT = 147;
  public static final int VOCAB = 148;
  public static final int EXPONENT = 149;
  public static final int FLOAT_SUFFIX = 150;
  public static final int ASSERT = 151;
  public static final int STATIC_IMPORT = 152;
  public static final int ENUM = 153;
  public static final int ENUM_DEF = 154;
  public static final int ENUM_CONSTANT_DEF = 155;
  public static final int FOR_EACH_CLAUSE = 156;
  public static final int ANNOTATION_DEF = 157;
  public static final int ANNOTATIONS = 158;
  public static final int ANNOTATION = 159;
  public static final int ANNOTATION_MEMBER_VALUE_PAIR = 160;
  public static final int ANNOTATION_FIELD_DEF = 161;
  public static final int ANNOTATION_ARRAY_INIT = 162;
  public static final int TYPE_ARGUMENTS = 163;
  public static final int TYPE_ARGUMENT = 164;
  public static final int TYPE_PARAMETERS = 165;
  public static final int TYPE_PARAMETER = 166;
  public static final int WILDCARD_TYPE = 167;
  public static final int TYPE_UPPER_BOUNDS = 168;
  public static final int TYPE_LOWER_BOUNDS = 169;
  public static final int AT = 170;
  public static final int ELLIPSIS = 171;
  public static final int GENERIC_START = 172;
  public static final int GENERIC_END = 173;
  public static final int TYPE_EXTENSION_AND = 174;
  public static final int DO_WHILE = 175;
  public static final int RESOURCE_SPECIFICATION = 176;
  public static final int RESOURCES = 177;
  public static final int RESOURCE = 178;
  public static final int STD_ESC = 179;
  public static final int BINARY_DIGIT = 180;
  public static final int ID_START = 181;
  public static final int ID_PART = 182;
  public static final int INT_LITERAL = 183;
  public static final int LONG_LITERAL = 184;
  public static final int FLOAT_LITERAL = 185;
  public static final int DOUBLE_LITERAL = 186;
  public static final int HEX_FLOAT_LITERAL = 187;
  public static final int HEX_DOUBLE_LITERAL = 188;
  public static final int SIGNED_INTEGER = 189;
  public static final int BINARY_EXPONENT = 190;
}
@aunkrig
aunkrig commented Dec 15, 2014

5.9:

package com.puppycrawl.tools.checkstyle.grammars;

public abstract interface GeneratedJavaTokenTypes
{
  public static final int EOF = 1;
  public static final int NULL_TREE_LOOKAHEAD = 3;
  public static final int BLOCK = 4;
  public static final int MODIFIERS = 5;
  public static final int OBJBLOCK = 6;
  public static final int SLIST = 7;
  public static final int CTOR_DEF = 8;
  public static final int METHOD_DEF = 9;
  public static final int VARIABLE_DEF = 10;
  public static final int INSTANCE_INIT = 11;
  public static final int STATIC_INIT = 12;
  public static final int TYPE = 13;
  public static final int CLASS_DEF = 14;
  public static final int INTERFACE_DEF = 15;
  public static final int PACKAGE_DEF = 16;
  public static final int ARRAY_DECLARATOR = 17;
  public static final int EXTENDS_CLAUSE = 18;
  public static final int IMPLEMENTS_CLAUSE = 19;
  public static final int PARAMETERS = 20;
  public static final int PARAMETER_DEF = 21;
  public static final int LABELED_STAT = 22;
  public static final int TYPECAST = 23;
  public static final int INDEX_OP = 24;
  public static final int POST_INC = 25;
  public static final int POST_DEC = 26;
  public static final int METHOD_CALL = 27;
  public static final int METHOD_REF = 28;
  public static final int EXPR = 29;
  public static final int ARRAY_INIT = 30;
  public static final int IMPORT = 31;
  public static final int UNARY_MINUS = 32;
  public static final int UNARY_PLUS = 33;
  public static final int CASE_GROUP = 34;
  public static final int ELIST = 35;
  public static final int FOR_INIT = 36;
  public static final int FOR_CONDITION = 37;
  public static final int FOR_ITERATOR = 38;
  public static final int EMPTY_STAT = 39;
  public static final int FINAL = 40;
  public static final int ABSTRACT = 41;
  public static final int STRICTFP = 42;
  public static final int SUPER_CTOR_CALL = 43;
  public static final int CTOR_CALL = 44;
  public static final int LITERAL_package = 45;
  public static final int SEMI = 46;
  public static final int LITERAL_import = 47;
  public static final int LBRACK = 48;
  public static final int RBRACK = 49;
  public static final int LITERAL_void = 50;
  public static final int LITERAL_boolean = 51;
  public static final int LITERAL_byte = 52;
  public static final int LITERAL_char = 53;
  public static final int LITERAL_short = 54;
  public static final int LITERAL_int = 55;
  public static final int LITERAL_float = 56;
  public static final int LITERAL_long = 57;
  public static final int LITERAL_double = 58;
  public static final int IDENT = 59;
  public static final int DOT = 60;
  public static final int STAR = 61;
  public static final int LITERAL_private = 62;
  public static final int LITERAL_public = 63;
  public static final int LITERAL_protected = 64;
  public static final int LITERAL_static = 65;
  public static final int LITERAL_transient = 66;
  public static final int LITERAL_native = 67;
  public static final int LITERAL_synchronized = 68;
  public static final int LITERAL_volatile = 69;
  public static final int LITERAL_class = 70;
  public static final int LITERAL_extends = 71;
  public static final int LITERAL_interface = 72;
  public static final int LCURLY = 73;
  public static final int RCURLY = 74;
  public static final int COMMA = 75;
  public static final int LITERAL_implements = 76;
  public static final int LPAREN = 77;
  public static final int RPAREN = 78;
  public static final int LITERAL_this = 79;
  public static final int LITERAL_super = 80;
  public static final int ASSIGN = 81;
  public static final int LITERAL_throws = 82;
  public static final int COLON = 83;
  public static final int DOUBLE_COLON = 84;
  public static final int LITERAL_if = 85;
  public static final int LITERAL_while = 86;
  public static final int LITERAL_do = 87;
  public static final int LITERAL_break = 88;
  public static final int LITERAL_continue = 89;
  public static final int LITERAL_return = 90;
  public static final int LITERAL_switch = 91;
  public static final int LITERAL_throw = 92;
  public static final int LITERAL_for = 93;
  public static final int LITERAL_else = 94;
  public static final int LITERAL_case = 95;
  public static final int LITERAL_default = 96;
  public static final int LITERAL_try = 97;
  public static final int LITERAL_catch = 98;
  public static final int LITERAL_finally = 99;
  public static final int PLUS_ASSIGN = 100;
  public static final int MINUS_ASSIGN = 101;
  public static final int STAR_ASSIGN = 102;
  public static final int DIV_ASSIGN = 103;
  public static final int MOD_ASSIGN = 104;
  public static final int SR_ASSIGN = 105;
  public static final int BSR_ASSIGN = 106;
  public static final int SL_ASSIGN = 107;
  public static final int BAND_ASSIGN = 108;
  public static final int BXOR_ASSIGN = 109;
  public static final int BOR_ASSIGN = 110;
  public static final int QUESTION = 111;
  public static final int LOR = 112;
  public static final int LAND = 113;
  public static final int BOR = 114;
  public static final int BXOR = 115;
  public static final int BAND = 116;
  public static final int NOT_EQUAL = 117;
  public static final int EQUAL = 118;
  public static final int LT = 119;
  public static final int GT = 120;
  public static final int LE = 121;
  public static final int GE = 122;
  public static final int LITERAL_instanceof = 123;
  public static final int SL = 124;
  public static final int SR = 125;
  public static final int BSR = 126;
  public static final int PLUS = 127;
  public static final int MINUS = 128;
  public static final int DIV = 129;
  public static final int MOD = 130;
  public static final int INC = 131;
  public static final int DEC = 132;
  public static final int BNOT = 133;
  public static final int LNOT = 134;
  public static final int LITERAL_true = 135;
  public static final int LITERAL_false = 136;
  public static final int LITERAL_null = 137;
  public static final int LITERAL_new = 138;
  public static final int NUM_INT = 139;
  public static final int CHAR_LITERAL = 140;
  public static final int STRING_LITERAL = 141;
  public static final int NUM_FLOAT = 142;
  public static final int NUM_LONG = 143;
  public static final int NUM_DOUBLE = 144;
  public static final int WS = 145;
  public static final int SL_COMMENT = 146;
  public static final int ML_COMMENT = 147;
  public static final int ESC = 148;
  public static final int HEX_DIGIT = 149;
  public static final int VOCAB = 150;
  public static final int EXPONENT = 151;
  public static final int FLOAT_SUFFIX = 152;
  public static final int ASSERT = 153;
  public static final int STATIC_IMPORT = 154;
  public static final int ENUM = 155;
  public static final int ENUM_DEF = 156;
  public static final int ENUM_CONSTANT_DEF = 157;
  public static final int FOR_EACH_CLAUSE = 158;
  public static final int ANNOTATION_DEF = 159;
  public static final int ANNOTATIONS = 160;
  public static final int ANNOTATION = 161;
  public static final int ANNOTATION_MEMBER_VALUE_PAIR = 162;
  public static final int ANNOTATION_FIELD_DEF = 163;
  public static final int ANNOTATION_ARRAY_INIT = 164;
  public static final int TYPE_ARGUMENTS = 165;
  public static final int TYPE_ARGUMENT = 166;
  public static final int TYPE_PARAMETERS = 167;
  public static final int TYPE_PARAMETER = 168;
  public static final int WILDCARD_TYPE = 169;
  public static final int TYPE_UPPER_BOUNDS = 170;
  public static final int TYPE_LOWER_BOUNDS = 171;
  public static final int AT = 172;
  public static final int ELLIPSIS = 173;
  public static final int GENERIC_START = 174;
  public static final int GENERIC_END = 175;
  public static final int TYPE_EXTENSION_AND = 176;
  public static final int DO_WHILE = 177;
  public static final int RESOURCE_SPECIFICATION = 178;
  public static final int RESOURCES = 179;
  public static final int RESOURCE = 180;
  public static final int LAMBDA = 181;
  public static final int STD_ESC = 182;
  public static final int BINARY_DIGIT = 183;
  public static final int ID_START = 184;
  public static final int ID_PART = 185;
  public static final int INT_LITERAL = 186;
  public static final int LONG_LITERAL = 187;
  public static final int FLOAT_LITERAL = 188;
  public static final int DOUBLE_LITERAL = 189;
  public static final int HEX_FLOAT_LITERAL = 190;
  public static final int HEX_DOUBLE_LITERAL = 191;
  public static final int SIGNED_INTEGER = 192;
  public static final int BINARY_EXPONENT = 193;
}
@aunkrig
aunkrig commented Dec 15, 2014

6.0:

package com.puppycrawl.tools.checkstyle.grammars;

public abstract interface GeneratedJavaTokenTypes
{
  public static final int EOF = 1;
  public static final int NULL_TREE_LOOKAHEAD = 3;
  public static final int BLOCK = 4;
  public static final int MODIFIERS = 5;
  public static final int OBJBLOCK = 6;
  public static final int SLIST = 7;
  public static final int CTOR_DEF = 8;
  public static final int METHOD_DEF = 9;
  public static final int VARIABLE_DEF = 10;
  public static final int INSTANCE_INIT = 11;
  public static final int STATIC_INIT = 12;
  public static final int TYPE = 13;
  public static final int CLASS_DEF = 14;
  public static final int INTERFACE_DEF = 15;
  public static final int PACKAGE_DEF = 16;
  public static final int ARRAY_DECLARATOR = 17;
  public static final int EXTENDS_CLAUSE = 18;
  public static final int IMPLEMENTS_CLAUSE = 19;
  public static final int PARAMETERS = 20;
  public static final int PARAMETER_DEF = 21;
  public static final int LABELED_STAT = 22;
  public static final int TYPECAST = 23;
  public static final int INDEX_OP = 24;
  public static final int POST_INC = 25;
  public static final int POST_DEC = 26;
  public static final int METHOD_CALL = 27;
  public static final int METHOD_REF = 28;
  public static final int EXPR = 29;
  public static final int ARRAY_INIT = 30;
  public static final int IMPORT = 31;
  public static final int UNARY_MINUS = 32;
  public static final int UNARY_PLUS = 33;
  public static final int CASE_GROUP = 34;
  public static final int ELIST = 35;
  public static final int FOR_INIT = 36;
  public static final int FOR_CONDITION = 37;
  public static final int FOR_ITERATOR = 38;
  public static final int EMPTY_STAT = 39;
  public static final int FINAL = 40;
  public static final int ABSTRACT = 41;
  public static final int STRICTFP = 42;
  public static final int SUPER_CTOR_CALL = 43;
  public static final int CTOR_CALL = 44;
  public static final int LITERAL_package = 45;
  public static final int SEMI = 46;
  public static final int LITERAL_import = 47;
  public static final int LBRACK = 48;
  public static final int RBRACK = 49;
  public static final int LITERAL_void = 50;
  public static final int LITERAL_boolean = 51;
  public static final int LITERAL_byte = 52;
  public static final int LITERAL_char = 53;
  public static final int LITERAL_short = 54;
  public static final int LITERAL_int = 55;
  public static final int LITERAL_float = 56;
  public static final int LITERAL_long = 57;
  public static final int LITERAL_double = 58;
  public static final int IDENT = 59;
  public static final int DOT = 60;
  public static final int STAR = 61;
  public static final int LITERAL_private = 62;
  public static final int LITERAL_public = 63;
  public static final int LITERAL_protected = 64;
  public static final int LITERAL_static = 65;
  public static final int LITERAL_transient = 66;
  public static final int LITERAL_native = 67;
  public static final int LITERAL_synchronized = 68;
  public static final int LITERAL_volatile = 69;
  public static final int LITERAL_class = 70;
  public static final int LITERAL_extends = 71;
  public static final int LITERAL_interface = 72;
  public static final int LCURLY = 73;
  public static final int RCURLY = 74;
  public static final int COMMA = 75;
  public static final int LITERAL_implements = 76;
  public static final int LPAREN = 77;
  public static final int RPAREN = 78;
  public static final int LITERAL_this = 79;
  public static final int LITERAL_super = 80;
  public static final int ASSIGN = 81;
  public static final int LITERAL_throws = 82;
  public static final int COLON = 83;
  public static final int DOUBLE_COLON = 84;
  public static final int LITERAL_if = 85;
  public static final int LITERAL_while = 86;
  public static final int LITERAL_do = 87;
  public static final int LITERAL_break = 88;
  public static final int LITERAL_continue = 89;
  public static final int LITERAL_return = 90;
  public static final int LITERAL_switch = 91;
  public static final int LITERAL_throw = 92;
  public static final int LITERAL_for = 93;
  public static final int LITERAL_else = 94;
  public static final int LITERAL_case = 95;
  public static final int LITERAL_default = 96;
  public static final int LITERAL_try = 97;
  public static final int LITERAL_catch = 98;
  public static final int LITERAL_finally = 99;
  public static final int PLUS_ASSIGN = 100;
  public static final int MINUS_ASSIGN = 101;
  public static final int STAR_ASSIGN = 102;
  public static final int DIV_ASSIGN = 103;
  public static final int MOD_ASSIGN = 104;
  public static final int SR_ASSIGN = 105;
  public static final int BSR_ASSIGN = 106;
  public static final int SL_ASSIGN = 107;
  public static final int BAND_ASSIGN = 108;
  public static final int BXOR_ASSIGN = 109;
  public static final int BOR_ASSIGN = 110;
  public static final int QUESTION = 111;
  public static final int LOR = 112;
  public static final int LAND = 113;
  public static final int BOR = 114;
  public static final int BXOR = 115;
  public static final int BAND = 116;
  public static final int NOT_EQUAL = 117;
  public static final int EQUAL = 118;
  public static final int LT = 119;
  public static final int GT = 120;
  public static final int LE = 121;
  public static final int GE = 122;
  public static final int LITERAL_instanceof = 123;
  public static final int SL = 124;
  public static final int SR = 125;
  public static final int BSR = 126;
  public static final int PLUS = 127;
  public static final int MINUS = 128;
  public static final int DIV = 129;
  public static final int MOD = 130;
  public static final int INC = 131;
  public static final int DEC = 132;
  public static final int BNOT = 133;
  public static final int LNOT = 134;
  public static final int LITERAL_true = 135;
  public static final int LITERAL_false = 136;
  public static final int LITERAL_null = 137;
  public static final int LITERAL_new = 138;
  public static final int NUM_INT = 139;
  public static final int CHAR_LITERAL = 140;
  public static final int STRING_LITERAL = 141;
  public static final int NUM_FLOAT = 142;
  public static final int NUM_LONG = 143;
  public static final int NUM_DOUBLE = 144;
  public static final int WS = 145;
  public static final int ESC = 146;
  public static final int HEX_DIGIT = 147;
  public static final int VOCAB = 148;
  public static final int EXPONENT = 149;
  public static final int FLOAT_SUFFIX = 150;
  public static final int SINGLE_LINE_COMMENT = 151;
  public static final int BLOCK_COMMENT_BEGIN = 152;
  public static final int BLOCK_COMMENT_END = 153;
  public static final int COMMENT_CONTENT = 154;
  public static final int ASSERT = 155;
  public static final int STATIC_IMPORT = 156;
  public static final int ENUM = 157;
  public static final int ENUM_DEF = 158;
  public static final int ENUM_CONSTANT_DEF = 159;
  public static final int FOR_EACH_CLAUSE = 160;
  public static final int ANNOTATION_DEF = 161;
  public static final int ANNOTATIONS = 162;
  public static final int ANNOTATION = 163;
  public static final int ANNOTATION_MEMBER_VALUE_PAIR = 164;
  public static final int ANNOTATION_FIELD_DEF = 165;
  public static final int ANNOTATION_ARRAY_INIT = 166;
  public static final int TYPE_ARGUMENTS = 167;
  public static final int TYPE_ARGUMENT = 168;
  public static final int TYPE_PARAMETERS = 169;
  public static final int TYPE_PARAMETER = 170;
  public static final int WILDCARD_TYPE = 171;
  public static final int TYPE_UPPER_BOUNDS = 172;
  public static final int TYPE_LOWER_BOUNDS = 173;
  public static final int AT = 174;
  public static final int ELLIPSIS = 175;
  public static final int GENERIC_START = 176;
  public static final int GENERIC_END = 177;
  public static final int TYPE_EXTENSION_AND = 178;
  public static final int DO_WHILE = 179;
  public static final int RESOURCE_SPECIFICATION = 180;
  public static final int RESOURCES = 181;
  public static final int RESOURCE = 182;
  public static final int LAMBDA = 183;
  public static final int SINGLE_LINE_COMMENT_CONTENT = 184;
  public static final int BLOCK_COMMENT_CONTENT = 185;
  public static final int STD_ESC = 186;
  public static final int BINARY_DIGIT = 187;
  public static final int ID_START = 188;
  public static final int ID_PART = 189;
  public static final int INT_LITERAL = 190;
  public static final int LONG_LITERAL = 191;
  public static final int FLOAT_LITERAL = 192;
  public static final int DOUBLE_LITERAL = 193;
  public static final int HEX_FLOAT_LITERAL = 194;
  public static final int HEX_DOUBLE_LITERAL = 195;
  public static final int SIGNED_INTEGER = 196;
  public static final int BINARY_EXPONENT = 197;
}
@aunkrig
aunkrig commented Dec 15, 2014

6.1:

package com.puppycrawl.tools.checkstyle.grammars;

public abstract interface GeneratedJavaTokenTypes
{
  public static final int EOF = 1;
  public static final int NULL_TREE_LOOKAHEAD = 3;
  public static final int BLOCK = 4;
  public static final int MODIFIERS = 5;
  public static final int OBJBLOCK = 6;
  public static final int SLIST = 7;
  public static final int CTOR_DEF = 8;
  public static final int METHOD_DEF = 9;
  public static final int VARIABLE_DEF = 10;
  public static final int INSTANCE_INIT = 11;
  public static final int STATIC_INIT = 12;
  public static final int TYPE = 13;
  public static final int CLASS_DEF = 14;
  public static final int INTERFACE_DEF = 15;
  public static final int PACKAGE_DEF = 16;
  public static final int ARRAY_DECLARATOR = 17;
  public static final int EXTENDS_CLAUSE = 18;
  public static final int IMPLEMENTS_CLAUSE = 19;
  public static final int PARAMETERS = 20;
  public static final int PARAMETER_DEF = 21;
  public static final int LABELED_STAT = 22;
  public static final int TYPECAST = 23;
  public static final int INDEX_OP = 24;
  public static final int POST_INC = 25;
  public static final int POST_DEC = 26;
  public static final int METHOD_CALL = 27;
  public static final int METHOD_REF = 28;
  public static final int EXPR = 29;
  public static final int ARRAY_INIT = 30;
  public static final int IMPORT = 31;
  public static final int UNARY_MINUS = 32;
  public static final int UNARY_PLUS = 33;
  public static final int CASE_GROUP = 34;
  public static final int ELIST = 35;
  public static final int FOR_INIT = 36;
  public static final int FOR_CONDITION = 37;
  public static final int FOR_ITERATOR = 38;
  public static final int EMPTY_STAT = 39;
  public static final int FINAL = 40;
  public static final int ABSTRACT = 41;
  public static final int STRICTFP = 42;
  public static final int SUPER_CTOR_CALL = 43;
  public static final int CTOR_CALL = 44;
  public static final int LITERAL_package = 45;
  public static final int SEMI = 46;
  public static final int LITERAL_import = 47;
  public static final int LBRACK = 48;
  public static final int RBRACK = 49;
  public static final int LITERAL_void = 50;
  public static final int LITERAL_boolean = 51;
  public static final int LITERAL_byte = 52;
  public static final int LITERAL_char = 53;
  public static final int LITERAL_short = 54;
  public static final int LITERAL_int = 55;
  public static final int LITERAL_float = 56;
  public static final int LITERAL_long = 57;
  public static final int LITERAL_double = 58;
  public static final int IDENT = 59;
  public static final int DOT = 60;
  public static final int STAR = 61;
  public static final int LITERAL_private = 62;
  public static final int LITERAL_public = 63;
  public static final int LITERAL_protected = 64;
  public static final int LITERAL_static = 65;
  public static final int LITERAL_transient = 66;
  public static final int LITERAL_native = 67;
  public static final int LITERAL_synchronized = 68;
  public static final int LITERAL_volatile = 69;
  public static final int LITERAL_class = 70;
  public static final int LITERAL_extends = 71;
  public static final int LITERAL_interface = 72;
  public static final int LCURLY = 73;
  public static final int RCURLY = 74;
  public static final int COMMA = 75;
  public static final int LITERAL_implements = 76;
  public static final int LPAREN = 77;
  public static final int RPAREN = 78;
  public static final int LITERAL_this = 79;
  public static final int LITERAL_super = 80;
  public static final int ASSIGN = 81;
  public static final int LITERAL_throws = 82;
  public static final int COLON = 83;
  public static final int DOUBLE_COLON = 84;
  public static final int LITERAL_if = 85;
  public static final int LITERAL_while = 86;
  public static final int LITERAL_do = 87;
  public static final int LITERAL_break = 88;
  public static final int LITERAL_continue = 89;
  public static final int LITERAL_return = 90;
  public static final int LITERAL_switch = 91;
  public static final int LITERAL_throw = 92;
  public static final int LITERAL_for = 93;
  public static final int LITERAL_else = 94;
  public static final int LITERAL_case = 95;
  public static final int LITERAL_default = 96;
  public static final int LITERAL_try = 97;
  public static final int LITERAL_catch = 98;
  public static final int LITERAL_finally = 99;
  public static final int PLUS_ASSIGN = 100;
  public static final int MINUS_ASSIGN = 101;
  public static final int STAR_ASSIGN = 102;
  public static final int DIV_ASSIGN = 103;
  public static final int MOD_ASSIGN = 104;
  public static final int SR_ASSIGN = 105;
  public static final int BSR_ASSIGN = 106;
  public static final int SL_ASSIGN = 107;
  public static final int BAND_ASSIGN = 108;
  public static final int BXOR_ASSIGN = 109;
  public static final int BOR_ASSIGN = 110;
  public static final int QUESTION = 111;
  public static final int LOR = 112;
  public static final int LAND = 113;
  public static final int BOR = 114;
  public static final int BXOR = 115;
  public static final int BAND = 116;
  public static final int NOT_EQUAL = 117;
  public static final int EQUAL = 118;
  public static final int LT = 119;
  public static final int GT = 120;
  public static final int LE = 121;
  public static final int GE = 122;
  public static final int LITERAL_instanceof = 123;
  public static final int SL = 124;
  public static final int SR = 125;
  public static final int BSR = 126;
  public static final int PLUS = 127;
  public static final int MINUS = 128;
  public static final int DIV = 129;
  public static final int MOD = 130;
  public static final int INC = 131;
  public static final int DEC = 132;
  public static final int BNOT = 133;
  public static final int LNOT = 134;
  public static final int LITERAL_true = 135;
  public static final int LITERAL_false = 136;
  public static final int LITERAL_null = 137;
  public static final int LITERAL_new = 138;
  public static final int NUM_INT = 139;
  public static final int CHAR_LITERAL = 140;
  public static final int STRING_LITERAL = 141;
  public static final int NUM_FLOAT = 142;
  public static final int NUM_LONG = 143;
  public static final int NUM_DOUBLE = 144;
  public static final int WS = 145;
  public static final int ESC = 146;
  public static final int HEX_DIGIT = 147;
  public static final int VOCAB = 148;
  public static final int EXPONENT = 149;
  public static final int FLOAT_SUFFIX = 150;
  public static final int SINGLE_LINE_COMMENT = 151;
  public static final int BLOCK_COMMENT_BEGIN = 152;
  public static final int BLOCK_COMMENT_END = 153;
  public static final int COMMENT_CONTENT = 154;
  public static final int ASSERT = 155;
  public static final int STATIC_IMPORT = 156;
  public static final int ENUM = 157;
  public static final int ENUM_DEF = 158;
  public static final int ENUM_CONSTANT_DEF = 159;
  public static final int FOR_EACH_CLAUSE = 160;
  public static final int ANNOTATION_DEF = 161;
  public static final int ANNOTATIONS = 162;
  public static final int ANNOTATION = 163;
  public static final int ANNOTATION_MEMBER_VALUE_PAIR = 164;
  public static final int ANNOTATION_FIELD_DEF = 165;
  public static final int ANNOTATION_ARRAY_INIT = 166;
  public static final int TYPE_ARGUMENTS = 167;
  public static final int TYPE_ARGUMENT = 168;
  public static final int TYPE_PARAMETERS = 169;
  public static final int TYPE_PARAMETER = 170;
  public static final int WILDCARD_TYPE = 171;
  public static final int TYPE_UPPER_BOUNDS = 172;
  public static final int TYPE_LOWER_BOUNDS = 173;
  public static final int AT = 174;
  public static final int ELLIPSIS = 175;
  public static final int GENERIC_START = 176;
  public static final int GENERIC_END = 177;
  public static final int TYPE_EXTENSION_AND = 178;
  public static final int DO_WHILE = 179;
  public static final int RESOURCE_SPECIFICATION = 180;
  public static final int RESOURCES = 181;
  public static final int RESOURCE = 182;
  public static final int LAMBDA = 183;
  public static final int SINGLE_LINE_COMMENT_CONTENT = 184;
  public static final int BLOCK_COMMENT_CONTENT = 185;
  public static final int STD_ESC = 186;
  public static final int BINARY_DIGIT = 187;
  public static final int ID_START = 188;
  public static final int ID_PART = 189;
  public static final int INT_LITERAL = 190;
  public static final int LONG_LITERAL = 191;
  public static final int FLOAT_LITERAL = 192;
  public static final int DOUBLE_LITERAL = 193;
  public static final int HEX_FLOAT_LITERAL = 194;
  public static final int HEX_DOUBLE_LITERAL = 195;
  public static final int SIGNED_INTEGER = 196;
  public static final int BINARY_EXPONENT = 197;
}
@aunkrig
aunkrig commented Dec 15, 2014

The problem described in sevntu-checkstyle/sevntu.checkstyle#272 obviously originates in this issue. Yet another reason to get this issue fixed!

@aunkrig
aunkrig commented Dec 15, 2014

For the sake of completeness:
Version 6.1.1 of "GeneratedJavaTokenTypes" is identical with version 6.1.

@aunkrig
aunkrig commented Dec 15, 2014

Again for reference, the history of "broken" CS versions:

Version Release date Constant values
5.6 2012-09-18 OK
5.7 2014-10-16 OK
5.8 2014-10-08 OK
5.9 2014-10-17 3 new tokens - not OK
6.0 2014-10-23 More new tokens - not OK
6.1 2014-11-14 (unchanged) - still not OK
6.1.1 2014-11-27 (unchanged) - still not OK

So the "dark age" begins with CS version 5.9 and lasts until a decision has been made whether to return to the "old " token types, or to continue with the 6.0 token codes.

My recommendation for the company I work for is to absolutely stay with version 5.7 until the issue will be resolved.

@romani
Member
romani commented Dec 16, 2014

thanks for reporting, we will not do any further rollouts till that issues is resolved.
I will do that asap.

Is it possible to share what organization you represent? and how you extend Checkstyle. I am just curious.

@romani romani self-assigned this Dec 16, 2014
@aunkrig
aunkrig commented Dec 16, 2014

Hello Romani,

IMHO the real problem is that the ANTLR-generated token type constants are exposed on the CS extension API. I propose to take yet another major version step, and change "TokenTypes" from CLASS to ENUM (and "DetailAST.getType()" from INT to "TokenTypes()"). That way, extension programmer need to make very little changes to their code (unless they did "arithmetics" with the integer values).

CU

Arno

@aunkrig
aunkrig commented Dec 16, 2014

The CS extension I'm working on is

http://cs-contrib.unkrig.de/

I don't want to spread too much personal data over the web, but you can check my profile on xing.com.

@sabaka
Contributor
sabaka commented Dec 16, 2014

Hello @aunkrig,
Do you use values of constants instead of names?

@aunkrig
aunkrig commented Dec 17, 2014

If I would, I'd be version dependent - I retrieve the constant values through REFLECTION.

https://svn.code.sf.net/p/loggifier/code/trunk/de.unkrig.cs-contrib.core/src/de/unkrig/cscontrib/LocalTokenType.java

@sabaka
Contributor
sabaka commented Dec 18, 2014

Hi @aunkrig .
I have bad news for you.
After some investigation we realized the reason of this problem.
Unfortunately it's impossible to revert TokenTypes like it was in v5.7.

This changes are related to grammar changes, which make checkstyle support Java 8 syntax and comments. Similar changes had to appear when checkstyle began support Java 7 (Sep 2011).

After discussion we decide to do massive changes of TokenTypes in next release, which allow us to avoid same problem every new grammar release in future.

@aunkrig
aunkrig commented Dec 19, 2014

Hi @sabaka,

wouldn't it be possible to re-arrange the token types so that the numbering of the 5.7 token types remains the same?

@romani
Member
romani commented Dec 20, 2014

Problem is that Checkstyle in completely reply on ANTL v2 to generate that numbers from Lexical and Syntax tokens, and that numbering is sequential.
So any changes to Syntax part of java or to set of Lexical tokens - will cause a problem.

The only way for us now to keep compatibility is to mix tokens declaration in grammar - but that will lead to grammar become unmaintainable. This is the most complicated part of Checkstyle.

So we have already broke compatibility even we tried to not do that - our bad, sorry. We need a solution that would resolve that problem completely, so we need to brace one more time.

We will split numbers of tokens by OFFSET variable, Lexical tokens will be in group [0....10000], Syntax tokens will be in group of [10000 ...... MAXINT];
Example : https://github.com/checkstyle/checkstyle/blob/master/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocTokenTypes.java#L25

So any future changes in java grammar will not allow developers to make such problem easily.
We also plan to update list of tokens with comments to remind future developer that all new Syntax tokens and Lex tokens should be added to the end of the list.

So, you and all other extensions will have to be recompiled against Checkstyle 7.0, to grab latest token numbers. Sorry.

@romani
Member
romani commented Dec 20, 2014

@aunkrig, if you want we could put link to your extension at our home page http://checkstyle.sourceforge.net/#Related_Tools

@aunkrig
aunkrig commented Dec 21, 2014

I'd appreciate that!

@aunkrig
aunkrig commented Dec 21, 2014

By the way, is there a catalog of globally available checks? Or is the concept to "embrace" other projects and encourage them to integrate their checks into github checkstyle?

However I feel that there must be a lot of "specific" checks that are totally generic, but still useful for evenly "specific" audiences, an be it only as an inspiration for one's own checks.

@romani
Member
romani commented Dec 21, 2014

@aunkrig, we go off-topic we can continue discussion in mail-list - https://groups.google.com/forum/#!topic/checkstyle/etBjz00_kMo.

@sabaka sabaka pushed a commit to sabaka/checkstyle that referenced this issue Dec 22, 2014
Ilja Dubinin #505 have to be fixed. I moved new tokens to the end of tokens list. c2b6e7e
@sabaka
Contributor
sabaka commented Dec 22, 2014

@aunkrig
Looks like I've found another way to resolve this problem.
Please test changes from branch in my fork: https://github.com/sabaka/checkstyle/tree/iss505
and write here about result
Thanks

@sabaka sabaka pushed a commit to sabaka/checkstyle that referenced this issue Dec 22, 2014
Ilja Dubinin #505 have to be fixed. I moved new tokens to the end of tokens list. ec086ab
@romani
Member
romani commented Dec 24, 2014

6.2-SNAPSHOT after fixes of @sabaka

public interface GeneratedJavaTokenTypes {
    int EOF = 1;
    int NULL_TREE_LOOKAHEAD = 3;
    int BLOCK = 4;
    int MODIFIERS = 5;
    int OBJBLOCK = 6;
    int SLIST = 7;
    int CTOR_DEF = 8;
    int METHOD_DEF = 9;
    int VARIABLE_DEF = 10;
    int INSTANCE_INIT = 11;
    int STATIC_INIT = 12;
    int TYPE = 13;
    int CLASS_DEF = 14;
    int INTERFACE_DEF = 15;
    int PACKAGE_DEF = 16;
    int ARRAY_DECLARATOR = 17;
    int EXTENDS_CLAUSE = 18;
    int IMPLEMENTS_CLAUSE = 19;
    int PARAMETERS = 20;
    int PARAMETER_DEF = 21;
    int LABELED_STAT = 22;
    int TYPECAST = 23;
    int INDEX_OP = 24;
    int POST_INC = 25;
    int POST_DEC = 26;
    int METHOD_CALL = 27;
    int EXPR = 28;
    int ARRAY_INIT = 29;
    int IMPORT = 30;
    int UNARY_MINUS = 31;
    int UNARY_PLUS = 32;
    int CASE_GROUP = 33;
    int ELIST = 34;
    int FOR_INIT = 35;
    int FOR_CONDITION = 36;
    int FOR_ITERATOR = 37;
    int EMPTY_STAT = 38;
    int FINAL = 39;
    int ABSTRACT = 40;
    int STRICTFP = 41;
    int SUPER_CTOR_CALL = 42;
    int CTOR_CALL = 43;
    int LITERAL_package = 44;
    int SEMI = 45;
    int LITERAL_import = 46;
    int LBRACK = 47;
    int RBRACK = 48;
    int LITERAL_void = 49;
    int LITERAL_boolean = 50;
    int LITERAL_byte = 51;
    int LITERAL_char = 52;
    int LITERAL_short = 53;
    int LITERAL_int = 54;
    int LITERAL_float = 55;
    int LITERAL_long = 56;
    int LITERAL_double = 57;
    int IDENT = 58;
    int DOT = 59;
    int STAR = 60;
    int LITERAL_private = 61;
    int LITERAL_public = 62;
    int LITERAL_protected = 63;
    int LITERAL_static = 64;
    int LITERAL_transient = 65;
    int LITERAL_native = 66;
    int LITERAL_synchronized = 67;
    int LITERAL_volatile = 68;
    int LITERAL_class = 69;
    int LITERAL_extends = 70;
    int LITERAL_interface = 71;
    int LCURLY = 72;
    int RCURLY = 73;
    int COMMA = 74;
    int LITERAL_implements = 75;
    int LPAREN = 76;
    int RPAREN = 77;
    int LITERAL_this = 78;
    int LITERAL_super = 79;
    int ASSIGN = 80;
    int LITERAL_throws = 81;
    int COLON = 82;
    int LITERAL_if = 83;
    int LITERAL_while = 84;
    int LITERAL_do = 85;
    int LITERAL_break = 86;
    int LITERAL_continue = 87;
    int LITERAL_return = 88;
    int LITERAL_switch = 89;
    int LITERAL_throw = 90;
    int LITERAL_for = 91;
    int LITERAL_else = 92;
    int LITERAL_case = 93;
    int LITERAL_default = 94;
    int LITERAL_try = 95;
    int LITERAL_catch = 96;
    int LITERAL_finally = 97;
    int PLUS_ASSIGN = 98;
    int MINUS_ASSIGN = 99;
    int STAR_ASSIGN = 100;
    int DIV_ASSIGN = 101;
    int MOD_ASSIGN = 102;
    int SR_ASSIGN = 103;
    int BSR_ASSIGN = 104;
    int SL_ASSIGN = 105;
    int BAND_ASSIGN = 106;
    int BXOR_ASSIGN = 107;
    int BOR_ASSIGN = 108;
    int QUESTION = 109;
    int LOR = 110;
    int LAND = 111;
    int BOR = 112;
    int BXOR = 113;
    int BAND = 114;
    int NOT_EQUAL = 115;
    int EQUAL = 116;
    int LT = 117;
    int GT = 118;
    int LE = 119;
    int GE = 120;
    int LITERAL_instanceof = 121;
    int SL = 122;
    int SR = 123;
    int BSR = 124;
    int PLUS = 125;
    int MINUS = 126;
    int DIV = 127;
    int MOD = 128;
    int INC = 129;
    int DEC = 130;
    int BNOT = 131;
    int LNOT = 132;
    int LITERAL_true = 133;
    int LITERAL_false = 134;
    int LITERAL_null = 135;
    int LITERAL_new = 136;
    int NUM_INT = 137;
    int CHAR_LITERAL = 138;
    int STRING_LITERAL = 139;
    int NUM_FLOAT = 140;
    int NUM_LONG = 141;
    int NUM_DOUBLE = 142;
    int WS = 143;
    int SINGLE_LINE_COMMENT = 144;
    int BLOCK_COMMENT_BEGIN = 145;
    int ESC = 146;
    int HEX_DIGIT = 147;
    int VOCAB = 148;
    int EXPONENT = 149;
    int FLOAT_SUFFIX = 150;
    int ASSERT = 151;
    int STATIC_IMPORT = 152;
    int ENUM = 153;
    int ENUM_DEF = 154;
    int ENUM_CONSTANT_DEF = 155;
    int FOR_EACH_CLAUSE = 156;
    int ANNOTATION_DEF = 157;
    int ANNOTATIONS = 158;
    int ANNOTATION = 159;
    int ANNOTATION_MEMBER_VALUE_PAIR = 160;
    int ANNOTATION_FIELD_DEF = 161;
    int ANNOTATION_ARRAY_INIT = 162;
    int TYPE_ARGUMENTS = 163;
    int TYPE_ARGUMENT = 164;
    int TYPE_PARAMETERS = 165;
    int TYPE_PARAMETER = 166;
    int WILDCARD_TYPE = 167;
    int TYPE_UPPER_BOUNDS = 168;
    int TYPE_LOWER_BOUNDS = 169;
    int AT = 170;
    int ELLIPSIS = 171;
    int GENERIC_START = 172;
    int GENERIC_END = 173;
    int TYPE_EXTENSION_AND = 174;
    int DO_WHILE = 175;
    int RESOURCE_SPECIFICATION = 176;
    int RESOURCES = 177;
    int RESOURCE = 178;
    int DOUBLE_COLON = 179;
    int METHOD_REF = 180;
    int LAMBDA = 181;
    int BLOCK_COMMENT_END = 182;
    int COMMENT_CONTENT = 183;
    int SINGLE_LINE_COMMENT_CONTENT = 184;
    int BLOCK_COMMENT_CONTENT = 185;
    int STD_ESC = 186;
    int BINARY_DIGIT = 187;
    int ID_START = 188;
    int ID_PART = 189;
    int INT_LITERAL = 190;
    int LONG_LITERAL = 191;
    int FLOAT_LITERAL = 192;
    int DOUBLE_LITERAL = 193;
    int HEX_FLOAT_LITERAL = 194;
    int HEX_DOUBLE_LITERAL = 195;
    int SIGNED_INTEGER = 196;
    int BINARY_EXPONENT = 197;
}

visually diff looks like:
screenshot-diff-tokens1
screenshot-diff-tokens2

"int STD_ESC = 186; ......" are not referenced in TokenTypes so nobody used them, so any changes in that numbers should not affect anybody as they are not public Tokens.

@romani
Member
romani commented Dec 24, 2014

will be released in 6.2

@romani romani closed this Dec 24, 2014
@romani romani assigned sabaka and unassigned romani Dec 24, 2014
@aunkrig
aunkrig commented Dec 30, 2014

@romani
Wouldn't it be a good idea to call the next version "7.0", because it breaks compatibility with 6.0 and 6.1? Commonly people count their versions like "compatibility.features.bugfixes".

@sabaka
Contributor
sabaka commented Dec 30, 2014

@aunkrig this changes already exist in 6.2. You may test stable version instead of my branch.

@romani
Member
romani commented Dec 30, 2014

@aunkrig

Wouldn't it be a good idea to call the next version "7.0"

We thought about it, but decided to stay with 6.X version as we fixed backward compatibility (even fixed usually mean braking one more time). As we did release pretty frequent I decided to not do 7.0 as chance that smb noticed that is minimal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment