/cpp/src/main/java/com/google/test/metric/cpp/CPPvariables.java

http://testability-explorer.googlecode.com/ · Java · 98 lines · 29 code · 18 blank · 51 comment · 0 complexity · 0c3d48c7ef04c4fe76c8c481d226706d MD5 · raw file

  1. package com.google.test.metric.cpp;
  2. import java.util.BitSet;
  3. /**
  4. * This class provides support for the grammar indexing of parsed tokens.
  5. */
  6. class CPPvariables {
  7. /**
  8. * Marks an invalid construct.
  9. */
  10. public static final BitSet QI_INVALID = new BitSet(8);
  11. /**
  12. * Marks a type (includes enum, class, typedefs).
  13. */
  14. public static final BitSet QI_TYPE = new BitSet(8);
  15. /**
  16. * Marks a destructor.
  17. */
  18. public static final BitSet QI_DTOR = new BitSet(8);
  19. /**
  20. * Marks a constructor.
  21. */
  22. public static final BitSet QI_CTOR = new BitSet(8);
  23. /**
  24. * Marks an operator.
  25. */
  26. public static final BitSet QI_OPERATOR = new BitSet(8);
  27. /**
  28. * Marks a pointer to member.
  29. */
  30. public static final BitSet QI_PTR_MEMBER = new BitSet(8);
  31. /**
  32. * Marks a variable.
  33. */
  34. public static final BitSet QI_VAR = new BitSet(8);
  35. /**
  36. * Marks a function.
  37. */
  38. public static final BitSet QI_FUN = new BitSet(8);
  39. /**
  40. * Marks a ID. Not a type, but could be a var, func...
  41. */
  42. public static final BitSet QI_ID = new BitSet(8);
  43. /**
  44. * Initialization of the above markers.
  45. */
  46. static {
  47. QI_TYPE.set(0);
  48. QI_DTOR.set(1);
  49. QI_CTOR.set(2);
  50. QI_OPERATOR.set(3);
  51. QI_PTR_MEMBER.set(4);
  52. QI_ID.set(5);
  53. QI_VAR.set(6);
  54. QI_FUN.set(7);
  55. }
  56. /**
  57. * Maximum template token scan depth.
  58. */
  59. public static final int MAX_TEMPLATE_TOKEN_SCAN = 200;
  60. /**
  61. * Type def string identifier.
  62. */
  63. public static final String OT_TYPE_DEF = "otTypeDef";
  64. /**
  65. * Struct string identifier.
  66. */
  67. public static final String OT_STRUCT = "otStruct";
  68. /**
  69. * Union string identifier.
  70. */
  71. public static final String OT_UNION = "otUnion";
  72. /**
  73. * Enum string identifier.
  74. */
  75. public static final String OT_ENUM = "otEnum";
  76. /**
  77. * Class string identifier.
  78. */
  79. public static final String OT_CLASS = "otClass";
  80. }