/*
(c) Copyright 2008, 2009 Hewlett-Packard Development Company, LP
All rights reserved.
$Id$
*/
/*
(c) Copyright 2008 Hewlett-Packard Development Company, LP
All rights reserved.
$Id$
*/
package rules;
import java.io.*;
import com.hp.jena.rules.ast.RuleSet;
import com.hp.jena3.rules.grammar.*;
public class parse
{
public static void main( String args[] ) throws ParseException
{
InputStream in = args.length == 0 ? System.in : inFromFile( args[0] );
JenaRules parser = new JenaRules( in );
RuleSet rs = parser.ruleset();
rs.prettyPrint( System.out );
}
static InputStream inFromFile( String fileName )
{
try { return new FileInputStream( fileName ); }
catch (FileNotFoundException e) { throw new RuntimeException( e ); }
}
}
/*
(c) Copyright 2008, 2009 Hewlett-Packard Development Company, LP
All rights reserved.
$Id$
*/