You are here: PSPad forum > English discussion forum > Write a custom Code Explorer parser?

Write a custom Code Explorer parser?

#1 Write a custom Code Explorer parser?

Posted by: jeki | Date: 06/25/2018 07:09 | IP: IP Logged

I use PSPad for for a specific scripting language of a product in use in our company.

So i used as Code Explorer "ftVBS". Function in our Language will so mapped. Know I want to expand the possibilities of the Code Explorer to get better overview over our scripts
at a glance.

It is possible to write own Code Explorer?

-> I found responses in the forum that indicate that isn't possible to wirte own Code Explorer...but, wouldn't it be a powerfull capability of PSPad, if it is possible to expand the Code Explorer?

Options: Reply | Quote | Up ^


#2 Re: Write a custom Code Explorer parser?

Posted by: pspad | Date: 06/25/2018 07:25 | IP: IP Logged

No, there is no possibility to write own code explorer yet.
If you will send me source samples and description wjat do you want to see in code explorer window, I will add new code explorer for you

Options: Reply | Quote | Up ^


#3 Re: Write a custom Code Explorer parser?

Posted by: Gabriel_ACE | Date: 06/28/2018 18:04 | IP: IP Logged

jeki:
I use PSPad for for a specific scripting language of a product in use in our company.

So i used as Code Explorer "ftVBS". Function in our Language will so mapped. Know I want to expand the possibilities of the Code Explorer to get better overview over our scripts
at a glance.

It is possible to write own Code Explorer?

-> I found responses in the forum that indicate that isn't possible to wirte own Code Explorer...but, wouldn't it be a powerfull capability of PSPad, if it is possible to expand the Code Explorer?

I always wanted that in PSPAD!! T_______T

Options: Reply | Quote | Up ^


#4 Re: Write a custom Code Explorer parser?

Posted by: jeki | Date: 07/03/2018 15:13 | IP: IP Logged

This will be great winking smiley

I would need for our selfmade/-used language named "KiBasic":

Code Explorer:
======================================
[-] Includes
.|-- .\reports\Lib_include.bas
.|-- .\reports\Can_include.bas
[-] Functions
.|-- myFristFunction():integer
.|-- mySecondeFunction(string p_abc):integer
[-] Labels
.|-- (-): start script
.|-- (A): do something
.|-- (-): endscript
[-] Modules
.|-- abctools.dll
.|-- report.dll
[-] Variables
.|-- string strTmp, strTmpA
.|-- integer intTmp
.|-- flaot floTmp
.|-- integer ddReport = getcurrentreportdict()
.|-- integer ddReportB= getcurrentreportdict()
======================================

By following Code:
======================================
rem MODULES & INCLUDES
rem -----------------------
include ".\reports\Lib_include.bas"
module "abctools.dll"
module "report.dll"
include ".\reports\Can_include.bas"
rem -----------------------

rem VARIABLES
rem -----------------------
string strTmp, strTmpA
integer intTmp
flaot floTmp
rem -----------------------

rem FUNCTIONS
rem -----------------------
function myFristFunction():integer
myFristFunction=1
endfunc

function mySecondFunction(string p_abc):integer
mySecondFunction=1
endfunc
rem -----------------------

rem MAIN
rem -----------------------

rem # (-): start script
integer i
i = myFristFunction()

rem # (A): do something
i = mySecondFunction("hi")

integer ddReport = getcurrentreportdict()
integer ddReportB= getcurrentreportdict()

rem # (-): endscript
rem stop the script
break
rem -----------------------
======================================

Following Regex for each line:
======================================
[+] Includes -> "^\s*include\s*\"(.*)\"$"
[+] Functions-> "^\s*function\s*(.*)$"
[+] Labels-> "^\s*rem\s\#\s(.*)"
[+] Modules-> "^\s*module\s*\"(.*)\"$"
[+] Variables-> ^\s*((string|integer|float)\s+([_a-zA-Z]*)(\s*(=\s*.*|,\s*[_a-zA-Z]*)*))\s*$
======================================

Hopefully my RegEx are right sad smiley

Thank you.

Options: Reply | Quote | Up ^


#5 Re: Write a custom Code Explorer parser?

Posted by: pspad | Date: 08/02/2018 11:27 | IP: IP Logged

Sorry for delay.
First version of KiBasic code explorer (file type ftKiBas) will be part of the next build. Some preview (before module fixing):

image

Options: Reply | Quote | Up ^


#6 Re: Write a custom Code Explorer parser?

Posted by: pspad | Date: 08/02/2018 12:10 | IP: IP Logged

New build was published. You can check new code parser

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2018 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR