Kexi API Documentation (2.0 alpha)

sqlscanner.cpp File Reference

#include <stdio.h>
#include <errno.h>
#include <field.h>
#include <expression.h>
#include "sqlparser.h"
#include "sqltypes.h"
#include <iostream>
#include <kdebug.h>
#include <klocale.h>
#include <unistd.h>

Go to the source code of this file.

Defines

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION   2
#define YY_FLEX_MINOR_VERSION   5
#define yyconst
#define YY_PROTO(proto)   ()
#define YY_NULL   0
#define YY_SC_TO_UI(c)   ((unsigned int) (unsigned char) c)
#define BEGIN   yy_start = 1 + 2 *
#define YY_START   ((yy_start - 1) / 2)
#define YYSTATE   YY_START
#define YY_STATE_EOF(state)   (YY_END_OF_BUFFER + state + 1)
#define YY_NEW_FILE   yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR   0
#define YY_BUF_SIZE   16384
#define EOB_ACT_CONTINUE_SCAN   0
#define EOB_ACT_END_OF_FILE   1
#define EOB_ACT_LAST_MATCH   2
#define yyless(n)
#define unput(c)   yyunput( c, yytext_ptr )
#define YY_BUFFER_NEW   0
#define YY_BUFFER_NORMAL   1
#define YY_BUFFER_EOF_PENDING   2
#define YY_CURRENT_BUFFER   yy_current_buffer
#define YY_FLUSH_BUFFER   yy_flush_buffer( yy_current_buffer )
#define yy_new_buffer   yy_create_buffer
#define yy_set_interactive(is_interactive)
#define yy_set_bol(at_bol)
#define YY_AT_BOL()   (yy_current_buffer->yy_at_bol)
#define yywrap()   1
#define YY_SKIP_YYWRAP
#define yytext_ptr   yytext
#define YY_DO_BEFORE_ACTION
#define YY_NUM_RULES   43
#define YY_END_OF_BUFFER   44
#define REJECT   reject_used_but_not_detected
#define yymore()   yymore_used_but_not_detected
#define YY_MORE_ADJ   0
#define YY_RESTORE_YY_MORE_OFFSET
#define INITIAL   0
#define YY_NO_UNPUT
#define ECOUNT   current += yyleng; ctoken = yytext
#define YY_NEVER_INTERACTIVE   1
#define YY_NO_PUSH_STATE   1
#define YY_NO_POP_STATE   1
#define YY_NO_TOP_STATE   1
#define YY_READ_BUF_SIZE   8192
#define ECHO   (void) fwrite( yytext, yyleng, 1, yyout )
#define YY_INPUT(buf, result, max_size)
#define yyterminate()   return YY_NULL
#define YY_START_STACK_INCR   25
#define YY_FATAL_ERROR(msg)   yy_fatal_error( msg )
#define YY_DECL   int yylex YY_PROTO(( void ))
#define YY_BREAK   break;
#define YY_RULE_SETUP   YY_USER_ACTION
#define YY_EXIT_FAILURE   2
#define yyless(n)

Typedefs

typedef yy_buffer_state * YY_BUFFER_STATE
typedef unsigned int yy_size_t
typedef unsigned char YY_CHAR
typedef int yy_state_type

Functions

void yyrestart YY_PROTO ((FILE *input_file))
void yy_switch_to_buffer YY_PROTO ((YY_BUFFER_STATE new_buffer))
void yy_load_buffer_state YY_PROTO ((void))
YY_BUFFER_STATE yy_create_buffer YY_PROTO ((FILE *file, int size))
void yy_delete_buffer YY_PROTO ((YY_BUFFER_STATE b))
void yy_init_buffer YY_PROTO ((YY_BUFFER_STATE b, FILE *file))
YY_BUFFER_STATE yy_scan_buffer YY_PROTO ((char *base, yy_size_t size))
YY_BUFFER_STATE yy_scan_string YY_PROTO ((yyconst char *yy_str))
YY_BUFFER_STATE yy_scan_bytes YY_PROTO ((yyconst char *bytes, int len))
static void *yy_flex_alloc YY_PROTO ((yy_size_t))
static void *yy_flex_realloc YY_PROTO ((void *, yy_size_t))
static void yy_flex_free YY_PROTO ((void *))
static yy_state_type yy_try_NUL_trans YY_PROTO ((yy_state_type current_state))
static void yy_fatal_error YY_PROTO ((yyconst char msg[]))
void setError (const QString &errDesc)
void setError (const QString &errName, const QString &errDesc)

