private static void parseUnit(UnitTree tree, SourceInputStream in)
			throws IOException, ParseException {
		int ch = in.read();
		List<Tree> children = tree.getChildren();
		while (ch != -1) {
			in.backup();
			switch (ch) {
				case '+':
				case '-':
					children.add(parseInc(in));
					break;
				case '<':
				case '>':
					children.add(parseMove(in));
					break;
				case ',':
					children.add(new GetCharTree(in.position()));
					in.read();
					break;
				case '.':
					children.add(new PutCharTree(in.position()));
					in.read();
					break;
				case '[':
					children.add(parseLoop(in));
					break;
				case ']':
					throw new ParseException(" ] without matching [", in.position());
				default:
					in.read();
			}
			ch = in.read();
		}
	}