I have old DLL, which contains functions of syntax analysis of query and parsing. That is:
SelPsrParseSelect( char *selectText, SYNTAXBUFFER *syntaxItems);
SelPsrGetNumItems( SYNTAXBUFFER *syntaxItems, int *numItems );
SelPsrFindItemType( SYNTAXBUFFER *syntaxItems, int minItemType, int maxItemType, int startItemNo, int lastItemNo, int *foundItemNo );
SelPsrGetClauseParams( SYNTAXBUFFER *syntaxItems, int clauseType, int *firstClauseItemNo, int *lastClauseItemNo );
SelPsrGetItemParams( SYNTAXBUFFER *syntaxItems, int itemNo, int *type, int *offset, int *length );
and structures:
typedef struct tagItem {
int type;
int offset;
int length;
} ITEM;
typedef struct tagSyntaxOutBuffer {
int numItems;
ITEM items[MAXITEMS];
} SYNTAXBUFFER;
These functions fails on some complex(difficult) SQL-queries. There is no source code for it. I want write new functions. In view of the modern requirements, Oracle 9, C++ Builder 6. That not only parsing. It is necessary syntax analysis the query. To determine its type (select, insert, update etc.). To determine
SelPsrParseSelect( char *selectText, SYNTAXBUFFER *syntaxItems);
SelPsrGetNumItems( SYNTAXBUFFER *syntaxItems, int *numItems );
SelPsrFindItemType( SYNTAXBUFFER *syntaxItems, int minItemType, int maxItemType, int startItemNo, int lastItemNo, int *foundItemNo );
SelPsrGetClauseParams( SYNTAXBUFFER *syntaxItems, int clauseType, int *firstClauseItemNo, int *lastClauseItemNo );
SelPsrGetItemParams( SYNTAXBUFFER *syntaxItems, int itemNo, int *type, int *offset, int *length );
and structures:
typedef struct tagItem {
int type;
int offset;
int length;
} ITEM;
typedef struct tagSyntaxOutBuffer {
int numItems;
ITEM items[MAXITEMS];
} SYNTAXBUFFER;
These functions fails on some complex(difficult) SQL-queries. There is no source code for it. I want write new functions. In view of the modern requirements, Oracle 9, C++ Builder 6. That not only parsing. It is necessary syntax analysis the query. To determine its type (select, insert, update etc.). To determine