comment: c_comment | line_comment c_comment: qr! /\* # C-Style comments open with a "/*"... (?: # followed by... [^*] # non-"*" characters | \*(?=[^\/]) # or a "*" and a non-slash character )* \*/ # ...and closed by a "*/" !x; line_comment: qr!//[^\n]*!; #### # Yuck! rule1: comment(s?) subrule1 | comment(s?) subrule2 rule1: comment(s?) subrule3 comment(s?) subrule4 #### setting = ( sub-setting1 = "value1"; optimize = "12"; // unreliable! /* foo = "bar"; Commented out, not working right now*/ ); #### setting = ( sub-setting1 = "value2"; optimize = "12"; // unreliable! /* foo = "bar"; Commented out, not working right now*/ );