index b0ef7ea7654f2a45b273765176e2ab807d934d99..912422360f1cedd5cc95741e3c2ff4375ed6fa2d 100644 (file)
*/
class My_Parser extends Parser
{
+ var $parent = NULL;
+
+ function My_Parser($parent)
+ {
+ $this->parent = $parent;
+ }
function execute()
{
}
+ /* Check if there are errors, collect them and return them */
+ function check()
+ {
+ return($this->tree_->check());
+ }
+
+
/* Initiate parser, but use some other
* classes, that are rewritten.
*/
{
$this->status_text = "incomplete";
$this->script_ = $script;
- $this->tree_ = new My_Tree(@Scanner::scriptStart());
+ $this->tree_ = new My_Tree(@Scanner::scriptStart(),$this);
$this->tree_->setDumpFunc(array(&$this, 'dumpToken_'));
$this->scanner_ = new Scanner($this->script_);
$this->scanner_->setCommentFunc(array($this, 'comment_'));
}
return strval($token);
}
+
+
+ function dumpParseTree()
+ {
+ return $this->tree_->execute();
+ }
}
?>