if (token < struct.size()) { boolean first = true; while (struct.tokens[token] != null && struct.tokens[token].getLine() == lineNr) { if (!first) System.out.println(); jplag.Token tok = struct.tokens[token]; System.out.print(TextToken.type2string(tok.type) + " (" + tok.getLine() + "," + tok.getColumn() + "," + tok.getLength() + ")\t"); first = false; token++;
((i<javatoken.numberOfTokens()) && ((aInt==-2) || (bInt==-2))); i++) { String str = javatoken.type2string(i);
public final void addToken(Token token) { ensureCapacity(anzahl + 1); if (anzahl > 0 && tokens[anzahl - 1].file.equals(token.file)) token.file = tokens[anzahl - 1].file; // To save memory ... if ((anzahl > 0) && (token.getLine() < tokens[anzahl - 1].getLine()) && (token.file.equals(tokens[anzahl - 1].file))) token.setLine(tokens[anzahl - 1].getLine()); // just to make sure tokens[anzahl++] = token; if (token.type == FILE_END) files++; }
+ (j == 0 ? "right" : "left") + "\"></A>" + (j == 1 ? "</div>" : "") + "<B>"; if (text[y][start.getLine() - 1].endsWith("</FONT>")) text[y][start.getLine() - 1] += hilf; else text[y][start.getLine() - 1] = hilf + text[y][start.getLine() - 1]; h = (start.getLine() - 4 < 0 ? 0 : start.getLine() - 4); text[y][h] = "<A NAME=\"" + x + "\"></A>" + text[y][h]; if (start.getLine() != ende.getLine() && // if match is only one line text[y][ende.getLine() - 1].startsWith("<FONT ")) text[y][ende.getLine() - 1] = "</B></FONT>" + text[y][ende.getLine() - 1]; else text[y][ende.getLine() - 1] += "</B></FONT>"; hilf = ("<font color=\"#C0C0C0\"><EM>"); if (text[y][start.getLine() - 1].endsWith("<font color=\"#000000\">")) text[y][start.getLine() - 1] += hilf; else text[y][start.getLine() - 1] = hilf + text[y][start.getLine() - 1]; if (start.getLine() != ende.getLine() && // match is only one line text[y][ende.getLine() - 1].startsWith("<font color=\"#C0C0C0\">")) text[y][ende.getLine() - 1] = "</EM><font color=\"#000000\">" + text[y][ende.getLine() - 1]; else text[y][ende.getLine() - 1] += "</EM><font color=\"#000000\">";
f.print(new String(startA.file.getBytes())); if (program.get_language().usesIndex()) f.print("("+startA.getIndex()+"-"+endeA.getIndex()+")"); else f.print("("+startA.getLine()+"-"+endeA.getLine()+")"); f.print("<TD><A HREF=\"javascript:ZweiFrames('match"+ matchnr+"-0.html#"+i+"',2,'match"+ f.print(startB.file); if (program.get_language().usesIndex()) f.print("("+startB.getIndex()+"-"+endeB.getIndex()); else f.print("("+startB.getLine()+"-"+endeB.getLine()); f.println(")</A><TD ALIGN=center>"+"<FONT COLOR=\""+ color(match.length)+"\">"+match.length+"</FONT>");
public void addEnd(int type, org.antlr.v4.runtime.Token tok) { struct.addToken(new Python3Token(type, (currentFile == null ? "null" : currentFile), tok.getLine(), struct.tokens[struct.size()-1].getColumn() + 1,0)); } }
public String toString() { return type2string(type); }
public final int diffType(String file, int line, int sub) { Structure struct = (sub==0 ? subA:subB).struct; int index = 0; for (; index < struct.size(); index++) if (struct.tokens[index].file.equals(file) && struct.tokens[index].getLine() == line) break; if (index == struct.size()) return 0; while (index < struct.size() && struct.tokens[index].getLine() == line && struct.tokens[index].file.equals(file)) { int j = 0; for (; j < size(); j++) if (matches[j].contains(index, sub)) break; if (j == size()) return 2; index++; } return 1; }
if (token < struct.size()) { boolean first = true; while (struct.tokens[token] != null && struct.tokens[token].getLine() == lineNr) { if (!first) System.out.println(); jplag.Token tok = struct.tokens[token]; System.out.print(CSharpToken.type2string(tok.type) + " (" + tok.getLine() + "," + tok.getColumn() + "," + tok.getLength() + ")\t"); first = false; token++;
if (token < struct.size()) { boolean first = true; while (struct.tokens[token] != null && struct.tokens[token].getLine() == lineNr) { if (!first) System.out.println();
+ (j == 0 ? "right" : "left") + "\"></A>" + (j == 1 ? "</div>" : "") + "<B>"; markupList.put(new MarkupText(fileIndex, start.getLine() - 1, start.getColumn() - 1, tmp, true), null); .put(new MarkupText(fileIndex, end.getLine() - 1, end.getColumn() + end.getLength() - 1, "</B></FONT>", false), null); int linkLine = (start.getLine() - 4 < 0 ? 0 : start.getLine() - 4); markupList.put(new MarkupText(fileIndex, linkLine, 0, "<A NAME=\"" + x + "\"></A>", false), null); String tmp = "<font color=\"#C0C0C0\"><EM>"; markupList.put(new MarkupText(fileIndex, start.getLine() - 1, start.getColumn() - 1, tmp, false), null); markupList.put(new MarkupText(fileIndex, end.getLine() - 1, end.getColumn() + end.getLength() - 1, "</EM></font>", true), null);
boolean first = true; while (struct.tokens[token] != null && struct.tokens[token].getLine() == lineNr) { if (!first) System.out.println();
if (token < struct.size()) { boolean first = true; while (struct.tokens[token] != null && struct.tokens[token].getLine() == lineNr) { if (!first) { System.out.println();
boolean first = true; while (struct.tokens[token] != null && struct.tokens[token].getLine() == lineNr) { if (!first) { System.out.println();
public jplag.Structure filter(jplag.Structure struct) { if (struct==null) return null; jplag.Structure res = new jplag.Structure(); for (int i=0; i<struct.size(); i++) { jplag.Token oldToken = struct.tokens[i]; if (table[oldToken.type]!=-1) res.addToken(new jplag.javax.JavaToken(table[oldToken.type], oldToken.file, oldToken.getLine())); } return res; } }