Thanks much for upgrading FunctionList (sort AND reload!). I truly appreciate it and have now moved to 6.5.1.
I'm trying to figure out if I (or FunctionList) have a problem.
My ASM parser I added to functionlist.xml seems to work (mostly...still need to do some closer checking). I noticed a couple of things. First, FL doesn't pick up a label if the line immediately after the label is a comment (starting w/a ";"). However, if the following line is blank or contains any spaces, it seems OK. It's like it's looking for more of a C-kind of function rather than a label followed by some (or no) code. Is there something in the parser that can solve this?
Secondly, the alphabetic sort seems to place labels in odd places (like early up in the list) if there is a blank line before the label. If the line before the label contains any spaces, the label is moved up higher/earlier in the list. As an example, a label that starts with A-Z and a space in the line before it is seen as being less than a label w/a dash ("-") at the beginning. Again...parser?
I will take another look at my parser and see if there is something I need to modify. If someone sees something obvious, I would greatly appreciate it. Thanks.
Cheers...Steph
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the time and help. Unfortunately, your suggestion didn't work :(
However, I did find a solution. When I removed the char from the commentExpr it solved the problem. Not completely sure why, but it seemed to do the job.
1st line now looks like this (ignore "\"....couldn't get it to display otherwise):
Your solution gave me 0 results (as in, it didn't work at all). Maybe I copied/pasted it wrong for some reason. I may go back and check that when I have the chance (the code is still in the XML file, but it's commented out).
My original XML code produced mostly what I wanted, but as I mention above, sorting was off and whether or not a label was displayed in the FL window depended on what was in the line before or after the label (";" followed by a comment without any code in the line seemed to be the "trigger"). Once I removed the ";" from commentExpr, every label was visible and displayed in the right order without being affected by the contents of the previous or following line.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Apologies for delayed response. I am not getting email notifications that someone has responded to my postings/threads. And I haven't been back to this forum in a bit.
Thanks for the revised parser. I'll check it out when I get the chance and let you know how well it works for me. Just as a point of info (and don't know if it makes any difference): I am working with 8051 assembler code.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I really appreciate any feedback on the revised parser.
FYI: I don't code in assembler myself so can't tell the difference between 8051 assembler code and any other assembler code.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Tried your parser and, sorry to say, no luck. Still doesn't work :(
A few obvious things to me (if I understand Scintilla at all):
1. I allow any char except white space at the beginning of the line
2. My char set is limited to upper/lower case letters and "_" (underscores)
and, this may be the most important one,
3. It looks like you require an underscore (\w) at the end of the label (which is more of a high level language format than assembler). Assembler can have underscores (why I allow them) but I've never known them to be standard or required.
Cheers....Steph
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hmmmm....thought I posted this last week (Must have gotten started, then distracted by something else :(
Anyway, I recopied and retested your asm parser. Works fine (can't tell it apart from mine ;)
Also, thanks for the clarification of "\w". I must have read something else as the description because that's not what I remembered reading. As I mentioned, I only think I know Scintilla (at least, enough to get my asm parser working). Some of the more obvious "nuances" escape my understanding.....(and, sometimes my sight).
Cheers...Steph
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
Thanks much for upgrading FunctionList (sort AND reload!). I truly appreciate it and have now moved to 6.5.1.
I'm trying to figure out if I (or FunctionList) have a problem.
My ASM parser I added to functionlist.xml seems to work (mostly...still need to do some closer checking). I noticed a couple of things. First, FL doesn't pick up a label if the line immediately after the label is a comment (starting w/a ";"). However, if the following line is blank or contains any spaces, it seems OK. It's like it's looking for more of a C-kind of function rather than a label followed by some (or no) code. Is there something in the parser that can solve this?
Secondly, the alphabetic sort seems to place labels in odd places (like early up in the list) if there is a blank line before the label. If the line before the label contains any spaces, the label is moved up higher/earlier in the list. As an example, a label that starts with A-Z and a space in the line before it is seen as being less than a label w/a dash ("-") at the beginning. Again...parser?
Here's what I have at present:
I also have the following association:
I will take another look at my parser and see if there is something I need to modify. If someone sees something obvious, I would greatly appreciate it. Thanks.
Cheers...Steph
BUMP!!
How about this?
Thanks for the time and help. Unfortunately, your suggestion didn't work :(
However, I did find a solution. When I removed the char from the commentExpr it solved the problem. Not completely sure why, but it seemed to do the job.
1st line now looks like this (ignore "\"....couldn't get it to display otherwise):
\<parser id="asm_funct" displayName="Assembly" commentExpr="">
Cheers....Steph
Last edit: stepher 2013-11-13
Great to hear you found a solution!
However, I am wondering why my suggestion did not work.
What do you expect the parser to show in the function-list panel?
Your solution gave me 0 results (as in, it didn't work at all). Maybe I copied/pasted it wrong for some reason. I may go back and check that when I have the chance (the code is still in the XML file, but it's commented out).
My original XML code produced mostly what I wanted, but as I mention above, sorting was off and whether or not a label was displayed in the FL window depended on what was in the line before or after the label (";" followed by a comment without any code in the line seemed to be the "trigger"). Once I removed the ";" from commentExpr, every label was visible and displayed in the right order without being affected by the contents of the previous or following line.
This one should do:
See also https://sourceforge.net/p/notepad-plus/discussion/331753/thread/b9d2fe00/#167e
Apologies for delayed response. I am not getting email notifications that someone has responded to my postings/threads. And I haven't been back to this forum in a bit.
Thanks for the revised parser. I'll check it out when I get the chance and let you know how well it works for me. Just as a point of info (and don't know if it makes any difference): I am working with 8051 assembler code.
Is there a way to save the sort order so I don't have to keep clicking the sort button?
Good question and that would be a great addition to the function list plugin!
However, you might want to post the question in the plugin forum and/or add a feature request (Tickets > Feature Requests).
EDIT:
Stepher already posted about the sort setting, see https://sourceforge.net/p/notepad-plus/discussion/331753/thread/e7ed2f93/#473d
Last edit: Menno Vogels 2013-11-24
Hi Stepher,
I really appreciate any feedback on the revised parser.
FYI: I don't code in assembler myself so can't tell the difference between 8051 assembler code and any other assembler code.
Menno,
Tried your parser and, sorry to say, no luck. Still doesn't work :(
A few obvious things to me (if I understand Scintilla at all):
1. I allow any char except white space at the beginning of the line
2. My char set is limited to upper/lower case letters and "_" (underscores)
and, this may be the most important one,
3. It looks like you require an underscore (\w) at the end of the label (which is more of a high level language format than assembler). Assembler can have underscores (why I allow them) but I've never known them to be standard or required.
Cheers....Steph
That [\w]+ should have been [\w]*. The square brackets are not required, added them for readability.
FYI: \w is equivalent to [A-Za-z0-9_].
Hi Menno,
Hmmmm....thought I posted this last week (Must have gotten started, then distracted by something else :(
Anyway, I recopied and retested your asm parser. Works fine (can't tell it apart from mine ;)
Also, thanks for the clarification of "\w". I must have read something else as the description because that's not what I remembered reading. As I mentioned, I only think I know Scintilla (at least, enough to get my asm parser working). Some of the more obvious "nuances" escape my understanding.....(and, sometimes my sight).
Cheers...Steph