@Test public void version_is_not_mandatory() { try { createParser("a string\n").parse(); } catch (Exception e) { fail("Should not get an exception here"); } }
void parse() throws IOException, DefParserException { root = new InnerCNode(name); normalizedDefinition = new NormalizedDefinition(); String s; List<String> originalInput = new ArrayList<>(); while ((s = reader.readLine()) != null) { originalInput.add(s); } reader.close(); parseLines(root, originalInput, normalizedDefinition); root.setMd5(normalizedDefinition.generateMd5Sum()); }
DefParser { void parse() throws IOException, DefParserException { root = new InnerCNode(name); normalizedDefinition = new NormalizedDefinition(); String s; List<String> originalInput = new ArrayList<>(); while ((s = reader.readLine()) != null) { originalInput.add(s); } reader.close(); parseLines(root, originalInput, normalizedDefinition); root.setMd5(normalizedDefinition.generateMd5Sum()); } }
DefParser { void parse() throws IOException, DefParserException { root = new InnerCNode(name); normalizedDefinition = new NormalizedDefinition(); String s; List<String> originalInput = new ArrayList<>(); while ((s = reader.readLine()) != null) { originalInput.add(s); } reader.close(); parseLines(root, originalInput, normalizedDefinition); root.setMd5(normalizedDefinition.generateMd5Sum()); } DefParser(String name, Reader defReader); }
DefParser { void parse() throws IOException, DefParserException { root = new InnerCNode(name); normalizedDefinition = new NormalizedDefinition(); String s; List<String> originalInput = new ArrayList<>(); while ((s = reader.readLine()) != null) { originalInput.add(s); } reader.close(); parseLines(root, originalInput, normalizedDefinition); root.setMd5(normalizedDefinition.generateMd5Sum()); } DefParser(String name, Reader defReader); InnerCNode getTree(); NormalizedDefinition getNormalizedDefinition(); static void dumpTree(CNode root, String indent); }
DefParser { void parse() throws IOException, DefParserException { root = new InnerCNode(name); normalizedDefinition = new NormalizedDefinition(); String s; List<String> originalInput = new ArrayList<>(); while ((s = reader.readLine()) != null) { originalInput.add(s); } reader.close(); parseLines(root, originalInput, normalizedDefinition); root.setMd5(normalizedDefinition.generateMd5Sum()); } DefParser(String name, Reader defReader); InnerCNode getTree(); NormalizedDefinition getNormalizedDefinition(); static void dumpTree(CNode root, String indent); static final String DEFAULT_PACKAGE_PREFIX; static final Pattern versionPattern; static final Pattern namespacePattern; static final Pattern packagePattern; }