    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class jkp.KifParser

    java.lang.Object
       |
       +----jkp.KifParser

public class KifParser
extends Object

This class is an interface to the the KIF parser (YYparse) generated. We use synchronized method to avoid more than one thread to call YYparse at the same time. @author Xiaocheng LUAN

##

_result

##

KifParser()

##

parse(String)
  This is the method you should call when you want to parse a kif string.
parse(InputStream)
printResult()
  For debug only.

##

_result

      public static KifObj _result

##

KifParser

      public KifParser()

##

parse

      public static synchronized KifObj parse(String text) throws ParseException

  This is the method you should call when you want to parse a kif string. This method is safe when called simutaneously in more than one thread. But in actural fact, these calls are serialized.
  Parameters:
    text - the KIF language string to parse.
  Returns:
    the Kif object obtained in the parsing.

    Note: at most one sentence at a time.

printResult

      public static void printResult()

  For debug only. Use this method with caution. when called, if another thread calling "parse", the printed result by this method may not correct.

parse

      public static synchronized KifObj parse(InputStream inStream) throws ParseException

    All Packages  Class Hierarchy  This Package  Previous  Next  Index