[mysql-dde] Extend the SQL statement of MySQL (fwd)

  • From: Lenz Grimmer <lenz@xxxxxxxxx>
  • To: mysql-dde@xxxxxxxxxxxxx
  • Date: Fri, 31 Mar 2006 12:08:55 +0200 (CEST)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,

that might be of interest for you guys, too - spotted on our (public) 
"internals"
list...

Bye,
        LenZ
- -- 
 Lenz Grimmer <lenz@xxxxxxxxx>
 Community Relations Manager, EMEA
 MySQL GmbH, http://www.mysql.de/, Hamburg, Germany
 MySQL Users Conference 2006 (Santa Clara CA, 24-27 April) - 
http://www.mysqluc.com/

- ---------- Forwarded message ----------
Date: Wed, 29 Mar 2006 23:12:10 +0400
From: Konstantin Osipov <konstantin@xxxxxxxxx>
To: å?´é£?æ?? <feeling@xxxxxxxxxxxxxxx>,  <internals@xxxxxxxxxxxxxxx>
Subject: Re: extend the SQL statement of MySQL

Hello å?´é£?æ??,

* å?´é£?æ?? <feeling@xxxxxxxxxxxxxxx> [06/03/29 05:51]:

>     I want to extend the SQL statement of MySQL on windows32. For example,I 
> want to make the following statement valid. 
> 
>     <create_policy_stmt>::= 
>        CREATE SECURITY POLICY policy_name [<with_option>] 
>     <with_option>::= 
>        WITH OPTION {{NO}|{LABEL UPDATE}| {CHECH CONTROL}}[,â?¦] 
> 
>     I think there are two parts in MySQL, lexer and semantic parse.And I want 
> to konw that which file should I modify? 

sql_yacc.yy; you're adding new lex tokens, so you'll need to
modify lex.h to add support for them in the lexer. There you can
make sure that these new tokens do not become reserved words.
sql_parse.cc is an entry point where you can hook in an
implementation for the new command.

> 
>     And I modify sql_yacc.cpp like this: 
>     copy a linux version sql_yacc.yy to windows, use bison 2.1
>     compile it. This will produce two files sql_yacc.cpp,
>     sql_yacc.h, and I use them to instead the same file in
>     windows version of MySQL source file. did I do it right? 

Is there a problem with invoking bison directly on Windows?

>     Then I want to kown where can I add the new key words, since
>     there is not any *.l file that can be compiled by flex. 

We use our own lexer (implemented in sql_lex.cc), gen_lex_hash.cc
builds a symbol table for it using the arrays defined in lex.h. 

- -- 
Konstantin Osipov, Software Developer
MySQL AB, www.mysql.com

- -- 
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:    http://lists.mysql.com/internals?unsub=lenz@xxxxxxxxx
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQFELP+4SVDhKrJykfIRAtRcAJsGwFPpW28JGNjE45GJm6IEs1TDywCfXxj4
HjSiVFGZ7Hl4L686QzyL+bo=
=qYum
-----END PGP SIGNATURE-----

MySql-DDE discussion list
www.freelists.org/

Other related posts:

  • » [mysql-dde] Extend the SQL statement of MySQL (fwd)