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.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.