in reply to Raw Text and Parse::RecDescent
The idea is to only skip lines that have no closing brace within them. If the line does have a closing brace, script_line will fail, and after eating whitesapce, the closing brace will match. (Apologies if this isn't correct syntax; I have never used Parse::RecDescent before.)script_body: '{' script_line(s?) /\s*/s '}' script_line: <skip: ''> /\s*/s /[^}]*/
If script lines can contain closing braces, then you will need to do a bit more parsing (matching braces, etc.)
-Mark
|
|---|