00001 /*========================================================================== 00002 * Copyright (c) 2001 Carnegie Mellon University. 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 #ifndef _INQUERYOPPARSER_HPP 00013 #define _INQUERYOPPARSER_HPP 00014 #define NESTING_LIMIT 20 00015 #include "Parser.hpp" 00016 #include "TextHandler.hpp" 00017 00018 // Source code in InQueryOpParser.lex 00019 00020 class InQueryOpParser : public Parser { 00021 00022 public: 00023 static const string identifier; 00024 00025 InQueryOpParser(); 00026 00028 void parseFile (const string &filename); 00029 00031 void parseBuffer (char * buf, int len); 00032 00035 long fileTell() const; 00037 void doParse(); 00039 void finishing_nesting_qnote(int top); 00041 void finishing_prox_qnote(int top); 00043 void parseNestingOp(char *op); 00045 void parseProxOp(char *op, char *size); 00047 void parsePassageOp(char *op, char *size); 00049 void parseSynOp(char *op); 00051 void parsePropOp(char *op); 00053 void parseTermOp(char *op); 00055 void parseQryNode(int tok); 00057 void parseProxNode(int tok); 00058 00059 private: 00060 00062 int state; 00063 }; 00064 00065 #endif