debug("readTerm()/" + _level + " - " + e.fun.getName() + "[" + arity + "]"); if (isDebugging()) debug(" [" + i + "] - " + val); debug(" [" + i + "] - " + e.topSyms[i].length); debug(" [" + i + "] - recurse"); argSym.terms[val] = readTerm(argSym); debug("--"); for (final ATerm arg : args) debug(" + " + arg.getClass()); debug(e.fun + " / " + args); for (final ATerm arg : args) debug("" + arg);
private AFun readSymbol() throws IOException { final String s = _reader.readString(); final int arity = _reader.readInt(); final int quoted = _reader.readInt(); if (isDebugging()) debug(s + " / " + arity + " / " + quoted); return _factory.makeAFun(s, arity, quoted != 0); }
public ATerm readFromBinaryFile(final boolean headerAlreadyRead) throws ParseError, IOException { if (!headerAlreadyRead && !isBinaryATerm(_reader)) throw new ParseError("Input is not a BAF file"); final int val = _reader.readInt(); if (val != BAF_VERSION) throw new ParseError("Wrong BAF version (wanted " + BAF_VERSION + ", got " + val + "), giving up"); _nrUniqueSymbols = _reader.readInt(); final int nrUniqueTerms = _reader.readInt(); if (isDebugging()) { debug("" + _nrUniqueSymbols + " unique symbols"); debug("" + nrUniqueTerms + " unique terms"); } _symbols = new SymEntry[_nrUniqueSymbols]; readAllSymbols(); final int i = _reader.readInt(); return readTerm(_symbols[i]); }