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.lemurproject.org/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 static const string identifier; 00023 00024 InqArabicParser(); 00025 00027 void parseFile (const string &filename); 00028 00030 void parseBuffer (char * buf, int len); 00031 00034 long fileTell() const; 00036 void doParse(); 00038 void finishing_nesting_qnote(int top); 00040 void finishing_prox_qnote(int top); 00042 void parseNestingOp(char *op); 00044 void parseProxOp(char *op, char *size); 00046 void parsePassageOp(char *op, char *size); 00048 void parseSynOp(char *op); 00050 void parsePropOp(char *op); 00052 void parseTermOp(char *op); 00054 void parseQryNode(int tok); 00056 void parseProxNode(int tok); 00057 00058 private: 00059 00061 int state; 00062 }; 00063 00064 #endif