Variables

int yyleng
FILE * yyin = (FILE *) 0
FILE * yyout = (FILE *) 0
static YY_BUFFER_STATE yy_current_buffer = 0
static char yy_hold_char
static int yy_n_chars
static char * yy_c_buf_p = (char *) 0
static int yy_init = 1
static int yy_start = 0
static int yy_did_buffer_switch_on_eof
char * yytext
static yyconst short int yy_accept [148]
static yyconst int yy_ec [256]
static yyconst int yy_meta [39]
static yyconst short int yy_base [152]
static yyconst short int yy_def [152]
static yyconst short int yy_nxt [294]
static yyconst short int yy_chk [294]
static yy_state_type yy_last_accepting_state
static char * yy_last_accepting_cpos
int size
FILE * file
int len


Define Documentation

#define BEGIN   yy_start = 1 + 2 *
 

Definition at line 83 of file sqlscanner.cpp.

#define ECHO   (void) fwrite( yytext, yyleng, 1, yyout )
 

Definition at line 603 of file sqlscanner.cpp.

#define ECOUNT   current += yyleng; ctoken = yytext
 

Definition at line 513 of file sqlscanner.cpp.

#define EOB_ACT_CONTINUE_SCAN   0
 

Definition at line 108 of file sqlscanner.cpp.

#define EOB_ACT_END_OF_FILE   1
 

Definition at line 109 of file sqlscanner.cpp.

#define EOB_ACT_LAST_MATCH   2
 

Definition at line 110 of file sqlscanner.cpp.

#define FLEX_SCANNER
 

Definition at line 8 of file sqlscanner.cpp.

#define INITIAL   0
 

Definition at line 482 of file sqlscanner.cpp.

#define REJECT   reject_used_but_not_detected
 

Definition at line 476 of file sqlscanner.cpp.

#define unput  )     yyunput( c, yytext_ptr )
 

Definition at line 139 of file sqlscanner.cpp.

 
#define YY_AT_BOL  )     (yy_current_buffer->yy_at_bol)
 

Definition at line 266 of file sqlscanner.cpp.

#define YY_BREAK   break;
 

Definition at line 673 of file sqlscanner.cpp.

#define YY_BUF_SIZE   16384
 

Definition at line 101 of file sqlscanner.cpp.

#define YY_BUFFER_EOF_PENDING   2
 

Definition at line 202 of file sqlscanner.cpp.

#define YY_BUFFER_NEW   0
 

Definition at line 190 of file sqlscanner.cpp.

#define YY_BUFFER_NORMAL   1
 

Definition at line 191 of file sqlscanner.cpp.

#define YY_CURRENT_BUFFER   yy_current_buffer
 

Definition at line 211 of file sqlscanner.cpp.

#define YY_DECL   int yylex YY_PROTO(( void ))
 

Definition at line 661 of file sqlscanner.cpp.

#define YY_DO_BEFORE_ACTION
 

Value:

yytext_ptr = yy_bp; \
    yyleng = (int) (yy_cp - yy_bp); \
    yy_hold_char = *yy_cp; \
    *yy_cp = '\0'; \
    yy_c_buf_p = yy_cp;

Definition at line 285 of file sqlscanner.cpp.

#define YY_END_OF_BUFFER   44
 

Definition at line 293 of file sqlscanner.cpp.

