[UPDATE] Enhance C++ parser for function list.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1051 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2013-05-30 21:22:45 +00:00
parent 3d7183e494
commit 03b2582a6c

View File

@ -37,22 +37,22 @@
<nameExpr expr="[\w]+"/> <nameExpr expr="[\w]+"/>
</className> </className>
<function <function
mainExpr="^[\t ]*((static|const|virtual)[\s]+)?[\w]+([\s]+|\*[\s]+|[\s]+\*|[\s]+\*[\s]+)([\w_]+[\s]*::)?(?!(if|whil|for))[\w_]+[\s]*\([\n\w_,*&amp;\s]*\)([\s]*const[\s]*)?[\n\s]*\{"> mainExpr="^[\t ]*((static|const|virtual)[\s]+)?([\w]+([\s]+|\*[\s]+|[\s]+\*|[\s]+\*[\s]+))?([\w_]+[\s]*::)?(?!(if|while|for|switch))[\w_~]+[\s]*\([\n\w_,*&amp;\s]*\)([\s]*const[\s]*)?[\n\s]*\{">
<functionName> <functionName>
<funcNameExpr expr="(?!(if|whil|for))[\w_]+[\s]*\("/> <funcNameExpr expr="(?!(if|while|for|switch))[\w_~]+[\s]*\("/>
<funcNameExpr expr="(?!(if|whil|for))[\w_]+"/> <funcNameExpr expr="(?!(if|while|for|switch))[\w_~]+"/>
</functionName> </functionName>
</function> </function>
</classRange> </classRange>
</parser> </parser>
<parser id="c_function" displayName="C source"> <parser id="c_function" displayName="C source">
<function <function
mainExpr="^[\t ]*((static|const|virtual)[\s]+)?[\w]+([\s]+|\*[\s]+|[\s]+\*|[\s]+\*[\s]+)([\w_]+[\s]*::)?(?!(if|whil|for))[\w_]+[\s]*\([^\)\(]*\)([\s]*const[\s]*)?[\n\s]*\{" mainExpr="^[\t ]*((static|const|virtual)[\s]+)?[\w]+([\s]+|\*[\s]+|[\s]+\*|[\s]+\*[\s]+)([\w_]+[\s]*::)?(?!(if|while|for|switch))[\w_~]+[\s]*\([^\)\(]*\)([\s]*const[\s]*)?[\n\s]*\{"
displayMode="$className->$functionName"> displayMode="$className->$functionName">
<comment expr="((/\*.*?\*)/|(//.*?$))" /> <comment expr="((/\*.*?\*)/|(//.*?$))" />
<functionName> <functionName>
<nameExpr expr="(?!(if|whil|for))[\w_]+[\s]*\("/> <nameExpr expr="(?!(if|while|for|switch))[\w_~]+[\s]*\("/>
<nameExpr expr="(?!(if|whil|for))[\w_]+"/> <nameExpr expr="(?!(if|while|for|switch))[\w_~]+"/>
</functionName> </functionName>
<className> <className>
<nameExpr expr="[\w_]+(?=[\s]*::)"/> <nameExpr expr="[\w_]+(?=[\s]*::)"/>
@ -66,8 +66,8 @@
mainExpr="function[\s]+[\w]*[\s]+\([^\)\(]*\)[\n\s]*\{" mainExpr="function[\s]+[\w]*[\s]+\([^\)\(]*\)[\n\s]*\{"
displayMode="$className->$functionName"> displayMode="$className->$functionName">
<functionName> <functionName>
<nameExpr expr="(?!(if|whil|for))[\w_]+[\s]*\("/> <nameExpr expr="(?!(if|while|for))[\w_]+[\s]*\("/>
<nameExpr expr="(?!(if|whil|for))[\w_]+"/> <nameExpr expr="(?!(if|while|for))[\w_]+"/>
</functionName> </functionName>
<className> <className>
<nameExpr expr="[\w_]+(?=[\s]*::)"/> <nameExpr expr="[\w_]+(?=[\s]*::)"/>
@ -89,20 +89,20 @@
<nameExpr expr="[\w]+"/> <nameExpr expr="[\w]+"/>
</className> </className>
<function <function
mainExpr="^[\t ]*((static|const|virtual)[\s]+)?[\w]+([\s]+|\*[\s]+|[\s]+\*|[\s]+\*[\s]+)([\w_]+[\s]*::)?(?!(if|whil|for))[\w_]+[\s]*\([^\)\(]*\)([\s]*const[\s]*)?[\n\s]*\{"> mainExpr="^[\t ]*((static|const|virtual)[\s]+)?([\w]+([\s]+|\*[\s]+|[\s]+\*|[\s]+\*[\s]+))?([\w_]+[\s]*::)?(?!(if|while|for|switch))[\w_~]+[\s]*\([^\)\(]*\)([\s]*const[\s]*)?[\n\s]*\{">
<functionName> <functionName>
<funcNameExpr expr="(?!(if|whil|for))[\w_]+[\s]*\("/> <funcNameExpr expr="(?!(if|while|for|switch))[\w_~]+[\s]*\("/>
<funcNameExpr expr="(?!(if|whil|for))[\w_]+"/> <funcNameExpr expr="(?!(if|while|for|switch))[\w_~]+"/>
</functionName> </functionName>
</function> </function>
</classRange> </classRange>
<function <function
mainExpr="^[\t ]*((static|const|virtual)[\s]+)?[\w]+([\s]+|\*[\s]+|[\s]+\*|[\s]+\*[\s]+)([\w_]+[\s]*::)?(?!(if|whil|for))[\w_]+[\s]*\([^\)\(]*\)([\s]*const[\s]*)?[\n\s]*\{" mainExpr="^[\t ]*((static|const|virtual)[\s]+)?([\w]+([\s]+|(\*|&)[\s]+|[\s]+(\*|&)|[\s]+(\*|&)[\s]+))?([\w_]+[\s]*::)?(?!(if|while|for|switch))[\w_~\+\*\-=\!]+[\s]*\([^\)\(]*\)([\s]*(const|(:[^\{]+))[\s]*)?[\n\s]*\{"
displayMode="$className->$functionName"> displayMode="$className->$functionName">
<comment expr="((/\*.*?\*)/|(//.*?$))" /> <comment expr="((/\*.*?\*)/|(//.*?$))" />
<functionName> <functionName>
<nameExpr expr="(?!(if|whil|for))[\w_]+[\s]*\("/> <nameExpr expr="(?!(if|while|for|switch))[\w_~\+\*\-=\!]+[\s]*\("/>
<nameExpr expr="(?!(if|whil|for))[\w_]+"/> <nameExpr expr="(?!(if|while|for|switch))[\w_~\+\*\-=\!]+"/>
</functionName> </functionName>
<className> <className>
<nameExpr expr="[\w_]+(?=[\s]*::)"/> <nameExpr expr="[\w_]+(?=[\s]*::)"/>