<td class="code">
<code>
<?php
// <tt>

// $Date: 2004/01/13 12:45:15 $
// $Revision: 1.7 $
// $Author: jcrocholl $

function indent($extra = 0) {
    global
$indent_chars, $indent_level;
    for (
$i = $indent_level*$indent_chars + $extra; $i > 0; $i--)
        
$result .= '&nbsp;';
    return
$result;
}

function
length($text) {
    
$text = preg_replace('/\<.+?\>/', '', $text);
    
$text = preg_replace('/\&nbsp;/', ' ', $text);
    return
strlen($text);
}

function
fill($text, $length) {
    while (
length($text) < $length) $text .= '&nbsp;';
    return
$text;
}

function
newline() {
    return
"<br/>\n";
}

function
span($class, $text) {
    
preg_match('/^(\s*)(.+?)(\s*)$/', $text, $matches);
    if (!
$matches[2]) return "$matches[1]$matches[3]";
    return
"$matches[1]<span class=\"$class\">$matches[2]</span>$matches[3]";
}

function
warning($filename, $line_number, $line, $text) {
    global
$warnings;
    
$warnings .= "$filename:$line_number: $text<br/>\n";
}

function
myprint($line) {
    print
$line;
}

require(
'parser.php');
parse($filename);

// </tt>
?>
</code>
</td>