#define YY_END_OF_BUFFER_CHAR   0
 

Definition at line 98 of file sqlscanner.cpp.

#define YY_EXIT_FAILURE   2
 

#define YY_FATAL_ERROR msg   )     yy_fatal_error( msg )
 

Definition at line 654 of file sqlscanner.cpp.

#define YY_FLEX_MAJOR_VERSION   2
 

Definition at line 9 of file sqlscanner.cpp.

#define YY_FLEX_MINOR_VERSION   5
 

Definition at line 10 of file sqlscanner.cpp.

#define YY_FLUSH_BUFFER   yy_flush_buffer( yy_current_buffer )
 

Definition at line 240 of file sqlscanner.cpp.

#define YY_INPUT buf,
result,
max_size   ) 
 

Value:

if ( yy_current_buffer->yy_is_interactive ) \
        { \
        int c = '*', n; \
        for ( n = 0; n < max_size && \
                 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
            buf[n] = (char) c; \
        if ( c == '\n' ) \
            buf[n++] = (char) c; \
        if ( c == EOF && ferror( yyin ) ) \
            YY_FATAL_ERROR( "input in flex scanner failed" ); \
        result = n; \
        } \
    else \
        { \
        errno=0; \
        while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
            { \
            if( errno != EINTR) \
                { \
                YY_FATAL_ERROR( "input in flex scanner failed" ); \
                break; \
                } \
            errno=0; \
            clearerr(yyin); \
            } \
        }

Definition at line 610 of file sqlscanner.cpp.

#define YY_MORE_ADJ   0
 

Definition at line 478 of file sqlscanner.cpp.

#define YY_NEVER_INTERACTIVE   1
 

Definition at line 519 of file sqlscanner.cpp.

#define yy_new_buffer   yy_create_buffer
 

Definition at line 250 of file sqlscanner.cpp.

#define YY_NEW_FILE   yyrestart( yyin )
 

Definition at line 96 of file sqlscanner.cpp.

#define YY_NO_POP_STATE   1
 

Definition at line 573 of file sqlscanner.cpp.

#define YY_NO_PUSH_STATE   1
 

Definition at line 572 of file sqlscanner.cpp.

#define YY_NO_TOP_STATE   1
 

Definition at line 574 of file sqlscanner.cpp.

#define YY_NO_UNPUT
 

Definition at line 512 of file sqlscanner.cpp.

#define YY_NULL   0
 

Definition at line 70 of file sqlscanner.cpp.

#define YY_NUM_RULES   43
 

Definition at line 292 of file sqlscanner.cpp.

#define YY_PROTO proto   )     ()
 

Definition at line 65 of file sqlscanner.cpp.

#define YY_READ_BUF_SIZE   8192
 

Definition at line 594 of file sqlscanner.cpp.

#define YY_RESTORE_YY_MORE_OFFSET
 

Definition at line 479 of file sqlscanner.cpp.

#define YY_RULE_SETUP   YY_USER_ACTION
 

Definition at line 676 of file sqlscanner.cpp.

#define YY_SC_TO_UI  )     ((unsigned int) (unsigned char) c)
 

Definition at line 77 of file sqlscanner.cpp.

#define yy_set_bol at_bol   ) 
 

Value:

{ \
    if ( ! yy_current_buffer ) \
        yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
    yy_current_buffer->yy_at_bol = at_bol; \
    }

Definition at line 259 of file sqlscanner.cpp.

#define yy_set_interactive is_interactive   ) 
 

Value:

{ \
    if ( ! yy_current_buffer ) \
        yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
    yy_current_buffer->yy_is_interactive = is_interactive; \
    }

Definition at line 252 of file sqlscanner.cpp.

#define YY_SKIP_YYWRAP
 

Definition at line 270 of file sqlscanner.cpp.

#define YY_START   ((yy_start - 1) / 2)
 

Definition at line 89 of file sqlscanner.cpp.

#define YY_START_STACK_INCR   25
 

Definition at line 649 of file sqlscanner.cpp.

#define YY_STATE_EOF state   )     (YY_END_OF_BUFFER + state + 1)
 

Definition at line 93 of file sqlscanner.cpp.

#define yyconst
 

Definition at line 58 of file sqlscanner.cpp.

#define yyless  ) 
 

Value:

do \
        { \
        /* Undo effects of setting up yytext. */ \
        yytext[yyleng] = yy_hold_char; \
        yy_c_buf_p = yytext + n; \
        yy_hold_char = *yy_c_buf_p; \
        *yy_c_buf_p = '\0'; \
        yyleng = n; \
        } \
    while ( 0 )

Definition at line 128 of file sqlscanner.cpp.

#define yyless  ) 
 

Value:

do \
        { \
        /* Undo effects of setting up yytext. */ \
        *yy_cp = yy_hold_char; \
        YY_RESTORE_YY_MORE_OFFSET \
        yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
        YY_DO_BEFORE_ACTION; /* set up yytext again */ \
        } \
    while ( 0 )

Definition at line 128 of file sqlscanner.cpp.

 
#define yymore  )     yymore_used_but_not_detected
 

Definition at line 477 of file sqlscanner.cpp.

#define YYSTATE   YY_START
 

Definition at line 90 of file sqlscanner.cpp.

 
#define yyterminate  )     return YY_NULL
 

Definition at line 644 of file sqlscanner.cpp.

#define yytext_ptr   yytext
 

Definition at line 275 of file sqlscanner.cpp.

 
#define yywrap  )     1
 

Definition at line 269 of file sqlscanner.cpp.


Typedef Documentation

typedef struct yy_buffer_state* YY_BUFFER_STATE
 

Definition at line 103 of file sqlscanner.cpp.

typedef unsigned char YY_CHAR
 

Definition at line 271 of file sqlscanner.cpp.

typedef unsigned int yy_size_t
 

Definition at line 145 of file sqlscanner.cpp.

typedef int yy_state_type
 

Definition at line 273 of file sqlscanner.cpp.


Function Documentation

void setError const QString errName,
const QString errDesc
 

Definition at line 153 of file parser_p.cpp.

References current, KexiDB::Parser::setError(), and yyerror().

void setError const QString errDesc  ) 
 

