CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
DBIx::myParsePP issue

 



zatlas1
Novice

Oct 26, 2011, 2:51 PM

Post #1 of 1 (690 views)
DBIx::myParsePP issue Can't Post

Hi all
SQL::Statement did not do it for me, so I switched to DBIx::myParsePP. This works quite well as far as MySQL syntax is concerned. There appears to be an issue with FETCH statement. When I try to parse any perfectly correct FETCH statement:
FETCH POSTRN INTO XXX_HOST_VAR1 ,XXX_HOST_VAR2
and then do

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
{
...


I get this

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
ZA

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives