First thank you so much for spend your time explain it to me! Here we go:
Mofi wrote:[STATIC ]++ should be for optional word STATIC, but the expression means 0 or more occurrences of the characters S, T, A, T (once again, not needed), I, C and space. That is not really wrong, but just [ AICST]++ or propably just a * would work too.
Nice to know it, thanks for the tip. Just I want you to know that I didn't do it, I download the Clipper wordfile from the site and I barely understand how the sentence works (by the way THANK YOU for you patience!!)
Mofi wrote:Without any further expression and without ^(^) the entire line is always displayed in the function list. If this is what you want, it is okay.
It's fine by now. Because all the code is not formatted same way (much people work on it) not always shows only the name of the FUNCTION/PROCEDURE but other useful data too, but like I said it doesn't bother until now
Mofi wrote:UltraEdit now knows on which lines a function starts and everything below the next function belongs to this function. This block is analyzed next by the regular expressions of the subgroups. Normally subgroups contains also a start and end expression like
/TGFindBStart = "("
/TGFindBEnd = ")"
or something similar to separate the function block further for example into a function parameter block and local parameters of the function.
I tried to know more about subgroups before post here, by searching in google things like "/TGBegin", "/TGEnd", "ultraedit subgroups function list", etc. and the only I can found was this
Topic in this forum. I didn't know about examples, and in help didn't found about /TGFindBStart... I will be searching better now.
Mofi wrote:You don't have defined any start and end expression. That could be right for Clipper because everything to next function start must be analyzed, but I can't evalute that because I know nothing about language Clipper. Some examples posted within the BBCode tags for a code would be very helpful for me and any other good in finding regular expressions.
Here is a example code (I hope this is what you needed):
Code: Select all
//Program
Some program data...
DO procedure1 WITH Parameter1, Parameter2, Parameter3 //Call a procedure
IF AllRight
do something...
ELSE
DO procedure2 WITH Parameter4, Parameter5 //Call the other procedure
ENDIF
more program data...
RETURN //End of the program
//List of Procedures
PROCEDURE procedure1
PARAMETERS Parameter1, Parameter2, Parameter3
IF Parameter1 = Parameter2
do something...
ELSE
IF Parameter2 < Parameter3
do something...
ELSE
do something else...
ENDIF
ENDIF
RETURN //End of Procedure1
STATIC PROCEDURE procedure2
PARAMETERS Parameter4, Parameter5
DO CASE
CASE Parameter4 = "Something"
do something...
CASE Parameter5 = "Something else"
do something else...
ENDCASE
RETURN //End of Procedure2
All in UPPERCASE are Reserved Words, words starting with uppercase letter is a Variable, some other text is pseudo-code. I hope you can understand it because I don't know if the forum can colour it like php with code tag, search for it and didn't found it.
Mofi wrote:However, PARAMETERS* is definitely not a good expression because * means 0 or more occurrences of any character except new line characters. Without a following character/expression it is always interpreted as NO character. So just PARAMETERS without * is the same as PARAMETERS*.
I suggest to use PARAMETERS[ ^t]+^(*^)$ which means find word PARAMETERS followed by 1 or more occurrences of spaces/tabs followed by any number of any character except newline characters to end of line. Those characters are tagged by ^(*^) and therefore only those characters should be displayed in the function list view.
I try it but it didn't work, here is wordfile, maybe I did some wrong or you was right supossing that without start and end expressions it didn't work:
Code: Select all
/TGBegin "Funciones"
/TGFindStr = "%[STATIC ]++^{FUNCTION^}^{PROCEDURE^}"
/TGBegin "Parametros"
/TGFindStr = "PARAMETERS[ ^t]+^(*^)$"
/TGEnd
/TGEnd
Mofi wrote:If line comments are possible, instead of ^(*^) something different should be used which excludes the line comments, for example ^([0-9a-z_^-]+^) if only the characters respectively character ranges in the square bracket are allowed for parameter names.
Thanks again for the tip, I work on the details about the comments when it works
Clipper is not case sensitive.
Mofi wrote:Sorry for the long reply, but without some code examples I can't post here a working function string set.
Do not sorry, I thank you and appreciate your effort explain it to me. I hope you understand all I try to put here, if not I try someone that really knows some English help me to write you.
P.S.: I admire your dedication (posting with colors and the simplicity of your answers). Thank you again.