This will be great ;-)
I would need for our selfmade/-used language named "KiBasic":
Code Explorer:
======================================
[-] Includes
.|-- .
eports\Lib_include.bas
.|-- .
eports\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 ".
eports\Lib_include.bas"
module "abctools.dll"
module "report.dll"
include ".
eports\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 :-/
Thank you.
--
<https://forum.pspad.com/read.php?2,70389,70423>
PSPad freeware editor https://www.pspad.com