public PennTree readTree() throws IOException {
		String line = super.readLine();
		if (line == null) {
			return null;
		} else {
			assert !line.isEmpty();
			Deque<PennTree> stack = new LinkedList<PennTree>();
			stack.addLast(new PennTree(null));
			int depth = 0;
			do {
				String[] tokens = PATTERN.split(line);
				for (int i = 0; i < tokens.length; i++) {
					String token = tokens[i];
					if (!token.isEmpty()) {
						PennTree last = stack.getLast();
						if (token.equals("(")) {
							PennTree next = new PennTree(null);
							last.addSubtree(next);
							depth++;
							stack.addLast(next);
						} else if (token.equals(")")) {
							stack.removeLast();
							depth--;
							if (depth == 0) {
								assert i == tokens.length - 1;
								return last;
							}
						} else {
							if (last.getLabel() == null) {
								last.setLabel(token);
							} else {
								last.addSubtree(new PennTree(token));
							}
						}
					}
				}
			} while ((line = super.readLine()) != null && !line.isEmpty());
			return stack.getFirst();
		}
	}