If you intend to write a parser for the supported HSQLDB-SQL syntax, you should begin to write the grammar. It will help you to identify the common parts plus it will easily help to define the terminals for the lexer and the regular expressions to define integers, decimals, identifiers and so on.
Here is a (very) little extract of what may be done as a first step: Lo?c -----Message d'origine----- De?: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la part de fredt Envoyé?: mercredi 28 juillet 2004 19:28 à?: hsqldb-developers Objet?: Re: [Hsqldb-developers] Is there any douments about the code? There aren't any document. Try to debug Parser.ParseSelect(...). This calls private methods of Parser to build the expression tree. Parser methods call Tokenizer methods for tokens. Fred ----- Original Message ----- From: "liuxin" <[EMAIL PROTECTED]> To: "hsqldb-developers" <[EMAIL PROTECTED]> Sent: 28 July 2004 16:01 Subject: [Hsqldb-developers] Is there any douments about the code? I dived into the source code using some test cases to debug step by step those days ,but still confused, any documents will be appreciated! liuxin [EMAIL PROTECTED] 2004-07-28 ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ hsqldb-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hsqldb-developers ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ hsqldb-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hsqldb-developers
sql-command ::= alter-command SEMICOLON
alter-command ::= alter-index | alter-sequence | alter-table | alter-user
alter-index ::= ALTER INDEX object-name RENAME TO object-name
alter-sequence ::= ALTER SEQUENCE object-name RESTART WITH integer
alter-table ::= ALTER TABLE object-name ADD alter-table-column-optional data-type
alter-table-column-optional ::= column-name | COLUMN column-name
data-type ::=
column-name ::=
integer ::=
object-name ::=