@@ -0,0 +1,1871 @@
+package org.antlr.v4.test.runtime.java;%0A%0Aimport org.antlr.v4.runtime.misc.InterpreterDataReader;%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Aimport java.lang.reflect.Field;%0Aimport java.net.URL;%0Aimport java.util.List;%0A%0Apublic class TestInterpreterDataReader %7B%0A%09@Test%0A%09public void test() throws NoSuchFieldException, IllegalAccessException %7B%0A%09%09final ClassLoader loader = Thread.currentThread().getContextClassLoader();%0A%09%09// pay attention to the path where the InterpDataReaderTest.interp is stored.%0A%09%09final URL stuff = loader.getResource(%22org/antlr/v4/test/runtime/InterpDataReaderTest.interp%22);%0A%09%09InterpreterDataReader.InterpreterData interpreterData = InterpreterDataReader.parseFile(stuff.getPath());%0A%09%09Field tokenLiteralNames = interpreterData.getClass().getDeclaredField(%22token literal names%22);%0A%09%09Field tokenSymbolicNames = interpreterData.getClass().getDeclaredField(%22token symbolic names%22);%0A%09%09Field ruleNames = interpreterData.getClass().getDeclaredField(%22ruleNames%22);%0A%09%09Field channels = interpreterData.getClass().getDeclaredField(%22channels%22);%0A%09%09Field modes = interpreterData.getClass().getDeclaredField(%22modes%22);%0A%09%09ruleNames.setAccessible(true);%0A%09%09channels.setAccessible(true);%0A%09%09modes.setAccessible(true);%0A%09%09List%3CString%3E tokenLiteralList = (List%3CString%3E) tokenLiteralNames.get(interpreterData);%0A%09%09List%3CString%3E tokenSymbolicList = (List%3CString%3E) tokenSymbolicNames.get(interpreterData);%0A%09%09List%3CString%3E ruleNamesList = (List%3CString%3E) ruleNames.get(interpreterData);%0A%09%09List%3CString%3E channelsList = (List%3CString%3E) channels.get(interpreterData);%0A%09%09List%3CString%3E modesList = (List%3CString%3E) modes.get(interpreterData);%0A%0A%09%09Assert.assertEquals(12, tokenLiteralList.size());%0A%09%09Assert.assertEquals(12, tokenSymbolicList.size());%0A%09%09Assert.assertEquals(11,ruleNamesList.size());%0A%09%09Assert.assertEquals(2,channelsList.size());%0A%09%09Assert.assertEquals(1,modesList.size());%0A%09%7D%0A%7D%0A

add TestSuite for InterpreterDataReader.java