public static function parseSource($source, $filename = NULL) {
    static $tokenizer, $parser = NULL;
    if (!isset($parser)) {
      $tokenizer = new Tokenizer();
      $parser = new self();
    }
    $tokens = $tokenizer->getAll($source, $filename);
    $parser->filename = $filename;
    return $parser->buildTree(new TokenIterator($tokens));
  }