Thanks once again @guy038. Your valuable suggestions/corrections have been incorporated once again:
<parser displayName="CiCode" id ="cicode_function" commentExpr="(?x) # free-spacing for commenting (?s:\x2F\x2A.*?\x2A\x2F) # Multi Line Comment: /* ... */ | (?m-s:\x2F{2}.*$) # Single Line Comment: // ... | (?m-s:\!.*$) # Single Line Comment: ! ... | (?s:\x22(?:[^\x22\x5C]|\x5C.)*\x22) # String Literal - Double Quoted | (?s:\x27(?:[^\x27\x5C]|\x5C.)*\x27) # String Literal - Single Quoted " > <function mainExpr="(?x) # free-spacing for commenting (?i) # ignore case FUNCTION\s+ # CiCode functions marked by keyword 'function' (any case) \K # discard everything matched so far - 'function' keyword not part of function name \w+? # function name itself (non-greedy match) \(.*?\) # function parameter list surrounded by brackets " /> </parser>This is my latest version of the parser with a proper commentExpr parser. (CiCode supports C-style comments with the addition of !<comment-to-end-of-line> being synonymous with //<comment-to-end-of-line>.
One of my files does indeed have several commented functions - these are now correctly ignored. Thanks again.