Runtime Error in Perl 
Author Message
 Runtime Error in Perl

I have huge problem when parsing SGML documents:

This is what I want to do:

I want to go through a SGML document and extract the complicated, sometimes
nested structures such as lists, equations and tables: The script puts the
structures (numbered as <objsrcN></objsrcN> in one file and then links back
to main document with <objdestN> or into another <objsrc!N> obj. Here's my
problem.

When parsing small documents the script executes with no problem, but raises
Runtime Error when parsing bigger documents. There seems to be a 2^16 limit
for matching.

I would be really grateful for ideas or any help.
Niclas Lindberg.

If you have any suggestions please mail me, because I don't have news on my
computer. Thank you very much.

The sourcecode:

    $globaladress = 0;

    $tagor=$taglist[0];

            $tagor=$tagor."\|".$actualtag;
    }

    sub adressing {
        $globaladress++;

        print OUTPFOBJ
"<OBJSRC$globaladress>\n$eexpr\n</OBJSRC$globaladress>\n\n";
        return "<OBJDEST$globaladress>";
    }

    for ($src) {
        while (m#<$tagor#gsi){

s#(<$actualtag([^<]*?(?:(?!<$tagor).)*?)</$actualtag>)##&adressing($1)gse;
            }
        }
    } # End for



Fri, 13 Oct 2000 03:00:00 GMT  
 Runtime Error in Perl

Quote:

> When parsing small documents the script executes with no problem, but raises
> Runtime Error when parsing bigger documents.

What runtime error is this, and have you seen what perldiag has to say
about it?

Quote:
> There seems to be a 2^16 limit for matching.

There _are_ limits to the abilities of regular expressions, but that's not
a limit that's generally a problem.

Good luck with it!

--
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



Fri, 13 Oct 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Runtime error in Perl executable

2. HELP WANTED: runtime error message: VARIABLE ERROR.

3. Win32::AdminMisc and "error: Runtime Error"

4. Help w/newbie Perl runtime Error

5. Help w/newbie Perl runtime Error

6. perl, tk, ftp runtime error

7. EventLog Gets Runtime Exception Error

8. ExtUtils::MakeMaker runtime error

9. Runtime Error in LanMan EnumShares

10. HELP! Runtime Exception Error

11. Error : Runtime exception with Win32::ODBC

12. Error : Runtime exception with win32Api...

 

 
Powered by phpBB® Forum Software