Hello, @robin-melin, @peterjones and All,
Okay, I understood the problem ! In two locations of, both, the @robin-melin’s vb.xml file and the @MAPJe71’s vb-3.0.FL.xml file, we have an ending regex part (?=[\t ]*\()
The correct regex should be (?=[\t ]*\(|$) !!
So, here is, first, the corrected contents of the @MAPJe71’s vb-3.0.FL.xml file, where I used a 4 spaces indentation :
<?xml version="1.0" encoding="UTF-8" ?> <NotepadPlus> <functionList> <!-- =================================================== [vb_function] --> <parser id="vb_function" displayName="Visual Basic (.NET|Script|for Applications)" commentExpr="(?m:((?<=').*?$)|((?i:REM)([\t ].*?)?$))"> <classRange mainExpr="(?s:(?<SCOPE>(?i:CLASS|TYPE)).*?(?i:END[\t ]\k<SCOPE>))" displayMode="node" > <className> <nameExpr expr="(?i:CLASS|TYPE)[\t ]+(?:[A-Za-z_][\w]*\b)(?:.*?[\r\n])" /> <nameExpr expr="[\t ]+(?:[A-Za-z_][\w]*\b)" /> <nameExpr expr="[A-Za-z_][\w]*" /> </className> <function mainExpr="(?m:^[\t ]*(?i:(?:(?:PRIVATE|PROTECTED|PUBLIC)[\t ]+)?(?:STATIC[\t ]+)?(?:SUB|FUNCTION|PROPERTY)).*?(?:\(|$))" > <functionName> <funcNameExpr expr="(?i:(?:(?:PRIVATE|PROTECTED|PUBLIC)[\t ]+)?(?:STATIC[\t ]+)?(?:SUB|FUNCTION|PROPERTY)).*?(?:\(|$)"/> <funcNameExpr expr="(?i:(?:SUB|FUNCTION|PROPERTY)).*?(?:\(|$)"/> <funcNameExpr expr="[A-Za-z_][\w]*(?=[\t ]*\(|$)"/> </functionName> </function> </classRange> <function mainExpr="^[\t ]*(?i:(?:(?:PRIVATE|PROTECTED|PUBLIC)[\t ]+)?(?:STATIC[\t ]+)?(?:SUB|FUNCTION|PROPERTY))[\t ].*?[A-Za-z_][\w]*(?:[\t ]*\(|$)" displayMode="$functionName"> <functionName> <nameExpr expr="(?i:(?:(?:PRIVATE|PROTECTED|PUBLIC)[\t ]+)?(?:STATIC[\t ]+)?(?:SUB|FUNCTION|PROPERTY))[\t ].*?[A-Za-z_][\w]*(?:[\t ]*\(|$)"/> <nameExpr expr="(?i:(?:SUB|FUNCTION|PROPERTY))[\t ].*?[A-Za-z_][\w]*(?:[\t ]*\(|$)"/> <nameExpr expr="[A-Za-z_][\w]*(?=[\t ]*\(|$)"/> </functionName> </function> </parser> </functionList> </NotepadPlus>And secondly, here is the corrected contents of the @robin-melin’s vb.xml file, where I used a 1 tabulation indentation :
<?xml version="1.0" encoding="UTF-8" ?> <NotepadPlus> <functionList> <!-- ========================================================= [ VB ] --> <parser id ="vb_function" displayName="Visual Basic (.NET|Script|for Applications)" commentExpr="(?m:((?<=').*?$)|((?i:REM)([\t ].*?)?$))"> <classRange mainExpr="(?s:(?<SCOPE>(?i:CLASS|TYPE)).*?(?i:END[\t ]\k<SCOPE>))" displayMode="node" > <className> <nameExpr expr="(?i:CLASS|TYPE)[\t ]+(?:[A-Za-z_][\w]*\b)(?:.*?[\r\n])" /> <nameExpr expr="[\t ]+(?:[A-Za-z_][\w]*\b)" /> <nameExpr expr="[A-Za-z_][\w]*" /> </className> <function mainExpr="(?m:^[\t ]*(?i:(?:(?:PUBLIC|PRIVATE|PROTECTED|FRIEND|PROTECTED FRIEND)[\t ]+)?(?:(?:STATIC|SHARED|SHADOWS|OVERRIDABLE|OVERRIDES|READONLY|WRITEONLY)[\t ]+)?(?:SUB|FUNCTION|PROPERTY)).*?(?:\(|$))" > <functionName> <funcNameExpr expr="(?i:(?:(?:PUBLIC|PRIVATE|PROTECTED|FRIEND|PROTECTED FRIEND)[\t ]+)?(?:STATIC[\t ]+)?(?:SUB|FUNCTION|PROPERTY)).*?(?:\(|$)"/> <funcNameExpr expr="(?i:(?:SUB|FUNCTION|PROPERTY)).*?(?:\(|$)"/> <funcNameExpr expr="(?i:(?:GET|LET|SET)[\t ]+)?[A-Za-z_][\w]*(?=[\t ]*\(|$)"/> </functionName> </function> </classRange> <function mainExpr="^[\t ]*(?i:(?:(?:PUBLIC|PRIVATE|PROTECTED|FRIEND|PROTECTED FRIEND)[\t ]+)?(?:(?:STATIC|(?:DECLARE(?:[\t ]+(?:ANSI|UNICODE|AUTO))?))[\t ]+)?(?:SUB|FUNCTION|PROPERTY)).*?(?:\(|$)" displayMode="$functionName"> <functionName> <nameExpr expr="(?i:(?:(?:PUBLIC|PRIVATE|PROTECTED|FRIEND|PROTECTED FRIEND)[\t ]+)?(?:(?:STATIC|(?:DECLARE(?:[\t ]+(?:ANSI|UNICODE|AUTO))?))[\t ]+)?(?:SUB|FUNCTION|PROPERTY)).*?(?:\(|$)"/> <nameExpr expr="(?i:(?:SUB|FUNCTION|PROPERTY)).*?(?:\(|$)"/> <nameExpr expr="(?i:(?:GET|LET|SET)[\t ]+)?[A-Za-z_][\w]*(?i:[\t ]+(LIB|ALIAS)[\t ]+[\w"\.]+)*(?=[\t ]*\(|$)"/> </functionName> </function> </parser> </functionList> </NotepadPlus>Robin, I tested your two examples as well as the Peter’s one and everthing is OK, whatever the vb parsing rules file used !
Best Regards,
guy038