I absolutely don't mind. Actually I am extremely happy I got an answer like this. Thank you a ton, it is full of very helpful advices. Particularly I had no idea I can add a closure to the grammar and use it as part of a virtual main package (I did not find it nowhere in the docs).
I have an additional question if you do not mind. Can you decipher this:
line : '' # Skip blank lines.
<skip:'[ \t]*'> # Don't treat newlines as whitespace
+.
key_value /\n/
<skip: $item[2]>
{ $item[3] }
for me please? I particularly do not understand the '' construct (it will always match right?) neither do I understand how can you have several tokens in one rule without the | mark (you have '' then a skip pragma then key_value then /\n/ and then another skip pragma)
Once again thanks a lot for the insights!
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.