Definition at line 159 of file parser_p.cpp.

References setError().

static void yy_fatal_error YY_PROTO (yyconst char msg[])   )  [static]
 

static yy_state_type yy_try_NUL_trans YY_PROTO (yy_state_type current_state)   )  [static]
 

static void yy_flex_free YY_PROTO (void *)   )  [static]
 

static void* yy_flex_realloc YY_PROTO (void *, yy_size_t  )  [static]
 

static void* yy_flex_alloc YY_PROTO (yy_size_t  )  [static]
 

YY_BUFFER_STATE yy_scan_bytes YY_PROTO (yyconst char *bytes, int len  ) 
 

YY_BUFFER_STATE yy_scan_string YY_PROTO (yyconst char *yy_str)   ) 
 

YY_BUFFER_STATE yy_scan_buffer YY_PROTO (char *base, yy_size_t size  ) 
 

void yy_init_buffer YY_PROTO (YY_BUFFER_STATE b, FILE *file  ) 
 

void yy_flush_buffer YY_PROTO (YY_BUFFER_STATE b)   ) 
 

YY_BUFFER_STATE yy_create_buffer YY_PROTO (FILE *file, int size  ) 
 

static int input YY_PROTO (void)   ) 
 

void yy_switch_to_buffer YY_PROTO (YY_BUFFER_STATE new_buffer)   ) 
 

void yyrestart YY_PROTO (FILE *input_file)   ) 
 


Variable Documentation

FILE* file
 

Definition at line 1700 of file sqlscanner.cpp.

