query_parser.y File Reference

PARSER. More...

#include <iostream>
#include <vector>
#include <cstdio>
#include <utility>
#include <list>
#include <math.h>
#include <sstream>
#include "streammanager.h"
#include "debug.h"
#include "expression.h"
#include "docexpression.h"
#include "commentexpression.h"
#include "emptyexpression.h"
#include "constexpression.h"
#include "stringconstexpression.h"
#include "numericconstexpression.h"
#include "sequenceexpression.h"
#include "forexpression.h"
#include "varstepexpression.h"
#include "varexpression.h"
#include "nodeconstructexpression.h"
#include "ifexpression.h"
#include "whereexpression.h"
#include "signoffexpression.h"
#include "operandexpression.h"
#include "condexpression.h"
#include "andcondexpression.h"
#include "orcondexpression.h"
#include "notcondexpression.h"
#include "existscondexpression.h"
#include "emptycondexpression.h"
#include "varstepcondexpression.h"
#include "condoperandexpression.h"
#include "truecondexpression.h"
#include "falsecondexpression.h"
#include "pathexpression.h"
#include "pathsteptagexpression.h"
#include "pathstepstarexpression.h"
#include "pathstepnodeexpression.h"
#include "pathsteptextexpression.h"
#include "aggregatefunctexpression.h"
#include "aggregatefunctsumexpression.h"
#include "aggregatefunctavgexpression.h"
#include "aggregatefunctminexpression.h"
#include "aggregatefunctmaxexpression.h"
#include "aggregatefunctcountexpression.h"
#include "aggregatefunctstddevsampexpression.h"
#include "aggregatefunctstddevpopexpression.h"
#include "aggregatefunctvarsampexpression.h"
#include "aggregatefunctvarpopexpression.h"
#include "aggregatefunctmedianexpression.h"
#include "roundingexpression.h"
#include "functabsexpression.h"
#include "functceilingexpression.h"
#include "functcoverexpression.h"
#include "functfloorexpression.h"
#include "functroundexpression.h"
#include "functroundhalftoevenexpression.h"
#include "functtruncateexpression.h"
#include "typeenums.h"
#include "parseexception.h"
#include "varname.h"
#include "miscfunctions.h"

Go to the source code of this file.

Functions

seq insertExp (new EmptyExpression())
XMLExpr free ((char *)$1)
 if (is_lop_aggfunct &&is_rop_string||is_rop_aggfunct &&is_lop_string||is_lop_rounding &&is_rop_string||is_rop_rounding &&is_lop_string||is_lop_string &&is_rop_numeric||is_rop_string &&is_lop_numeric)
addPathStep ($2)
int parse_query (DocExpression *_doc)
 Input (X)Query parsing.
Expressionmake_for_expression (var_list_type *var_list, Expression *sub_expression)
 Returns constructed for-clauses (with return-clause) from comma-separated short cutted ForExpression.
void ensure_wellformedness (const char *start_tag, const char *end_tag)
 Returns if the input (X)Query is wellformed in respect to the XML definition.

Variables

Query __pad0__
Query doc
StartTag __pad1__ = seq
EndTag __pad2__
BachelorTag __pad3__
XMLExpr __pad4__
NestedXMLExpr __pad5__
ElementContents __pad6__
QExpr __pad7__
QExprSingle __pad8__
StringConst __pad9__
NumericConst __pad10__
FWRExpr __pad11__
ReturnQExpr __pad12__
ForClause __pad13__
WhereClause __pad14__
Condition __pad15__
ComparisonExpr __pad16__
EXP_TYPE rop_type = $3->getOperandType()
bool is_lop_aggfunct = lop_type==et_operandaggregatefunct
bool is_rop_aggfunct = rop_type==et_operandaggregatefunct
bool is_lop_rounding = lop_type==et_operandrounding
bool is_rop_rounding = rop_type==et_operandrounding
 lop_type = $1->getType()
bool is_lop_string = lop_type==et_stringconst
bool is_rop_string = rop_type==et_stringconst
bool is_lop_numeric = lop_type==et_numericconst
bool is_rop_numeric = rop_type==et_numericconst
OperandExpr __pad17__ = new CondOperandExpression($1, $2, $3)
ExprAppendix __pad18__
RelOp __pad19__
AggregateFunct __pad20__
Rounding __pad21__
PathStepExpr __pad22__
ChildAxis __pad23__
DescendantAxis __pad24__
NodeTest __pad25__
QName __pad26__
PathExpr __pad27__
IfExpr __pad28__
IfExpr VarExpr
VarRef __pad29__
VarAxisExpr __pad30__
delete var = new VarStepExpression(var->getId(), $5)


Detailed Description

PARSER.

PARSER.

Author:
Stefanie Scherzinger

Gunnar Jehl

Version:
2.1
License:
Software License Agreement (BSD License)

Definition in file query_parser.y.


Function Documentation

void ensure_wellformedness ( const char *  start_tag,
const char *  end_tag 
)

Returns if the input (X)Query is wellformed in respect to the XML definition.

Returns if the input (X)Query is wellformed in respect to the XML definition.

Parameters:
[in] start_tag Pointer to a char object (opening tag of an XML element).
[in] end_tag Pointer to a char object (closing tag of an XML element).
Return values:
void 

Definition at line 132187 of file query_parser.y.

Expression * make_for_expression ( var_list_type *  var_list,
Expression sub_expression 
)

Returns constructed for-clauses (with return-clause) from comma-separated short cutted ForExpression.

Returns constructed for-clauses (with return-clause) from comma-separated short cutted ForExpression.

Parameters:
[in] var_list Pointer to the underlying list for parsing comma-separated short cutted ForExpression.
[in] sub_expression Pointer to a Expression object (return-clause).
Return values:
Expression* Pointer to a Expression object.

Definition at line 132165 of file query_parser.y.

int parse_query ( DocExpression _doc  ) 

Input (X)Query parsing.

Input (X)Query parsing.

Parameters:
[in] _doc Pointer to a DocExpression object.
Return values:
int 0 if input (X)Query has been parsed correctly, 1 otherwise.

Definition at line 132142 of file query_parser.y.

Referenced by Executor::parseQuery().


Generated on Sun May 24 20:20:15 2009 for G(arbage) C(ollected) X(Query) Engine by  doxygen 1.5.9