Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Notepad++ functions list

695 views
Skip to first unread message

oc_forums

unread,
Sep 3, 2013, 8:38:53 AM9/3/13
to
Hi,

From version 6.4.3 the new feature "function list" seems usable. ( http://notepad-plus-plus.org/features/function-list.html ). I want to list everything that is a procedure so I added in the file functionList.xml the following lines :

After the association map :
--------------------------

<association langID = "29" id="tcl_procedure"/>

And then, in the parser section, the lines :
--------------------------------------------

<parser id="tcl_procedure" displayName="Tcl source" commentExpr="(#)">
<function
mainExpr="^[\t ]*((proc)[\s]+)"
displayMode="$className->$functionName">
<functionName>
<nameExpr expr="([\w]|:)+"/>
</functionName>
<className>
<nameExpr expr="[\w_]+"/>
</className>
</function>
</parser>

But the display only gives :
--------------------------------

-- (Filename)
-----"proc" as a class
------- proc
------- proc
------- .... (there is a proc foreach procedure that has been found )

I cannot catch the name of the procedure.

Has anyone tried to use this feature ( with success ;-) ) ?

Thanks,

Olivier.

DDG

unread,
Sep 13, 2013, 4:35:27 AM9/13/13
to
Hi Olivier,

Indeed Npp looks promising with the function list.

You made the error of just grabbing only the (proc) part in the main expression.

This works for me:

<parser id="tcl_procedure" displayName="Tcl source" commentExpr="(#)">
<function
mainExpr="^[\t ]*((proc)[\s]+)[^\n]+\{"
displayMode="$className->$functionName">
<functionName>
<nameExpr expr="[\w: ]+ \{.*\}"/>
</functionName>
<className>
<nameExpr expr="[\w_]+"/>
</className>
</function>
</parser>

It would be rather nice to extend this for Itcl and the Other OO-frameworks writing the mixed parser.

regards,
Detlef

ema...@gmail.com

unread,
Nov 14, 2013, 11:46:07 AM11/14/13
to
Op dinsdag 3 september 2013 14:38:53 UTC+2 schreef oc_forums:

oc_forums

unread,
Nov 15, 2013, 4:46:09 AM11/15/13
to
Hi Detlef ,

>
> You made the error of just grabbing only the (proc) part in the main expression.
>

Thank you for the hint and help, it works fine now ! Concerning object procedures, I am not used to it , and the number of writing possibilities would be puzzling to me.

Best regards,

Olivier

aw99

unread,
Apr 18, 2014, 5:46:31 AM4/18/14
to
Hi Guys,
I've created a functionList.xml which supports Tcl and Bash. You can download it from my site: http://99-developer-tools.com/notepad-function-list-tcl-bash/
Best Regards, Andreas


aw99

unread,
Apr 18, 2014, 7:28:16 AM4/18/14
to

oc_forums

unread,
Apr 18, 2014, 2:51:55 PM4/18/14
to

>
> I've created a functionList.xml which supports Tcl and Bash. You can download it from my site: http://99-developer-tools.com/notepad-function-list-tcl-bash/
>
> Best Regards, Andreas

Hi,

I've tried it : replacing only the Tcl part, or using your file available for download. It keeps crashing on 6.4.3 version of NotePad++ though it works well with Detlef version. What version of NotePad++ are you using ?

Olivier

aw99

unread,
Apr 21, 2014, 7:42:00 PM4/21/14
to
Hi Olivier,

Oh, shi**. I'm using 6.5.5.
Andreas


aw99

unread,
Apr 21, 2014, 7:43:38 PM4/21/14
to
Hi Olivier,
I've rechecked this, you are right. My functionList.xml does not work with Npp 6.4.3. It does work at least with versions 6.4.5, 6.5 and 6.5.5, though.
Regards, Andreas


che2n

unread,
Jun 2, 2020, 6:00:10 PM6/2/20
to
I have added TclOO and namespace. methods, constructor, destructor should be visible and nested, but there is no multi-level nesting.



<parser id="tcl_procedure" displayName="TCL" commentExpr="(#)">
<classRange
mainExpr="^[\t ]*((oo::class[\s]+create)|(namespace[\s]+eval))[\s]+[^\n]+\{"
openSymbole = "\{"
closeSymbole = "\}"
displayMode="node">
<className>
<nameExpr expr="(create|eval)[\t ]+[\w:_\-.]+"/>
<nameExpr expr="[\t ]+[\w:]+"/>
<nameExpr expr="[\w:]+"/>
</className>
<function
mainExpr="^[\t ]*(((proc|method)\s+[\x21-\x7E]+)|constructor|destructor)[^\n]+?\{">
<functionName>
<funcNameExpr expr="[\w_\-.]+[\s]+\{"/>
<funcNameExpr expr="[\w_\-.]+"/>
</functionName>
</function>
</classRange>
<function
mainExpr="^[\t ]*(((proc|method)\s+[\x21-\x7E]+)|constructor|destructor)[^\n]+?\{"
displayMode="$className->$functionName">
<functionName>
<nameExpr expr="[\w_\-.]+[\s]+\{"/>
<nameExpr expr="[\w_\-.]+"/>
</functionName>
<className>
<nameExpr expr="([\w_\-.]+((::[\w_\-.]+)+)?)(?=[\s]*::)"/>
</className>
</function>
</parser>
0 new messages