00001 /*========================================================================== 00002 * Copyright (c) 2002 University of Massachusetts. All Rights Reserved. 00003 * 00004 * Use of the Lemur Toolkit for Language Modeling and Information Retrieval 00005 * is subject to the terms of the software license set forth in the LICENSE 00006 * file included with this software, and also available at 00007 * http://www.cs.cmu.edu/~lemur/license.html 00008 * 00009 *========================================================================== 00010 */ 00011 00012 00013 #ifndef _INQARABICPARSER_HPP 00014 #define _INQARABICPARSER_HPP 00015 #define NESTING_LIMIT 20 00016 #include "Parser.hpp" 00017 #include "TextHandler.hpp" 00018 00019 class InqArabicParser : public Parser { 00020 00021 public: 00022 InqArabicParser(); 00023 00025 void parseFile (char * filename); 00026 00028 void parseBuffer (char * buf, int len); 00029 00032 long fileTell(); 00034 void doParse(); 00036 void finishing_nesting_qnote(int top); 00038 void finishing_prox_qnote(int top); 00040 void parseNestingOp(char *op); 00042 void parseProxOp(char *op, char *size); 00044 void parsePassageOp(char *op, char *size); 00046 void parseSynOp(char *op); 00048 void parseTermOp(char *op); 00050 void parseQryNode(int tok); 00052 void parseProxNode(int tok); 00053 00054 private: 00055 00057 int state; 00058 }; 00059 00060 #endif