public function parse() {
        $p = 0;
        do {
            $p = $this->scanner->position();
            $this->consumeData();

            // FIXME: Add infinite loop protection.
        } while ($this->carryOn);
    }
public function parse() {
        $p = 0;
        do {
            $p = $this->scanner->position();
            $this->consumeData();

            // FIXME: Add infinite loop protection.
        } while ($this->carryOn);
    }
public function parse ( ) { $ p = 0 ; do { $ p = $ this -> scanner -> position ( ) ; $ this -> consumeData ( ) ; // FIXME: Add infinite loop protection. } while ( $ this -> carryOn ) ; }
Begin parsing.

This will begin scanning the document, tokenizing as it goes.
Tokens are emitted into the event handler.

Tokenizing will continue until the document is completely
read. Errors are emitted into the event handler, but
the parser will attempt to continue parsing until the
entire input stream is read.
Begin parsing .