functionlist problem
-
@Michael Vincent
I copied your modified vb code above and used it against my simple vb program. It will work after the following fixes.
-
replace the < and > with
<
and>
commentExpr=“(?x)(?m:((?
<
=').?$)|((?i:REM)([\t ].?)?$))”mainExpr=“(?s:(?
<
SCOPE>
(?i:CLASS|TYPE)).*?(?i:END[\t ]\k<
SCOPE>
))”In functionname it complains that it is expecting whitespace. 2). remove the " that was in the statement below; otherwise, if the regular expression needs it change it to `"` I don't know how your regular expression is supposed to work for this step. Is it supposed to do the same thing as the class one that is similar? ``` <nameExpr expr= "(?x)(?i:(?:GET|LET|SET)[\t ]+)?[A-Za-z_][\w]*(?i:[\t ]+(LIB|ALIAS)[\t ]+[\w\.]+)*(?=[\t ]*\(|$)"/>
You may want to add (?x) after each expr name so that # comments can be added to document the code.
-
-
@swegmike I’m not sure how to get the forum to show the xml equivalent with ampersand and name without it displaying the actual character. The website keeps flagging any variation as spam. For example an ampersand with gt and semicolon or ampersand with lt and semicolon or ampersand with quot and semicolon.
When it sees the ampersand symbol by itself it flags as spam.
When I use the code block it makes it worse.
Peter help fix it.
-
@swegmike said in functionlist problem:
When it sees the ampersand symbol by itself it flags as spam.
When I use the code block it makes it worse.For me,
<
and>
and"
all work find in the forum.I think your initial was trying to say something like:
commentExpr="(?x)(?m:((?<=').*?$)|((?i:REM)([\t ].*?)?$))" vs commentExpr="(?x)(?m:((?<=').*?$)|((?i:REM)([\t ].*?)?$))"
-
For me,
<
and>
and"
all work find in the forum.But when I tried to edit that
find
intofine
after posting, the forum editor kindly turned the HTML escapes into the raw characters in the editor window, so I aborted the edit and changed to a reply. I was also going to add that putting markdown between backticks (like this: `&`
to render like this:&
… or, as I have above,`<` and `>` and `"`
to render as<
and>
and"
) works properly (as long as you aren’t editing your post again later).So now I think maybe your repeated edits were messing things up even more than whatever forum markdown you originally had.
BTW: instead of using
"
in the regex embedded in XML to try to make the XML convert the entity into the actual character, I might recommend\x22
in the regex to match a literal quote. -
@PeterJones
I think the ability to modify a post til it shows correctly needs to be fixed so that one doesn’t have to get it right on the first post. Some keys on this old company laptop don’t always work and must be redone. Moreover, the back tick comment that shows how to get the xml ampersand codes into a forum post isn’t in the FAQ. So I guessed alot.
Af for the original VB code by mike vincent, there are errors such that npp doesn’t like " or < and > in the regular expression. Thus the vs. part of your post is the correct one for both amperand lt and ampersand gt along with the error in the functionname that has a ". When this is removed, NPP doesn’t complaain on save. Perhaps this was mike vincents typo or if it is needed the regexp needs fixing along with changing it to ampersan quot.The back ticks seem o work. need to add this to the FAQ.
-
@swegmike said in functionlist problem:
Moreover, the back tick comment that shows how to get the xml ampersand codes into a forum post isn’t in the FAQ.
Where “isn’t in the FAQ” means “has a whole paragraph devoted just to that feature”. Look at https://community.notepad-plus-plus.org/topic/21925/faq-desk-formatting-forum-posts , especially the Red Typewriter Text section.
-
@PeterJones The brief section talks about back ticks and there is some red typewriter text to; however, I wouldn’t have thought that it applied to the xml ampersand strings since I was looking specifically how to encode the ampersand strings. Perhaps you can add this as other examples pertaining to ampersand strings.
I’ve fixed my post above to correct the vb functionlist parser errors to include the ampersand strings; however, mike vincent will need to chime in to say if the functioname required the double quote within the regexp and or fix the error by removing it or marking it as the xml ampersand quote along with any regexpresson processing fixes.
-
On a side question I have on the functionlist parser is
that my dxl parser regexpression using regex101 tester can find and highlight the following function code. NPP using my regexp can find them to, but will not display the function name found completely, but only the first line for functions add1,2 and add5 to include its parameters.
Is there a way to have the functionlist show multiple lines that describe a given function name with its parameters or where the regexp can manipulate the multiline into one for the functionlist to display it completely? I don’t think regexp in NPP allow me to replace the EOL at the end of the line with null and then stop when { found so that the multilines are joined into one line for display by functionlist.add0(){{}} int add1 (int a, int b ) { real add2 (int c_) { return } } test real add3 (int d()) { } int add4 (int &e[]) { return f } bool add5(array[] b, int c, real d, book e_ ) { Array add6 () { // overload tests with :: ::do( int a, Skip CP_KOR, 1.5e-04, 'A', "MIKE keyword", a <>) { // string ::*(string s, int n) { :if(a ,b) {
-
@swegmike said in functionlist problem:
think the ability to modify a post til it shows correctly needs to be fixed
NodeBB are the authors of the forum software. The Notepad++ just uses an instance (that NodeBB team also kindly donates the server space for our Community). Neither I nor Don have any ability to change the base code for NodeBB, nor do we have any particular sway with NodeBB in getting code changed.
-
@swegmike said in functionlist problem:
Is there a way to have the functionlist show multiple lines
Nope
Or where the regexp can manipulate the multiline into one for the functionlist to display it completely
I believe the manual explicitly stated that the functionalist regex cannot change the text; it is a match-only expression