Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Perhaps it would help if you tried to give a brief description of what your grammar is supposed to handle. Apart from that, it looks like the initial part of your grammar goes wrong in the trace, and there are some likely suspects in the first rule:

  • there is a strandard single-quote character just before $item[2]
  • you're using curly braces, which I think are supposed to be used for bracketing snippets of perl code, but there is no perl code inside them
  • there are parens around a set of "|"-conjoined elements, then some other stuff ouside the parens, which may just be uninterpretable.

I'm already way over my head here -- to date, I've only looked at the PRD man page (I've never written code to use it), and have used lex/yacc only rarely, in a previous life, so one or more of the above items may be a false lead.

Have you arrived at this grammar via a series of preliminary and intermediate steps, building it up from pieces that you have tried successfully? Or have you just created the whole thing from scratch, without testing any single component by itself, and you're now trying to debug the whole thing at once?

Naturally, I'd recommend the former approach if you haven't tried it. Start with something small and constrained (but relevant) -- feed it with equally constrained input if that helps -- then build up incrementally; when you hit a snag, show us what you have, indicating which parts are known to be working, and what incremental piece introduced the snag.


In reply to Re: Parse::RecDescent eats large part of grammar, thinking it to be implicit subrule by graff
in thread Parse::RecDescent eats large part of grammar, thinking it to be implicit subrule by premchai21

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-20 14:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found