Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RegExp question
Message
From
10/02/2017 07:04:27
 
 
To
09/02/2017 14:01:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01647702
Message ID:
01647824
Views:
85
>Sound Super,
>Can you send me a copy of the class (and any dependents) via email ( GregReichert@GLRsoftware.com ). Any required instruction would be appreciated.
>My FUnit tool allows the developer to place Unit Test pretty much anywhere in the source code, general close the points needing to be tested. The test suite I am working on, scans the source code, and finds the unit tests. It extracts the locations (file, class, method, etc) of the tests and presents a tree list of the location and the tests to developer. This is where a process like your would help.

You can get the whole stuff for free by d/l the FoxInCloud Application Server at http://foxincloud.com/download.php#trialForm

This will install:
home(1) + 'tools\ab\aw\aw.app'
To set procedure to all what aw.app contains:
do home(1) + 'tools\ab\aw\aw.app'
Then, to instantiate the class:
o = createObject('acRegExp')
Invariable patterns are properties, those where you can specify something like a procedure name are methods accepting parameters with a default value of 'anything'

To get the pattern for 'all procedure/functions commands':
? o.instsProc() && in 'insts', 's' means it matches all instructions
To get the same pattern for a specific procedure name:
? o.instsProc('myProc')
To test the 'procedure' pattern
do acRegExp_instsPROC_Test in acTxt.prg with m.yourCode
This displays the result (matches and sub-matches) found in m.yourCode into _Screen and 'debug output' window

To execute the 'procedure' pattern
o.setup(o.instsProc(), 'gmi') && 'g': global, 'm': multiline, 'i' ignore case
for iMatch = 1 to o.execute(myCode) && or o.nMatches
  o.Matches[m.iMatch, 1-5]
  && .Matches[?, 1] = index
  && .Matches[?, 2] = match
  && .Matches[?, 3] = submatches (collection)
  && .Matches[?, 4] = length
  && .Matches[?, 5] = line number
endfor
I'll send you the source code by e-mail so that you have more information about the parameters and sub-matches.

Enjoy!
Thierry Nivelet
FoxinCloud
Give your VFP application a second life, web-based, in YOUR cloud
http://foxincloud.com/
Never explain, never complain (Queen Elizabeth II)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform