1 package jsdsi;
2
3 import java.util.Iterator;
4
5 import jsdsi.sexp.SexpList;
6 import jsdsi.sexp.SexpParseException;
7 import jsdsi.sexp.SexpUtil;
8
9 /***
10 * An operation instruction for a verifier.
11 *
12 * @author Sameer Ajmani
13 * @author Sean Radford
14 * @version $Revision: 1.2.2.1 $ $Date: 2005/11/08 03:12:52 $
15 */
16 public abstract class Op extends Obj implements Element {
17
18 private static final long serialVersionUID = 3639502914529665105L;
19
20 static Op parseOp(SexpList l) throws SexpParseException {
21 SexpUtil.checkType(l, "do");
22 Iterator obody = SexpUtil.getBody(l);
23 String opcode = SexpUtil.getNextString(obody, "opcode");
24 if (opcode.equals("hash")) {
25 return HashOp.parseHashOp(obody);
26 }
27 throw new SexpParseException("unrecognized opcode: " + opcode);
28 }
29 }
This page was automatically generated by Maven