Package rules

Source Code of rules.parse

/*
  (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$
*/ 
TOP

Related Classes of rules.parse

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.