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