I have a 26KB grammar file that needs to be precompiled using the special magic that Parse::RecDescent provides us using the command:

perl -MParse::RecDescent - myfile.pl My::Compiled::Grammar

When running this script on "myfile.pl", the system chugs away (for at least 30 seconds or so, with the typical 95+% CPU usage), creating the Grammar.pm file... but it's incomplete... the app doesn't quit and instead seems like it's still chugging away. The total memory usage then hits at least 950MB (tonnes of disk swapping starts going on), while the Perl process now sits at only a few percent CPU usage... after about 5 minutes, I'll do a CTRL-C at the command-line and look at the Grammar file, but it's incomplete... I can tell that by the mismatched parentheses and just by looking you know it didn't really finish...

Should I have continued waiting for it finish up? Or is there a problem with the size of my grammar? I didn't get any warnings when doing the pre-compile, and running it in my own file there are no warnings as well.

I'm running this on ActivePerl 5.6.1 on a Win2K box and the latest version of Parse::RecDescent.

Any ideas? Anyone want access to the file so they can see if it precompiles on their box? Perhaps a UNIX box could do the trick? I dunno, but I gotta get this precompiled because it takes over 10 seconds each time I run my app.


In reply to Parse::RecDescent Precompiler Issues - It Hangs on Large Grammar by Incognito

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.