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

// $Date: 2004/01/19 21:36:53 $
// $Revision: 1.8 $
// $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);
    
$trimmed = $matches[2];
    if (!
$trimmed) return "$matches[1]$matches[3]";
    
$trimmed = htmlspecialchars($matches[2]);
    
$trimmed = str_replace('&amp;nbsp;', '&nbsp;', $trimmed);
    return 
"$matches[1]<span class=\"$class\">$trimmed</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>