Referenced by KexiDB::Connection::databaseExists(), KFormDesigner::FormIO::loadFormFromFile(), KexiDBConnectionSet::removeConnectionData(), KFormDesigner::FormIO::saveFormToFile(), and KexiDB::ConnectionData::setFileName().

int len
 

Definition at line 1826 of file sqlscanner.cpp.

Referenced by KexiUtils::StyleProxy::drawItem(), KexiMigration::MySQLMigrate::examineEnumField(), KexiUserAction::fromCurrentRecord(), KexiUtils::StyleProxy::itemRect(), KexiDB::stringToVariant(), KFormDesigner::FormIO::loadImage(), KexiQueryDesignerGuiEditor::parseExpressionString(), and KFormDesigner::FormIO::saveImage().

yy_size_t size
 

Definition at line 1937 of file sqlscanner.cpp.

Referenced by LoadIconDialog::changeIconSize(), KexiTableItem::debug(), KexiComboBoxDropDownButton::drawButton(), KexiDBComboBox::eventFilter(), KexiDB::QuerySchema::fieldsExpanded(), getPix(), KexiMainWindowImpl::initPropertyEditor(), Kexi::smallFont(), KexiArrowTip::KexiArrowTip(), KexiComboBoxDropDownButton::KexiComboBoxDropDownButton(), KexiDB::escapeBLOB(), KexiUtils::deserializeMap(), KexiUtils::serializeMap(), LoadIconDialog::LoadIconDialog(), KexiPart::Manager::lookup(), KexiTableView::paintEmptyArea(), KexiSimplePrintPreviewView::paintEvent(), KexiDBImageBox::paintEvent(), KexiDBImageBox::resizeEvent(), KexiSimplePrintPreviewScrollView::setFullWidth(), KexiDBAutoField::setLabelPosition(), KexiDBForm::sizeInternal(), KexiTableEdit::totalSize(), KexiInputTableEdit::totalSize(), KexiDBLabel::updatePixmap(), and KexiComboBoxPopup::updateSize().

yyconst short int yy_accept[148] [static]
 

Initial value:

    {   0,
        0,    0,   44,   43,   41,   42,   43,   42,   42,   43,
       42,    7,   42,   42,   42,   42,   39,   39,   39,   39,
       39,   39,   39,   39,   39,   39,   39,   39,   39,   39,
       39,   39,   42,   41,    2,    0,   38,    9,    0,    8,
        8,    7,   39,   27,    4,    1,    3,    5,   28,    0,
       39,   10,   35,   39,   39,   39,    6,   22,   39,   39,
       39,   39,   39,   24,   25,   39,   39,   39,   39,   39,
       39,   26,    8,   40,    9,   36,   39,   39,   39,   39,
        0,   39,   39,   39,   21,   39,   39,   39,   39,   39,
       39,   39,   29,   39,   37,   12,   39,    0,   14,   15,

       16,    0,   23,   39,   39,   39,   39,   39,   39,   39,
       39,    0,    0,    0,   34,   30,   39,   39,   32,   33,
       11,   39,    0,    0,    0,   31,   39,   13,    0,   20,
        0,   39,    0,    0,    0,    0,    0,    0,    0,    0,
       18,   19,    0,    0,    0,   17,    0
    }

Definition at line 294 of file sqlscanner.cpp.

yyconst short int yy_base[152] [static]
 

Initial value:

    {   0,
        0,    0,  254,  255,  251,  241,  247,  255,  244,  242,
      239,   31,   31,  236,   33,    0,  238,   38,   39,   40,
       41,   42,   43,   44,   45,   47,   49,   55,   74,   46,
       60,   56,  207,  242,  255,  239,  255,  255,  235,  232,
      231,   50,  231,  255,  255,  255,  255,  255,  255,  224,
       76,   48,  229,   77,   79,   80,   81,   88,   83,   84,
       91,   85,   92,  228,   93,   94,   95,   96,   98,  100,
      101,  255,  226,  255,  226,  225,  105,  115,  117,  118,
      125,  120,  122,  121,  129,  126,  127,  128,  132,  134,
      135,  136,  224,  131,  223,  222,  138,  127,  221,  220,

      219,  146,  218,  142,  148,  151,  155,  157,  160,  163,
      164,  192,  188,  190,  205,  204,  158,  171,  203,  202,
      201,  162,  206,  179,  177,  196,  166,  195,  173,  255,
      177,  184,  166,  172,  174,  171,  180,  165,  167,  159,
      255,  255,  187,  183,  158,  255,  255,  216,  219,   58,
      222
    }

