Class jkp.KifParser
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

Variable Index

 o _result

Constructor Index

 o KifParser()

Method Index

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

Variables

 o _result
  public static KifObj _result

Constructors

 o KifParser
  public KifParser()

Methods

 o 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.

 o 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.
 o parse
  public static synchronized KifObj parse(InputStream inStream) throws ParseException

All Packages  Class Hierarchy  This Package  Previous  Next  Index