/** * Get all tokes in the give category. * * @param category The category to get. * @return A collection of kinds in this category. */ public static Collection<Token.Kind> getCategory(Token.Category category) { LinkedList<Token.Kind> kinds = new LinkedList<Token.Kind>(); for (Token.Kind kind : Token.Kind.values()) { if (kind.category == null) { System.out.println(kind.name()); } if (kind.category.equals(category)) { kinds.add(kind); } } return kinds; }