Definition at line 354 of file sqlscanner.cpp.

char* yy_c_buf_p = (char *) 0 [static]
 

Definition at line 223 of file sqlscanner.cpp.

yyconst short int yy_chk[294] [static]
 

Definition at line 433 of file sqlscanner.cpp.

YY_BUFFER_STATE yy_current_buffer = 0 [static]
 

Definition at line 205 of file sqlscanner.cpp.

yyconst short int yy_def[152] [static]
 

Initial value:

    {   0,
      147,    1,  147,  147,  147,  147,  148,  147,  147,  149,
      147,  150,  147,  147,  147,  151,  150,  150,  150,  150,
      150,  150,  150,  150,  150,  150,  150,  150,  150,  150,
      150,  150,  147,  147,  147,  148,  147,  147,  149,  147,
      147,  150,  150,  147,  147,  147,  147,  147,  147,  151,
      150,  150,  150,  150,  150,  150,  150,  150,  150,  150,
      150,  150,  150,  150,  150,  150,  150,  150,  150,  150,
      150,  147,  147,  147,  150,  150,  150,  150,  150,  150,
      147,  150,  150,  150,  150,  150,  150,  150,  150,  150,
      150,  150,  150,  150,  150,  150,  150,  147,  150,  150,

      150,  147,  150,  150,  150,  150,  150,  150,  150,  150,
      150,  147,  147,  147,  150,  150,  150,  150,  150,  150,
      150,  150,  147,  147,  147,  150,  150,  150,  147,  147,
      147,  150,  147,  147,  147,  147,  147,  147,  147,  147,
      147,  147,  147,  147,  147,  147,    0,  147,  147,  147,
      147
    }

Definition at line 375 of file sqlscanner.cpp.

int yy_did_buffer_switch_on_eof [static]
 

Definition at line 230 of file sqlscanner.cpp.

yyconst int yy_ec[256] [static]
 

Definition at line 314 of file sqlscanner.cpp.

char yy_hold_char [static]
 

Definition at line 215 of file sqlscanner.cpp.

int yy_init = 1 [static]
 

Definition at line 224 of file sqlscanner.cpp.

char* yy_last_accepting_cpos [static]
 

Definition at line 471 of file sqlscanner.cpp.

yy_state_type yy_last_accepting_state [static]
 

Definition at line 470 of file sqlscanner.cpp.

yyconst int yy_meta[39] [static]
 

Initial value:

    {   0,
        1,    1,    1,    1,    1,    1,    1,    2,    2,    1,
        1,    1,    3,    3,    2,    2,    2,    2,    2,    2,
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
        2,    2,    2,    2,    2,    2,    2,    1
    }

Definition at line 346 of file sqlscanner.cpp.

int yy_n_chars [static]
 

Definition at line 217 of file sqlscanner.cpp.

yyconst short int yy_nxt[294] [static]
 

Definition at line 396 of file sqlscanner.cpp.

int yy_start = 0 [static]
 

Definition at line 225 of file sqlscanner.cpp.

FILE * yyin = (FILE *) 0
 

Definition at line 272 of file sqlscanner.cpp.

int yyleng
 

Definition at line 220 of file sqlscanner.cpp.

FILE * yyout = (FILE *) 0
 

Definition at line 272 of file sqlscanner.cpp.

char * yytext
 

Definition at line 480 of file sqlscanner.cpp.

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:34 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003