Code

Fixed layout, a little bit
[gosa.git] / include / sieve / class_My_Parser.inc
index 6d796cd8ae23d84fe9a22f31a53574ca8d0bbad4..816950e996427df90eb7ddabfcb58826dc818b81 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-
+define("SIEVE_INDENT_TAB","  ");
 
 /* This class is inherited from the original 'Parser'
  *  class written by Heiko Hund
@@ -10,7 +10,15 @@ class My_Parser extends Parser
 
        function execute()
        {
-               return($this->dumpParseTree());
+               $ret = $this->dumpParseTree();
+               return($ret);
+       }
+       
+
+       /* Check if there are errors, collect them and return them */
+       function check()
+       {
+               return($this->tree_->check());
        }
        
 
@@ -35,7 +43,13 @@ class My_Parser extends Parser
         return $this->status_;
        }
 
-               
+       
+       function get_sieve_script()
+       {
+               return($this->tree_->get_sieve_script());
+       }               
+
+       
        function save_object()
        {
                $this->tree_->save_object();
@@ -56,5 +70,11 @@ class My_Parser extends Parser
                }
                return strval($token);
        }
+
+
+       function dumpParseTree()
+       {
+               return $this->tree_->execute();
+       }
 }
 ?>