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.cs.cmu.edu/~lemur/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 InQueryOpParser(); 00024 00026 void parseFile (char * filename); 00027 00029 void parseBuffer (char * buf, int len); 00030 00033 long fileTell(); 00035 void doParse(); 00037 void finishing_nesting_qnote(int top); 00039 void finishing_prox_qnote(int top); 00041 void parseNestingOp(char *op); 00043 void parseProxOp(char *op, char *size); 00045 void parsePassageOp(char *op, char *size); 00047 void parseSynOp(char *op); 00049 void parseTermOp(char *op); 00051 void parseQryNode(int tok); 00053 void parseProxNode(int tok); 00054 00055 private: 00056 00058 int state; 00059 }; 00060 00061 #endif