Subject: | Bug in DBIx::MyParsePP - FETCH not parsed |
Date: | Thu, 27 Oct 2011 10:02:19 -0700 (PDT) |
To: | "bug-DBIx-MyParsePP [...] rt.cpan.org" <bug-DBIx-MyParsePP [...] rt.cpan.org> |
From: | Ze'ev Atlas <zatlas1 [...] yahoo.com> |
Sir
There appears to be an issue with FETCH statement. When I try to parse any perfectly correct FETCH statement such as:
FETCH POSTRN INTO XXX_HOST_VAR1 ,XXX_HOST_VAR2
and then do
Show quoted text
________________________________
Code
________________________________
my $query = $parser->parse($sql);
if (defined ($query))
{
if (not defined $query->root())
{
print "Error at pos ".$query->pos().", line ".$query->line()."\n";
my $x = $query->expected();
print "Expected\n";
print Dumper ($x);
$x = $query->actual();
print "Actual\n";
print Dumper (\$x);
...
}
else
{
...
________________________________
Error at pos 5, line 1
Expected $VAR1 = [ 'SET', 'CHECK_SYM', 'REPLACE', 'BACKUP_SYM', 'FLUSH_SYM', 'GRANT', 'ANALYZE_SYM', 'COMMIT_SYM', 'CALL_SYM', 'REPAIR', 'PURGE', 'HANDLER_SYM', 'CHANGE', 'SHOW', 'ROLLBACK_SYM', 'EXECUTE_SYM', 'DROP', 'RESET_SYM', 'RENAME', 'ALTER', 'USE_SYM', 'DO_SYM', 'LOAD', 'LOCK_SYM', '(', 'START_SYM', 'DELETE_SYM', 'TRUNCATE_SYM', 'HELP_SYM', 'SLAVE', 'SAVEPOINT_SYM', 'KILL_SYM', 'UPDATE_SYM', 'BEGIN_SYM', 'SELECT_SYM', 'INSERT', 'RESTORE_SYM', 'DEALLOCATE_SYM', 'DESC', 'RELEASE_SYM', 'REVOKE', 'CACHE_SYM', 'UNLOCK_SYM', 'XA_SYM', 'OPTIMIZE', 'PREPARE_SYM', 'CHECKSUM_SYM', 'CREATE', 'STOP_SYM', 'DESCRIBE', 'END_OF_INPUT' ];
Actual $VAR1 = \bless( [ 'FETCH_SYM', 'FETCH' ], 'DBIx::MyParsePP::Token' ); What am I doing wrong, or alternatively, is that a known issue? ThanksĀ
ZAI get this