Lines Matching refs:line

39     private static int parseImm(String line, String arg) {
41 throw new IllegalArgumentException("Unhandled instruction: " + line);
45 throw new IllegalArgumentException("Unhandled instruction: " + line);
51 * Convert a single line of "tcpdump -d" (human readable BPF program dump) {@code line} into
52 * APF instruction(s) and append them to {@code gen}. Here's an example line:
55 private static void convertLine(String line, ApfGenerator gen)
57 if (line.indexOf("(") != 0 || line.indexOf(")") != 4 || line.indexOf(" ") != 5) {
58 throw new IllegalArgumentException("Unhandled instruction: " + line);
60 int label = Integer.parseInt(line.substring(1, 4));
62 String opcode = line.substring(6, 10).trim();
63 String arg = line.substring(15, Math.min(32, line.length())).trim();
74 throw new IllegalArgumentException("Unhandled instruction: " + line);
81 throw new IllegalArgumentException("Unhandled instruction: " + line);
88 throw new IllegalArgumentException("Unhandled instruction: " + line);
90 gen.addLoadImmediate(dest, parseImm(line, arg));
95 throw new IllegalArgumentException("Unhandled instruction: " + line);
103 throw new IllegalArgumentException("Unhandled instruction: " + line);
146 throw new IllegalArgumentException("Unhandled instruction: " + line);
153 throw new IllegalArgumentException("Unhandled instruction: " + line);
179 int imm = parseImm(line, arg);
206 val = parseImm(line, arg);
208 int jt_offset = line.indexOf("jt");
209 int jf_offset = line.indexOf("jf");
210 String true_label = line.substring(jt_offset + 2, jf_offset).trim();
211 String false_label = line.substring(jf_offset + 2).trim();
301 throw new IllegalArgumentException("Unhandled instruction: " + line);
311 for (String line : bpf.split("\\n")) convertLine(line, gen);
321 String line = null;
324 while ((line = in.readLine()) != null) convertLine(line, gen);