net.sourceforge.czt.parser.z
Class ParseUtils

java.lang.Object
  extended by net.sourceforge.czt.parser.z.ParseUtils
All Implemented Interfaces:
net.sourceforge.czt.session.Command

public class ParseUtils
extends java.lang.Object
implements net.sourceforge.czt.session.Command

Utilities for parsing Z specifications.

Author:
Petra Malik, Tim Miller

Constructor Summary
ParseUtils()
           
 
Method Summary
 boolean compute(java.lang.String name, net.sourceforge.czt.session.SectionManager manager)
           
static net.sourceforge.czt.session.Command getCommand()
          Get a Command object for use in SectionManager
static net.sourceforge.czt.session.Markup getMarkup(java.lang.String filename)
          Determine the markup of a file.
static net.sourceforge.czt.base.ast.Term parse(net.sourceforge.czt.session.Source source, net.sourceforge.czt.session.SectionInfo sectInfo)
           
static net.sourceforge.czt.base.ast.Term parse(net.sourceforge.czt.session.Source source, net.sourceforge.czt.session.SectionInfo sectInfo, java.util.Properties properties)
           
static net.sourceforge.czt.z.ast.Expr parseExpr(net.sourceforge.czt.session.Source src, java.lang.String section, net.sourceforge.czt.session.SectionManager sectman)
          Parse a Source string/file as a Z Expression.
static net.sourceforge.czt.z.ast.Pred parsePred(net.sourceforge.czt.session.Source src, java.lang.String section, net.sourceforge.czt.session.SectionManager sectman)
          Parse a Source string/file as a Z Predicate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParseUtils

public ParseUtils()
Method Detail

parse

public static net.sourceforge.czt.base.ast.Term parse(net.sourceforge.czt.session.Source source,
                                                      net.sourceforge.czt.session.SectionInfo sectInfo,
                                                      java.util.Properties properties)
                                               throws ParseException,
                                                      java.io.IOException,
                                                      net.sourceforge.czt.base.util.UnmarshalException
Throws:
ParseException
java.io.IOException
net.sourceforge.czt.base.util.UnmarshalException

parse

public static net.sourceforge.czt.base.ast.Term parse(net.sourceforge.czt.session.Source source,
                                                      net.sourceforge.czt.session.SectionInfo sectInfo)
                                               throws ParseException,
                                                      java.io.IOException,
                                                      net.sourceforge.czt.base.util.UnmarshalException
Throws:
ParseException
java.io.IOException
net.sourceforge.czt.base.util.UnmarshalException

parsePred

public static net.sourceforge.czt.z.ast.Pred parsePred(net.sourceforge.czt.session.Source src,
                                                       java.lang.String section,
                                                       net.sourceforge.czt.session.SectionManager sectman)
                                                throws java.io.IOException,
                                                       net.sourceforge.czt.session.CommandException
Parse a Source string/file as a Z Predicate.

Parameters:
src - The String or File etc. to be parsed.
section - The Z section name (in Unicode) to parse within (null=standard_toolkit).
sectman - A section manager to use. Must be non-null.
Throws:
java.io.IOException - if there are errors reading file/url inputs
net.sourceforge.czt.session.CommandException - if the predicate cannot be parsed.

parseExpr

public static net.sourceforge.czt.z.ast.Expr parseExpr(net.sourceforge.czt.session.Source src,
                                                       java.lang.String section,
                                                       net.sourceforge.czt.session.SectionManager sectman)
                                                throws java.io.IOException,
                                                       net.sourceforge.czt.session.CommandException
Parse a Source string/file as a Z Expression.

Parameters:
src - The String or File etc. to be parsed.
section - The Z section to parse within (null=standard_toolkit).
sectman - A section manager to use. Must be non-null.
Throws:
java.io.IOException - if there are errors reading file/url inputs
net.sourceforge.czt.session.CommandException - if the expression cannot be parsed.

getMarkup

public static net.sourceforge.czt.session.Markup getMarkup(java.lang.String filename)
Determine the markup of a file.


getCommand

public static net.sourceforge.czt.session.Command getCommand()
Get a Command object for use in SectionManager

Returns:
A command for parsing specifications.

compute

public boolean compute(java.lang.String name,
                       net.sourceforge.czt.session.SectionManager manager)
                throws net.sourceforge.czt.session.CommandException
Specified by:
compute in interface net.sourceforge.czt.session.Command
Throws:
net.sourceforge.czt.session.CommandException


Copyright © 2003-2007 Community Z Tools Project. All Rights Reserved.