You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TokenId.java 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. /*
  2. * Javassist, a Java-bytecode translator toolkit.
  3. * Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.
  4. *
  5. * The contents of this file are subject to the Mozilla Public License Version
  6. * 1.1 (the "License"); you may not use this file except in compliance with
  7. * the License. Alternatively, the contents of this file may be used under
  8. * the terms of the GNU Lesser General Public License Version 2.1 or later,
  9. * or the Apache License Version 2.0.
  10. *
  11. * Software distributed under the License is distributed on an "AS IS" basis,
  12. * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13. * for the specific language governing rights and limitations under the
  14. * License.
  15. */
  16. package javassist.compiler;
  17. public interface TokenId {
  18. int ABSTRACT = 300;
  19. int BOOLEAN = 301;
  20. int BREAK = 302;
  21. int BYTE = 303;
  22. int CASE = 304;
  23. int CATCH = 305;
  24. int CHAR = 306;
  25. int CLASS = 307;
  26. int CONST = 308; // reserved keyword
  27. int CONTINUE = 309;
  28. int DEFAULT = 310;
  29. int DO = 311;
  30. int DOUBLE = 312;
  31. int ELSE = 313;
  32. int EXTENDS = 314;
  33. int FINAL = 315;
  34. int FINALLY = 316;
  35. int FLOAT = 317;
  36. int FOR = 318;
  37. int GOTO = 319; // reserved keyword
  38. int IF = 320;
  39. int IMPLEMENTS = 321;
  40. int IMPORT = 322;
  41. int INSTANCEOF = 323;
  42. int INT = 324;
  43. int INTERFACE = 325;
  44. int LONG = 326;
  45. int NATIVE = 327;
  46. int NEW = 328;
  47. int PACKAGE = 329;
  48. int PRIVATE = 330;
  49. int PROTECTED = 331;
  50. int PUBLIC = 332;
  51. int RETURN = 333;
  52. int SHORT = 334;
  53. int STATIC = 335;
  54. int SUPER = 336;
  55. int SWITCH = 337;
  56. int SYNCHRONIZED = 338;
  57. int THIS = 339;
  58. int THROW = 340;
  59. int THROWS = 341;
  60. int TRANSIENT = 342;
  61. int TRY = 343;
  62. int VOID = 344;
  63. int VOLATILE = 345;
  64. int WHILE = 346;
  65. int STRICT = 347;
  66. int NEQ = 350; // !=
  67. int MOD_E = 351; // %=
  68. int AND_E = 352; // &=
  69. int MUL_E = 353; // *=
  70. int PLUS_E = 354; // +=
  71. int MINUS_E = 355; // -=
  72. int DIV_E = 356; // /=
  73. int LE = 357; // <=
  74. int EQ = 358; // ==
  75. int GE = 359; // >=
  76. int EXOR_E = 360; // ^=
  77. int OR_E = 361; // |=
  78. int PLUSPLUS = 362; // ++
  79. int MINUSMINUS = 363; // --
  80. int LSHIFT = 364; // <<
  81. int LSHIFT_E = 365; // <<=
  82. int RSHIFT = 366; // >>
  83. int RSHIFT_E = 367; // >>=
  84. int OROR = 368; // ||
  85. int ANDAND = 369; // &&
  86. int ARSHIFT = 370; // >>>
  87. int ARSHIFT_E = 371; // >>>=
  88. // operators from NEQ to ARSHIFT_E
  89. String opNames[] = { "!=", "%=", "&=", "*=", "+=", "-=", "/=",
  90. "<=", "==", ">=", "^=", "|=", "++", "--",
  91. "<<", "<<=", ">>", ">>=", "||", "&&", ">>>",
  92. ">>>=" };
  93. // operators from MOD_E to ARSHIFT_E
  94. int assignOps[] = { '%', '&', '*', '+', '-', '/', 0, 0, 0,
  95. '^', '|', 0, 0, 0, LSHIFT, 0, RSHIFT, 0, 0, 0,
  96. ARSHIFT };
  97. int Identifier = 400;
  98. int CharConstant = 401;
  99. int IntConstant = 402;
  100. int LongConstant = 403;
  101. int FloatConstant = 404;
  102. int DoubleConstant = 405;
  103. int StringL = 406;
  104. int TRUE = 410;
  105. int FALSE = 411;
  106. int NULL = 412;
  107. int CALL = 'C'; // method call
  108. int ARRAY = 'A'; // array access
  109. int MEMBER = '#'; // static member access
  110. int EXPR = 'E'; // expression statement
  111. int LABEL = 'L'; // label statement
  112. int BLOCK = 'B'; // block statement
  113. int DECL = 'D'; // declaration statement
  114. int BadToken = 500;
  115. }