package SQL::Translator::Parser::MySQL;
# -------------------------------------------------------------------
-# $Id: MySQL.pm,v 1.28 2003-08-04 15:19:08 kycl4rk Exp $
+# $Id: MySQL.pm,v 1.29 2003-08-08 22:22:51 kycl4rk Exp $
# -------------------------------------------------------------------
# Copyright (C) 2003 Ken Y. Clark <kclark@cpan.org>,
# darren chamberlain <darren@cpan.org>,
use strict;
use vars qw[ $DEBUG $VERSION $GRAMMAR @EXPORT_OK ];
-$VERSION = sprintf "%d.%02d", q$Revision: 1.28 $ =~ /(\d+)\.(\d+)/;
+$VERSION = sprintf "%d.%02d", q$Revision: 1.29 $ =~ /(\d+)\.(\d+)/;
$DEBUG = 0 unless defined $DEBUG;
use Data::Dumper;
statement : comment
| use
+ | set
| drop
| create
| <error>
use : /use/i WORD ';'
+set : /set/i /[^;]+/ ';'
+
drop : /drop/i WORD(s) ';'
create : CREATE /database/i WORD ';'
comment : /^\s*(?:#|-{2}).*\n/ {
my $comment = $item[1];
- $comment =~ s/^\s*(#|-{2})//;
+ $comment =~ s/^\s*(#|-{2})\s*//;
$comment =~ s/\s*$//;
$return = $comment;
}