functionList.xml parser classRange for "UniVerse BASIC" (VBScript)



  • Hello!

    Trying to build a class parser for VBScript looking like:

    Class test1    
        Private Sub Class_Initialize()
        end Sub
    End Class
    

    I got one:

                <classRange
    				mainExpr    ="(?mix)                                             
    					\b(?:class)\b                             
    					(?s:.*?)
    					\b(?:end\s+class)\b"									
    			>									 
    				<className>							
    					<nameExpr expr="(?mix)^\bclass\s+\w+" />  						 			
    				</className>
    				<function 
    					mainExpr="(?mix)\b(public|private)*\s*(property)*\s*(function|sub|get|set)\s+\w+\s*\("
    				>					
    					<functionName>
    						<funcnameExpr expr="(?i)((set|get)\s+)?\w+\s*\(" />	
    						<funcnameExpr expr="(?i)((set|get)\s+)?\w+\s*" />
    					</functionName>
    				</function>
    			</classRange>
    

    But it’s not working. What’s wrong?

    I tested it in regular expressions online and it works in parts.