From: Arno B. <fir...@ab...> - 2004-06-02 15:12:15
|
Hi, > My first attempt to handle the dsql execute immediate "create database" > in the Y-valve was predicated on including the SQL parser from the > engine. Nice idea, but it proved untenable -- the parser brought in the > "thread data" structure and the dsql memory manager and make.cpp and the > mover and the error handler and ... arggghhhh! > > Take two is creating an ad hoc, hard coded, recursive descent parser > based on the Lex used by configuration file system. Before I get too > far, I'd like the verify the grammar of create database statement. My > most recent source is an ancient Interbase language reference manual > with the following grammer: > > statement := > CREATE { DATABASE | SCHEMA } "<filespec>" > [ USER "username" [ PASSWORD "password" ]] > [ PAGE_SIZE [=] int ] > [ LENGTH [=] int [ PAGE | PAGES ]] > [ DEFAULT CHARACTER SET charset ] > [ <secondary_file>... ] > > secondary_file := > FILE "<filespec>" [ <fileinfo> ] > > fileinfo :- > LENGTH [=] [ PAGE | PAGES ] | > STARTING [ AT [ PAGE ]] int > > Does anyone have any additions or corrections? Looking at the yacc file you're missing the SET NAMES : | SET NAMES sql_string { $$ = make_node (nod_lc_ctype, 1, $3);} ..and nickolay's difference file ? | KW_DIFFERENCE KW_FILE sql_string { $$ = make_node (nod_difference_file, 1, $3); } ; Regards, Arno Brinkman ABVisie -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Firebird open source database (based on IB-OE) with many SQL-99 features : http://www.firebirdsql.org http://www.firebirdsql.info http://www.fingerbird.de/ http://www.comunidade-firebird.org/ Support list for Interbase and Firebird users : fir...@ya... Nederlandse firebird nieuwsgroep : news://newsgroups.firebirdsql.info |