Public Member Functions | Public Attributes

CQueryParser Class Reference

#include <QueryParser.h>

Collaboration diagram for CQueryParser:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Public Attributes


Detailed Description

CQueryParser is a class fo the parse tree of the input query and its general properties. Rewritten (Tue, 17 May 2011 11:48:20 +0200 moo) to use C-style flex reentrant scanner.

Formerly descended from FlexLexer (abstract class of flex tool), so it should implement also flex parser's functionality (DDC uses YACC in thread-safe mode)


Constructor & Destructor Documentation

CQueryParser::CQueryParser ( const CConcHolder pHolder  ) 
CQueryParser::~CQueryParser (  )  [virtual]

default destructor

References CleanParser().

Here is the call graph for this function:


Member Function Documentation

void CQueryParser::CleanParser (  ) 

make this parse ready for the new call of CQueryParser::ParseQuery

References DeleteTree(), m_CurrDistances, m_CurrentNodeIndex, m_CurrSequenceObj, m_Filters, and m_Labels.

Referenced by ParseQuery(), and ~CQueryParser().

Here is the call graph for this function:

Here is the caller graph for this function:

bool CQueryParser::ParseQueryOperators ( const string &  OperatorName,
const string &  Arguments,
CDDCFilterWithBounds Filter 
)
bool CQueryParser::ParseSortAndFilterOperators ( string &  QueryStr  ) 

parse sort and filter operators from QueryStr (and delete these operators)

References m_BigramsUse, m_Filters, NoSort, ParseQueryOperators(), SortOperators, SortOperatorsCount, and Trim().

Referenced by ParseQuery().

Here is the call graph for this function:

Here is the caller graph for this function:

int CQueryParser::yyqlex ( void *  valp  ) 

wrapper for yywrap() [required]

wrapper for underlying flex scanner yylex() : do NOT declare this here: it's already declared in FlexLexer.h ! wrapper for yylex() as called from bison parser (valp is a YYSTYPE*)

References m_Labels, REGEX, SYMBOL, yyleng(), yylex, and yytext().

Referenced by yyqlex().

Here is the call graph for this function:

Here is the caller graph for this function:

const char* CQueryParser::yytext ( void   )  const [inline]

Referenced by yyqlex().

Here is the caller graph for this function:

int CQueryParser::yyleng ( void   )  const [inline]

Referenced by yyqlex().

Here is the caller graph for this function:

void CQueryParser::DeleteTree (  ) 

delete parse tree ( CQueryParser::m_pQueryTree )

References m_pQueryTree.

Referenced by CleanParser(), CConcHolder::GetAllHits(), and CConcHolder::GetOccurrences().

Here is the caller graph for this function:

bool CQueryParser::ParseQuery ( const char *  query_src  ) 
bool CQueryParser::Evaluate (  ) 

evaluate parse tree bottom-up

References CQueryNode::Evaluate(), and m_pQueryTree.

Referenced by CConcHolder::GetAllHits().

Here is the call graph for this function:

Here is the caller graph for this function:

int CQueryParser::GetNewNodeIndex (  ) 

References m_CurrentNodeIndex.

size_t CQueryParser::GetNodeIndicesCount (  )  const

References m_CurrentNodeIndex.

Referenced by CConcHolder::InitLessByRank().

Here is the caller graph for this function:


Member Data Documentation

the break collection name which should be used while querying

Referenced by CConcHolder::GenerateHitStrings(), CConcHolder::GetContext(), CConcHolder::GetContextJson(), ParseQuery(), and CConcHolder::SetHitType().

the index of text area where DDC should perform the input query

Referenced by CConcHolder::GetTextArea(), ParseQuery(), and CConcHolder::SetHitType().

filters and sort operators which should be applied to the resulted hit set

Referenced by CleanParser(), CConcHolder::GetAllHits(), CConcHolder::HasRankOrderOperator(), CConcHolder::HitsShouldBeSorted(), and ParseSortAndFilterOperators().

how many hits of the left and right context should be output

Referenced by CQueryParser(), CConcHolder::GenerateOneHitString(), CConcHolder::GenerateOneHitStringJson(), and ParseQuery().

a reference to the holder, for which this query is parsed

Referenced by CQueryParser(), ParseQuery(), and ParseQueryOperators().

list<string> CQueryParser::m_Labels

a special slot for YACC (which contains all string leaves of the parse tree)

Referenced by CleanParser(), and yyqlex().

a special slot for YACC (which contains the current queue of nodes inside a sequence operator )

Referenced by CleanParser().

a special slot for YACC (which contains the current queue of text distances between nodes inside a sequence operator )

Referenced by CleanParser().

if left is specified, then m_BigramsUse is bdLeftBigram, if right, then m_BigramsUse is bdRightBigram, otherwize bdDontUseBigrams

Referenced by CConcHolder::GetBigramsToOrder(), ParseQueryOperators(), and ParseSortAndFilterOperators().


The documentation for this class was generated from the following files: