Kexi API Documentation (2.0 alpha)

parser_p.cpp File Reference

#include "parser_p.h"
#include "sqlparser.h"
#include <kdebug.h>
#include <klocale.h>
#include <qregexp.h>
#include <assert.h>

Go to the source code of this file.

Defines

#define IMPL_ERROR(errmsg)   setError("Implementation error", errmsg)
#define CLEANUP
 clean up no longer needed temporary objects

Functions

int yyparse ()
void tokenize (const char *data)
void yyerror (const char *str)
void setError (const QString &errName, const QString &errDesc)
void setError (const QString &errDesc)
bool parseData (Parser *p, const char *data)
bool addColumn (ParseInfo &parseInfo, BaseExpr *columnExpr)
QuerySchemabuildSelectQuery (QuerySchema *querySchema, NArgExpr *colViews, NArgExpr *tablesList, SelectOptionsInternal *options)

Variables

Parserparser
Fieldfield
QPtrList< FieldfieldList
int current = 0
QString ctoken = ""


Define Documentation

#define CLEANUP
 

Value:

delete colViews; \
    delete tablesList; \
    delete options
clean up no longer needed temporary objects

Definition at line 397 of file parser_p.cpp.

Referenced by buildSelectQuery().

#define IMPL_ERROR errmsg   )     setError("Implementation error", errmsg)
 

Definition at line 165 of file parser_p.cpp.


Function Documentation

bool addColumn ParseInfo parseInfo,
BaseExpr columnExpr
 

Definition at line 230 of file parser_p.cpp.

References KexiDB::QuerySchema::addAsterisk(), KexiDB::QuerySchema::addExpression(), KexiDB::QuerySchema::addField(), KexiDB::ParseInfo::errDescr, KexiDB::ParseInfo::errMsg, KexiDB::BaseExpr::exprClass(), KexiDB::FieldList::field(), KexiDB::VariableExpr::field, IMPL_ERROR, KexiDBDbg, KexiDBExpr_Variable, KexiDB::VariableExpr::name, KexiDB::ParseInfo::querySchema, setError(), KexiDB::QuerySchema::table(), KexiDB::Field::table(), KexiDB::QuerySchema::tableAlias(), KexiDB::VariableExpr::tableForQueryAsterisk, KexiDB::QuerySchema::tablePositionForAlias(), KexiDB::VariableExpr::tablePositionForField, KexiDB::QuerySchema::tablePositions(), KexiDB::QuerySchema::tables(), KexiDB::BaseExpr::toVariable(), and KexiDB::BaseExpr::validate().

Referenced by ActionsListViewBase::ActionsListViewBase(), buildSelectQuery(), KexiFieldListView::KexiFieldListView(), and KFormDesigner::ObjectTreeView::ObjectTreeView().

QuerySchema* buildSelectQuery QuerySchema querySchema,
NArgExpr colViews,
NArgExpr tablesList,
SelectOptionsInternal options
 

Definition at line 402 of file parser_p.cpp.

References addColumn(), KexiDB::QuerySchema::addTable(), KexiDB::OrderByColumnList::appendColumn(), KexiDB::OrderByColumnList::appendField(), KexiDB::NArgExpr::arg(), AS, CLEANUP, KexiDB::QuerySchema::columnInfo(), KexiDB::Parser::db(), KexiDB::ParseInfo::errDescr, KexiDB::ParseInfo::errMsg, KexiDB::BaseExpr::exprClass(), KexiDB::QuerySchema::findTableField(), KexiDBExpr_Aggregation, KexiDBExpr_Arithm, KexiDBExpr_Const, KexiDBExpr_Function, KexiDBExpr_Logical, KexiDBExpr_Relational, KexiDBExpr_SpecialBinary, KexiDBExpr_Unary, KexiDBExpr_Variable, KexiDB::VariableExpr::name, KexiDB::QuerySchema::orderByColumnList(), KexiDB::ParseInfo::repeatedTablesAndAliases, KexiDB::QuerySchema::setColumnAlias(), setError(), KexiDB::QuerySchema::setMasterTable(), KexiDB::QuerySchema::setWhereExpression(), KexiDB::QuerySchema::tables(), tname(), KexiDB::BaseExpr::toBinary(), KexiDB::BaseExpr::token(), KexiDB::BaseExpr::toString(), and KexiDB::BaseExpr::toVariable().

Referenced by yyparse().

bool parseData Parser p,
const char *  data
 

Definition at line 167 of file parser_p.cpp.

References KexiDB::Parser::clear(), current, KexiDB::Parser::error(), KexiDBDbg, KexiDB::Parser::OP_Select, KexiDB::Parser::operation(), KexiDB::Parser::setError(), tokenize(), yyerror(), and yyparse().

