#!/usr/bin/perl -w

BEGIN { $|++; }

use lib 'lib';
use Graph::Simple::Parser;

my $parser = Graph::Simple::Parser->new( debug => 0 );

my $file = shift;
my $id = shift || '';

my $graph = $parser->from_file( $file );

die ($parser->error()) unless defined $graph;

$graph->id($id);
$graph->layout();

die ($parser->error()) if $graph->error();

print $graph->as_ascii();

