in reply to Re: nested parsing with Parse::RecDescent
in thread nested parsing with Parse::RecDescent

Your assumptions have been right on. I actually figured out my problem just before checking back here. My productions (i think that is the proper term) for Line were not prioritized properly with the greediest first. I also had to modify my regex for Text. My grammar definition now looks like this:
my $grammar = q{ {my $re_type = qr /.::/ } Document : Element(s) Element : Header Body Header : Element_Type Options(?) Element_Type: /$re_type/ Options : '(' Arg(s) ')' Arg : /\b(\w+)\s*=\s*(\w+)\s*/xms Body : '{' Line(s) '}' <commit> Line : Element | Text Line | Text Text :/[^\{\}]*\n/xms };
My only concern now is that my current definition for Text is still not exactly right. Instead of matching everything but the braces, I would rather include everything up to, but not including the closing brace or up or a nested Q:: element. I'm sure there's a way to do this, but I'm still working on mastering regex as well. All in good time eh? Anyway, thanks for the advice Philcrow, and also everyone else that offered the helpful tips directly or inderectly related to the problem :)