Exemplo n.º 1
0
 @Test
 public void testSystemIndex() {
   IString test1 = new IString("AnIString1");
   IString test2 = new IString("AnotherIString2");
   IString test3 = new IString("YetAnotherIString2");
   assertTrue(test1.id == Vocabulary.systemIndexOf(test1.toString()));
   assertTrue(test2.id == Vocabulary.systemIndexOf(test2.toString()));
   assertTrue(test3.id == Vocabulary.systemIndexOf(test3.toString()));
 }
Exemplo n.º 2
0
  static {
    tokenNames = new String[_SYMBOLIC_NAMES.length];
    for (int i = 0; i < tokenNames.length; i++) {
      tokenNames[i] = VOCABULARY.getLiteralName(i);
      if (tokenNames[i] == null) {
        tokenNames[i] = VOCABULARY.getSymbolicName(i);
      }

      if (tokenNames[i] == null) {
        tokenNames[i] = "<INVALID>";
      }
    }
  }