Referenced by KexiDB::Parser::parse().

void setError const QString errDesc  ) 
 

Definition at line 159 of file parser_p.cpp.

void setError const QString errName,
const QString errDesc
 

Definition at line 153 of file parser_p.cpp.

Referenced by addColumn(), buildSelectQuery(), and setError().

void tokenize const char *  data  ) 
 

Referenced by parseData().

void yyerror const char *  str  ) 
 

Definition at line 81 of file parser_p.cpp.

References current, KexiDB::Parser::error(), KexiDB::Parser::isReservedKeyword(), KexiDBDbg, KexiDB::Parser::OP_Error, KexiDB::Parser::setError(), KexiDB::Parser::setOperation(), and KexiDB::Parser::statement().

Referenced by parseData(), setError(), and yyparse().

int yyparse  ) 
 

Definition at line 2160 of file sqlparser.cpp.

References AND, AS, OrderByColumnInternal::ascending, BITWISE_SHIFT_LEFT, BITWISE_SHIFT_RIGHT, buildSelectQuery(), CHARACTER_STRING_LITERAL, KexiDB::Parser::createTable(), field, GREATER_OR_EQUAL, IDENTIFIER, INTEGER_CONST, KexiDBDbg, KexiDBExpr_Arithm, KexiDBExpr_Logical, KexiDBExpr_Relational, KexiDBExpr_SpecialBinary, KexiDBExpr_TableList, LESS_OR_EQUAL, LIKE, LLONG_MAX, LLONG_MIN, NOT, NOT_EQUAL, NOT_EQUAL2, NOT_SIMILAR_TO, OR, parser, REAL_CONST, KexiDB::Field::setAutoIncrement(), OrderByColumnInternal::setColumnByNameOrNumber(), KexiDB::Field::setName(), KexiDB::Field::setNotNull(), KexiDB::Parser::setOperation(), KexiDB::Field::setPrecision(), KexiDB::Field::setPrimaryKey(), KexiDB::Parser::setQuerySchema(), KexiDB::Field::setType(), SIMILAR_TO, SQL_IN, SQL_IS_NOT_NULL, SQL_IS_NULL, SQL_NULL, KexiDB::Parser::table(), XOR, YY_, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, yycheck, yydefact, yydefgoto, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, yyerror(), YYFINAL, YYINITDEPTH, YYLAST, YYLEX, YYMAXDEPTH, YYNTOKENS, yypact, YYPACT_NINF, yypgoto, YYPOPSTACK, yyr1, yyr2, YYSIZE_T, YYSTACK_ALLOC, YYSTACK_ALLOC_MAXIMUM, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yystos, yytable, YYTABLE_NINF, YYTERROR, and YYTRANSLATE.

Referenced by parseData().


Variable Documentation

QString ctoken = ""
 

Definition at line 37 of file parser_p.cpp.

int current = 0
 

Definition at line 36 of file parser_p.cpp.

Referenced by KFormDesigner::EditListViewDialog::MoveItemDown(), KFormDesigner::EditListViewDialog::MoveItemUp(), parseData(), KFormDesigner::EditListViewDialog::removeItem(), setError(), and yyerror().

Field* field
 

Definition at line 33 of file parser_p.cpp.

Referenced by KexiDB::QueryColumnInfo::aliasOrName(), KexiDB::OrderByColumnList::appendField(), KexiTableDesignerView::buildField(), KexiDB::QueryColumnInfo::captionOrAliasOrName(), KexiDB::Connection::createTableStatement(), KexiDB::QuerySchema::debugString(), KexiFieldDrag::decodeMultiple(), KexiDB::SQLitePreparedStatement::execute(), KexiDB::MySqlPreparedStatement::execute(), KexiDB::AlterTableHandler::ChangeFieldPropertyAction::execute(), KexiDB::QuerySchema::field(), KexiTableDesignerView::initData(), KexiFieldDrag::KexiFieldDrag(), KexiDB::TableSchema::lookupFieldSchema(), KexiDB::QuerySchema::setColumnAlias(), KexiTableViewData::setSorting(), KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(), KexiQueryDesignerGuiEditor::slotBeforeCellChanged(), KexiDataSourcePage::slotFieldSelected(), KexiTableDesignerView::slotRowUpdated(), and yyparse().

QPtrList<Field> fieldList
 

Definition at line 35 of file parser_p.cpp.

Parser* parser
 

Definition at line 32 of file parser_p.cpp.

Referenced by KexiQueryPart::loadSchemaData(), KexiQueryDesignerSQLView::slotCheckQuery(), and yyparse().

KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:49:30 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003