summaryrefslogtreecommitdiff
path: root/buildscripts/PhpDocumentor/scripts/tokenizer_test.php
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2011-11-19 11:33:31 +0000
committerctrlaltca@gmail.com <>2011-11-19 11:33:31 +0000
commit98dbe6f0d2edfff3a1f5785504504b4a6e5dd4eb (patch)
tree89f19120abb170cb37bb512c8c9535eb2b451da8 /buildscripts/PhpDocumentor/scripts/tokenizer_test.php
parent1f09b786730956d01c48a82272617a0f8b2597f0 (diff)
updating phpDocumentor, part 2: add new version
Diffstat (limited to 'buildscripts/PhpDocumentor/scripts/tokenizer_test.php')
-rw-r--r--buildscripts/PhpDocumentor/scripts/tokenizer_test.php118
1 files changed, 59 insertions, 59 deletions
diff --git a/buildscripts/PhpDocumentor/scripts/tokenizer_test.php b/buildscripts/PhpDocumentor/scripts/tokenizer_test.php
index 2b5ca25e..e7c5748a 100644
--- a/buildscripts/PhpDocumentor/scripts/tokenizer_test.php
+++ b/buildscripts/PhpDocumentor/scripts/tokenizer_test.php
@@ -1,59 +1,59 @@
-<?php
-/**
- * @package tests
- */
-/**
-$fp = fopen("../phpDocumentor/Converter.inc","r");
-$file = fread($fp,filesize("../phpDocumentor/Converter.inc"));
-fclose($fp);
-*/
-$file = "
-<?php
- function &newSmarty()
- {
- if (!isset(\$this->package_index))
- foreach(\$this->all_packages as \$key => \$val)
- {
- if (isset(\$this->pkg_elements[\$key]))
- {
- if (!isset(\$start)) \$start = \$key;
- \$this->package_index[] = array('link' => \"li_\$key.html\", 'title' => \$key);
- }
- }
- \$templ = new Smarty;
- \$templ->template_dir = \$this->smarty_dir . PATH_DELIMITER . 'templates';
- \$templ->compile_dir = \$this->smarty_dir . PATH_DELIMITER . 'templates_c';
- \$templ->config_dir = \$this->smarty_dir . PATH_DELIMITER . 'configs';
- \$templ->assign(\"packageindex\",\$this->package_index);
- \$templ->assign(\"phpdocversion\",PHPDOCUMENTOR_VER);
- \$templ->assign(\"phpdocwebsite\",PHPDOCUMENTOR_WEBSITE);
- \$templ->assign(\"package\",\$this->package);
- \$templ->assign(\"subdir\",'');
- return \$templ;
- }
-?>
-";
-$tokens = token_get_all($file);
-
-$nl_check = array(T_WHITESPACE,T_ENCAPSED_AND_WHITESPACE,T_COMMENT,T_DOC_COMMENT,T_OPEN_TAG,T_CLOSE_TAG,T_INLINE_HTML);
-print '<pre>';
-$line = 0;
-foreach($tokens as $key => $val)
-{
- if (is_array($val))
- {
- // seeing if we can get line numbers out of the beast
- if (in_array($val[0],$nl_check))
- {
- $line+=substr_count($val[1],"\n");
- }
- echo token_name($val[0])." => ".htmlentities($val[1])."\n";
- }
- else
- {
- echo "*** $val\n";
- }
-}
-echo "$line\n";
-print '</pre>';
-?>
+<?php
+/**
+ * @package tests
+ */
+/**
+$fp = fopen("../phpDocumentor/Converter.inc","r");
+$file = fread($fp,filesize("../phpDocumentor/Converter.inc"));
+fclose($fp);
+*/
+$file = "
+<?php
+ function &newSmarty()
+ {
+ if (!isset(\$this->package_index))
+ foreach(\$this->all_packages as \$key => \$val)
+ {
+ if (isset(\$this->pkg_elements[\$key]))
+ {
+ if (!isset(\$start)) \$start = \$key;
+ \$this->package_index[] = array('link' => \"li_\$key.html\", 'title' => \$key);
+ }
+ }
+ \$templ = new Smarty;
+ \$templ->template_dir = \$this->smarty_dir . PATH_DELIMITER . 'templates';
+ \$templ->compile_dir = \$this->smarty_dir . PATH_DELIMITER . 'templates_c';
+ \$templ->config_dir = \$this->smarty_dir . PATH_DELIMITER . 'configs';
+ \$templ->assign(\"packageindex\",\$this->package_index);
+ \$templ->assign(\"phpdocversion\",PHPDOCUMENTOR_VER);
+ \$templ->assign(\"phpdocwebsite\",PHPDOCUMENTOR_WEBSITE);
+ \$templ->assign(\"package\",\$this->package);
+ \$templ->assign(\"subdir\",'');
+ return \$templ;
+ }
+?>
+";
+$tokens = token_get_all($file);
+
+$nl_check = array(T_WHITESPACE,T_ENCAPSED_AND_WHITESPACE,T_COMMENT,T_DOC_COMMENT,T_OPEN_TAG,T_CLOSE_TAG,T_INLINE_HTML);
+print '<pre>';
+$line = 0;
+foreach($tokens as $key => $val)
+{
+ if (is_array($val))
+ {
+ // seeing if we can get line numbers out of the beast
+ if (in_array($val[0],$nl_check))
+ {
+ $line+=substr_count($val[1],"\n");
+ }
+ echo token_name($val[0])." => ".htmlentities($val[1])."\n";
+ }
+ else
+ {
+ echo "*** $val\n";
+ }
+}
+echo "$line\n";
+print '</pre>';
+?>