public void parse()

in doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java [188:230]


    public void parse(Reader source, Sink sink, String reference) throws ParseException {
        init();

        try {
            StringWriter contentWriter = new StringWriter();
            IOUtils.copy(source, contentWriter);
            sourceContent = contentWriter.toString();
        } catch (IOException e) {
            throw new AptParseException(e);
        }

        try {
            this.source = new AptReaderSource(new StringReader(sourceContent), reference);

            this.sink = sink;

            blockFileName = null;

            blockLineNumber = -1;

            // Lookahead line.
            nextLine();

            // Lookahead block.
            nextBlock(/*first*/ true);

            // traverse comments
            while ((block != null) && (block.getType() == COMMENT_BLOCK)) {
                block.traverse();
                nextBlock(/*first*/ true);
            }

            traverseHead();

            traverseBody();
        } catch (AptParseException ape) {
            // TODO handle column number
            throw new AptParseException(null, ape, getSourceName(), getSourceLineNumber(), -1);
        } finally {
            setSecondParsing(false);
            init();
        }
    }