Author Topic: Notepad+++  (Read 9268 times)

0 Members and 1 Guest are viewing this topic.

ChrisCarlson

  • Guest
Notepad+++
« on: March 26, 2015, 09:42:09 AM »
Does anyone have a function parser (functionList.xml) for notepad+++?

huiz

  • Swamp Rat
  • Posts: 913
  • Certified Prof C3D
Re: Notepad+++
« Reply #1 on: March 26, 2015, 09:45:12 AM »
Here is one.
The conclusion is justified that the initialization of the development of critical subsystem optimizes the probability of success to the development of the technical behavior over a given period.

ChrisCarlson

  • Guest
Re: Notepad+++
« Reply #2 on: March 26, 2015, 10:00:39 AM »
Looks to be the "stock" functionList.xml file?

My regex skills are severely lacking but I think it would be something along these lines?

Code: [Select]

<association ext = ".lsp" id="autolisp_function"/>

<parser id="autolisp_function" displayname="AutoLisp">
<function
mainExpr="mainExpr="/([(defun])\w+$/ig"
displayMode="$functionName">
        <functionName>
<nameExpr expr="/[_]\w+/igm"/>
</functionName>
</function>
</parser>


But that's not it :confused:
« Last Edit: March 26, 2015, 10:22:39 AM by ChrisCarlson »

huiz

  • Swamp Rat
  • Posts: 913
  • Certified Prof C3D
Re: Notepad+++
« Reply #3 on: March 26, 2015, 10:56:36 AM »
Looks to be the "stock" functionList.xml file?

..

You didn't want that one?
The conclusion is justified that the initialization of the development of critical subsystem optimizes the probability of success to the development of the technical behavior over a given period.

ChrisCarlson

  • Guest
Re: Notepad+++
« Reply #4 on: March 26, 2015, 12:13:44 PM »
No, that file comes default with the installation. The end user has the ability to add in custom function traps. Which in turn, add the function to the function list for easy finding or referencing.

huiz

  • Swamp Rat
  • Posts: 913
  • Certified Prof C3D
Re: Notepad+++
« Reply #5 on: March 26, 2015, 01:14:23 PM »
In your AppData path you can find the personal file which you can edit. Mine is exact the same as the original so I never added or changed something :-)

The conclusion is justified that the initialization of the development of critical subsystem optimizes the probability of success to the development of the technical behavior over a given period.

ymg

  • Guest
Re: Notepad+++
« Reply #6 on: March 27, 2015, 03:06:56 PM »
Chris,

Not too good at regex but this one
seems to work for me.

Code: [Select]
<parser id="lisp_function" displayName="Lisp">
<function
mainExpr="[ \t]*\([ \t]*defun[ \t][a-zA-Z0-9_+\-*/<>=:.!?@%&|]+"
displayMode="$className->$functionName">
</function>
</parser>

Also added the following line in association

Code: [Select]
<association langID="30" id="lisp_function"/>
Probably would need to add a regex to catch the comments.

ymg
« Last Edit: March 27, 2015, 03:24:43 PM by ymg »

ymg

  • Guest
Re: Notepad+++
« Reply #7 on: March 27, 2015, 03:40:21 PM »
Chris,

Here, may be a bit better with the argument to the function.

Code: [Select]
<parser id="lisp_function" displayName="Lisp">
     <function
  mainExpr="[ \t]*\([ \t]*defun[ \t]+[a-zA-Z0-9_+\-*/<>=:.!?@%&|]+[ \t]+\([a-zA-Z0-9_+\-*/<>=:.!?@%&| \t]*\)"
displayMode="$className->$functionName">
     </function>
</parser>

ChrisCarlson

  • Guest
Re: Notepad+++
« Reply #8 on: March 27, 2015, 03:49:10 PM »
Very nice! Thanks!

ymg

  • Guest
Re: Notepad+++
« Reply #9 on: March 28, 2015, 04:24:18 AM »
Chris,

This regex
Code: [Select]
(?s);\|.*?\|; will find multiple lines comments,

while this one
Code: [Select]
;.*$ will find single-line comment.

However, I could not make it work in the parser for Function list.
Maybe you have better luck than me.

ymg

ymg

  • Guest
Re: Notepad+++
« Reply #10 on: March 28, 2015, 03:21:05 PM »
Chris,

Here the parser with a much simpler regex.

Code: [Select]
                        <parser id="lisp_function" displayName="Lisp">
<function
     mainExpr="\(defun.*?\)"
     displayMode="$functionName">
</function>
</parser>

Still haven't found the trick to exclude comments though.

And a few regex that could be handy in Autolisp:

Single Line Comments in Autolisp:       ;.*$                               
Multiple Lines Comments Autolisp:       (?s);\|.*?\|;                 
Comments Single or Multilines:            (((?s);\|.*?\|;)|(;.*$)) 
Function Name with Parameters:         \(defun.*?\)                   
Function Name without (defun  :         (?<=defun).*?\)           
Within Double or Single Quotes:          (["'])(\\?.)*?\1               
Within Balanced Parentheses:              \((?>[^()]|(?R))*\)       



Most of the above was pulled or derived  from http://www.regular-expressions.info

ymg
« Last Edit: March 31, 2015, 10:56:46 AM by ymg »

77077

  • Guest
Re: Notepad+++
« Reply #11 on: May 27, 2015, 08:46:39 PM »
New version no function list plug-in  ,I still use old version

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Notepad+++
« Reply #12 on: May 28, 2015, 11:51:33 PM »
New version no function list plug-in  ,I still use old version
In the latest version V6.7.8.2 the function list works just fine.

77077

  • Guest
Re: Notepad+++
« Reply #13 on: May 29, 2015, 03:21:18 AM »
New version no function list plug-in  ,I still use old version
In the latest version V6.7.8.2 the function list works just fine.

I just download v6.7.8.2  , but function list  is  null

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Notepad+++
« Reply #14 on: May 29, 2015, 07:52:26 AM »
@ 77077: Can you post your functionList.xml?