<?php
/**
 *
 */
 
error_reporting( E_ALL | E_STRICT );

$baseDir = realpath( dirname( __FILE__ ) . '/..' );

define( 'PHPFIT_FIXTURE_DIR', $baseDir );

$incPath = get_include_path() . ':' . realpath( $baseDir . '/..' );
set_include_path( $incPath );
     
include_once '../Parser.php';
include_once '../Table.php';


$files   = array();
//$files[] = $baseDir . '/data/music01.html';
$files[] = $baseDir . '/data/division.html';

$parser =   new PHPFIT_Parser();
$table  =   new PHPFIT_Table();

foreach( $files as $file ) {
    $parser->parse( file_get_contents( $file ) );

    echo "File:  $file \n";

    $table->doTables( $parser );

    echo "HTML\n-----------------------------------\n";
    echo $parser->serialize();
    echo "\n-----------------------------------\n";
}
