public String[] getTokenLiteralNames() {
		int numTokens = getMaxTokenType();
		String[] literalNames = new String[numTokens+1];
		for (int i = 0; i < Math.min(literalNames.length, typeToStringLiteralList.size()); i++) {
			literalNames[i] = typeToStringLiteralList.get(i);
		}

		for (Map.Entry<String, Integer> entry : stringLiteralToTypeMap.entrySet()) {
			int value = entry.getValue();
			if (value >= 0 && value < literalNames.length && literalNames[value] == null) {
				literalNames[value] = entry.getKey();
			}
		}

		return literalNames;
	}
Gets the literal names assigned to tokens in the grammar.
tool/src/org/antlr/v4/tool/Grammar.java