New UserDefinedLanguage module

Loreia2
2011-07-30
2014-06-11
<< < 1 2 3 4 .. 13 > >> (Page 2 of 13)
  • Loreia2
    Loreia2
    2011-09-03

    Hi blakmatrix ,

    you can partially expand your definition in new UDL by defining DELIMITER3 as open: / /// and close: / ///
    This can cover RE case. Please test it, and report if you find any thing wrong/malfunctioning with it.

    Unfortunately, embedded delimiters are not supported. They were mentioned on this thread already but I won't work on them for time being. I have very limited time on my disposal and I need to focus on smaller number of new features in order to release anything at all.

    But it is an interesting idea, and I might work on it after I finish working on current feature set. It only depends on my free time.

    P.S.
    I just did a quick test in official build and it seems Perl coloring doesn't support comments within RE's. I guess that makes this feature even more desirable, but some concessions have to be made. So, maybe latter…

    Thank you and best regards,
    Loreia

     
  • Loreia2
    Loreia2
    2011-09-06

    Hi Chris,

    I am working on GUI right now, and I just realized that Folding is separated in two different sets of settings (Open and Close). It never hit me before, (I guess I would just mechanically create two identical coloring schemes), but what was the reasoning behind using different coloring for something that is essentially the same thing.

    For example, you can't define different colors for comment (of delimiter) open and close sets. The same way it doesn't make sense (to me!) to have different settings for OpenFold and CloseFold.

    I ask because I'd like to change GUI to keep just one one coloring for both sets of Folding keywords. Is that a big no-no, or something that would be considered as improvement?
    Basically, Folding would look the same as Comment block in current official implementation.

    Thank you and best regards,
    Loreia

     
  • Loreia2
    Loreia2
    2011-09-10

    Hi

    I have finally finished my work on comments and comment folding. Here is what folding looks like now:


    If user selects option "Allow folding keywords in comments" (in Folder & Default tab), he can achieve folding by using special comments. The only rule is: fold keyword must follow directly after comment sign (and rest of the comment is ignored).
    To demonstrate this, lines 17-23 show comments that contain fold keywords preceded by a space. Such lines do not allow folding.

    Also, comment lines that act as folding lines cannot be part of comment groups. This is demonstrated by last example.
    The same trick works with regular comments too:


    You can even mix them, as demonstrated in first example (lines 2-4)

    This is just the first working version of the code, it still requires further optimization and cleanup, but important thing is that I've finished putting new features in. This version will be the base for merge with Chris' stuff.

    So, for the time being, no nested delimiters will be implemented, but I'll keep that as a "next feature" (if I put anything else in, it will be the nested delimiters).

    Improvements in handling of comments will be demonstrated tomorrow, because I still need to update GUI (some small changes) and better test serialization to file, but I believe I can finish that part by tomorrow.

    General code optimization is going well too.
    Test file contained  examples of all coloring groups, and was expanded to 100.000 lines. It took roughly  45%-50% of time needed by 5.9.3 to do the coloring.

    Until next update…

    Thank you and best regards,
    Loreia

     
  • cchris
    cchris
    2011-09-11

    I'd email Don directly about this.

    From my viewpoint, not only using a diferent style for fold close keywords isn't too logical, like you aid. It also prevents Scintilla to apply its brace matching mechanism when the fold boundaries are { and } - not too uncommon.
    I had planned to split the close elimiters section between regular closrs - color them diferently if it serves any purpose - and closers to highlight like openers. Lack of time, and decreasing motivation given the sort of keen interest Don is showing about improving UDLs. If I need it I'"ll implement it, if you add it I'll like it.

    CChris

     
  • cchris
    cchris
    2011-09-11

    I hadn't seen your last post with screenshots: I like this indeed.

    CChris

     
  • Loreia2
    Loreia2
    2011-09-11

    Hi,

    here is a small demonstration of new features in comments and delimiters.

    1. Lets start with comments.
    The old implementation allowed user to enter comment open and close strings, but it couldn't match correct comment open and close strings.
    e.g. if user entered "/* /+" as comment open, and "*/ +/" as comment close, then the obvious intent is to use these two comment values:
    /* first comment */
    /+ second comment +/

    But old implementation was simply looking for first string it could match, and that led to stuff like this:

    Notice how comment starts with "/+" and ends with "*/"

    New implementation, uses indexes to match correct string. So, if "/+" comment is found, new UDL records position (index) of string "/+", and then it looks only for the same index in close comment string.


    So, user just needs to define comment strings in correct order, and everything will work as intended:

     
  • Loreia2
    Loreia2
    2011-09-11

    2. Lets continue with line comments:


    Now you can define comment line open string, comment continue and in those rare cases when line comments can end before end of line, you can define close string too.
    I guess 99,9% percent of time, third option will not be used, but some older languages have this "feature". E.g. in my company we have some old scripting language (from 1980s or even older) that uses comments like these (it is a strange mix of regular comments and line comments).
    Anyway, this is what it looks like in action:


     
  • Loreia2
    Loreia2
    2011-09-11

    3. And finally delimiters:


    Definition in image covers C++ strings, but there is a problem: C/C++ have something called trigraphs, so line continuation can be '\\' or "??/". New UDL solves this problem with special grouping strings "((" and "))"


    In this example, Delimter1 can be
    " delimiter1 \""
    " delimiter1 ??/""
    ' delimiter1 /''

    So, vertical indexing still works, but anything inside (( )) is interchangeable.

    You may ask how to use "((" and "))" as delimiter strings, that's easy just put them in a group of their own:
    (( (( ))
    (( ))))

    White space is generally irrelevant, and you can have one or ten spaces as separators, but there is one exception: if you put "))" inside a group, it must be "glued" to group close string.
    So, you can write:
    ((   ((      ))
    But, you must write:
    ((     ))))

    In the background grouping works like this:
    When " ((" (space, brace, brace) is found group starts, when next "))" (brace, brace) is found group ends, but anything up to next space is considered a part of the group. That's why,  entire "))))" string is read as a part of group sub-string. And when a group is further processed, it works like this:
    Leading "((" is removed, closing "))" is also removed, and anything that is left is a list of operators within a group.

    One way to use this is to use Delmiter1 to define Regex.
    e.g. (I am making this stuff up for demonstration, not providing real world example)
    Open: (( m/ s/ /))
    Close (( /x /g / ))

    This will try to match strings left to right (in new UDL order is preserved as written in definition), that's why, in close group, I am putting longer strings first, so letters "m", "s", "x" and "g" would be highlighted too.

     
  • Loreia2
    Loreia2
    2011-09-11

    Ok,

    I think I've demonstrated all I wanted.

    You can also see new GUI mockups, it is very similar to the old one, a bit wider, to save vertical space, and input boxes are smaller for comments and delimiters (but not keywords !)

    If you have any comments/critiques, just post them here.

    Until next update…
    Thank you and best regards,
    Loreia

     
  • Loreia2
    Loreia2
    2011-09-11

    I'd email Don directly about this

    I want to conduct a small investigation of my own before proposing this to him, I'll download all definitions from official wiki, and make a small python script to check them all to see if any have different coloring for open and close set of delimiters.
    I bet I won't find any.

    It also prevents Scintilla to apply its brace matching mechanism when the fold boundaries are { and } - not too uncommon

    I didn't even realize this.

    Lack of time, and decreasing motivation given the sort of keen interest Don is showing about improving UDLs

    I can understand that.

    If I need it I'"ll implement it, if you add it I'll like it

    LOL, I'll see what happens. I am interested to see if any language has use fort his thing.

    I hadn't seen your last post with screenshots: I like this indeed.

    Thanks, I believe that new folding mechanism in UDL will improve working with UDL languages dramatically (in my company we use so much commenting it gets in my way at times, and having ability to fold it will be great).

    Nothing is wrong with "hide text" option, but it is not nearly as easy to use it, as having automatic folding in UDL:

    Thank you and best regards,
    Loreia

     
  • Jonas
    Jonas
    2011-09-11

    I've been trying to make notepad read the vs wizard files with style

    I'd like it to use closures for the if / else / endif
    What i want is very similar to the built-in "MS INI file"

    Doesn't seem like the user defined language supports this :(

    Here's an example:

    readme.txt
    [!if LIB_APP]
            [!if PRE_COMPILED_HEADER]
    stdafx.h
    targetver.h
    stdafx.cpp
            [!endif]
    [!else]
    stdafx.h
    targetver.h
    stdafx.cpp
    OpenFile | root.cpp
            [!if WIN_APP || SUPPORT_MFC]
    resource.h
    root.rc
            [!endif]
            [!if WIN_APP || SUPPORT_MFC]
    root.h
            [!else]
                    [!if DLL_APP && EXPORT_SYMBOLS]
    root.h
                    [!endif]
            [!endif]
            [!if WIN_APP]
    CopyOnly | small.ico
    CopyOnly | root.ico
            [!endif]
    [!endif]
    [!if DLL_APP && !SUPPORT_MFC]
    dllmain.cpp
    [!endif]
    
     
  • Vera
    Vera
    2011-09-11

    Hello loreia2

    that really looks and sounds great :-)

    Will the public be allowed to test it live as well or do we now wait until it's eventually implemented in any future release ?

    greetings ~ Vera

     
  • Loreia2
    Loreia2
    2011-09-11

    Hi jonasno,

    what exactly do you want to do? Do you need to fold those sections?
    Anyway, you raised an interesting question, because current implementation does not support "else if" case. Just start and end of folding.

    I'll have to see how to include that option too.

    Thank you and best regards,
    Loreia

     
  • Loreia2
    Loreia2
    2011-09-11

    Hi Vera,

    I'll release it as soon as I clean bugs, no need to release something that I know isn't working (in some cases).

    Also, after running few more tests today, I came to realize that I need full support for nested comments and delimiters in order to cover indexing 100%. That's why I need to expand current implementation with nested delimiters (comments are already supported), before proceeding with finalization of GUI.

    Also, when I add nested delimiters, I need to add a lot of new options in dialog, so I'll have to play around with it more that I originally anticipated. We'll see how it goes in a week or so. (My daughter came home after ten days, and I'll spend most of my free time in next few days playing with her, not UDL :-))

    Thank you and best regards,
    Loreia

     
  • Jonas
    Jonas
    2011-09-12

    Hello loreia2

    > Do you need to fold those sections?
    Yes.
    > Anyway, you raised an interesting question, because current implementation does not support "else if" case. Just start and end of folding.
    Indeed

    But not only folding.
    -Full row background coloring. See this (using "(MS) INI file" language style)

    -Fold tags (and other tags as well) should also be able to handle custom text in the tags Ex. ""
    The built-in xml style can handle custom text in tags and also color them but you can't seem to be able to do it in a user defined language

    You should be able to do all the things the built-in styles can do.
    Do you agree ?

     
  • Loreia2
    Loreia2
    2011-09-12

    Hi jonasno ,

    You should be able to do all the things the built-in styles can do.
    Do you agree ?

    That is a tough question. UDL will always be a compromise between rich feature set and speed of execution. You just can't work in every feature that there is out there. But UDL should be able to cover most common cases, I agree with that.
    Besides someone must implement it, and that requires a lot of time and effort, which also means there won't be many volunteers for the job.

    Back to your request. One way to achieve what you want (in new UDL!) is to define extra pair of comment characters (""), then to check "Allow folding keywords in comments" option, and finally to define these fold keywords: "!if" and "!endif".
    Obviously, you cannot use "!else" or "!elseif", so I'll have to add another input box to cover that option too.

    XML example will be covered when I implement nested delimiters. I wanted to avoid working on this in this phase, but I need that functionality to make sure re-coloring works properly. So, you'll have to wait for next update to see this option at work.

    Thank you and best regards,
    Loreia

     
  • Loreia2
    Loreia2
    2011-09-12

    Hi,

    Here is a picture of what I talked about in previous post:


    Is this what you had in mind?

    Thank you and best regards,
    Loreia

     
  • Vera
    Vera
    2011-09-12

    Dear Loreia,

    thanks for your quick reply and unweary task.
    I was a bit puzzled by repeatedly reading 'Now you can do…' without finding a note towards the current update. Don't worry -

    rather enjoy that precious time with your daughter & family.
    (regarding Japan - one never knows how much halcyon days remain)

    take care ~ Vera

     
  • Loreia2
    Loreia2
    2011-09-12

    Hi  Vera,

    English is my second language (I'm Croatian actually), so I may have problems expressing my exact thought at times. Especially when it is late and I am tired. So, if anything is shady/unclear or simply not grammatically correct, just ask for clarification.

    And yes, you are right, it is precious time and we never know much we have left of it.

    Thank you and best regards,
    Loreia

     
  • Jonas
    Jonas
    2011-09-16


    The first case yes. The endif doesn't have anything after it, it should be just ""
    The full line background color for it is missing though but i take what i can get :)
    I'm not a fan of the font underline.

    The second case isn't valid for visual studio's wizard macro language.

    Here's some examples of  valid cases

    [!if FLAG_ONE || FLAG_TWo && FLAG_THREE]
    // something here
    [!else] (There's no elseif)
    // something else here
    [!endif]
    [!if SUPPORT_MFC && !GENERATE_ATL_DOCUMENT]
    // something
    [!endif]
    
    #include "[!output PROJECT_NAME].h"
    // [!output PROJECT_NAME].cpp : main project file.
    using namespace [!output SAFE_NAMESPACE_NAME];
    [!output SAFE_ATL_MODULE_NAME] _AtlModule;
    

    It doesn't support comments at all
    It only reads the commands within the

    If you  want some files to test with i can upload them to you

     
  • Loreia2
    Loreia2
    2011-09-17

    Hi jonasno,

    colorization is something user picks through GUI. So, if you don't like underlined fonts, just don't select underline option ;)
    I made that example to demonstrate what can be done with current implementation of UDL2 (for the lack of better name).

    Both lines aim to demonstrate that text after the keywords (!if and !endif) is ignored. That means that you can, but don't have to write anything after the keyword and it will be highlighted as the comment.

    Think of it in this way:
    1. anything within  will be colored as comment (remember YOU are the one selection colorization scheme, the one I demonstrated in that picture is irrelevant)
    2. if opening bracket "[" is immediately followed by a "!if" or "!endif" than you get the folding ability (plus and minus sign in front of that line)

    Third option ("!else" case) will be added in the future.

    It doesn't support comments at all It only reads the commands within the

    Don't be confused by phrase "comment". In UDL a comment is simply a part of text that is defined in comment section of UDL. It doesn't have to be an actual comment in source code. In your case, it is irrelevant if you define "" as delimiters or comments, it simply tells UDL that anything within  "" should be colored as defined for comments or delimiters (whichever you selected).
    But if you define it as comment you can embed folding keywords in it. In that way you can achieve both colorization and folding.

    If all this sounds confusing, just wait until I post binaries here, so you'll be able to test it yourself and it will be clear what I mean.

    If you want some files to test with i can upload them to you

    No. When I post binaries here, I will ask you to test it and report any problems you might encounter.
    After all, you are the one that understands the syntax, not me.

    Thank you and best regards,
    Loreia

     
  • Loreia2
    Loreia2
    2011-09-26

    Hi All,

    I am slowly finishing my work on new folding features. I am short on free time these days, but things are slowly moving forward. As mentioned last time, folding is now expanded with three sets of keywords: OPEN, MIDDLE and CLOSE. (Btw, I'd like to rename phrase "middle" into something more appropriate. Does anyone have a suggestion?)


    As you can see, now you can fold both sections: open-middle and middle-close
    But it even goes one step further. If your language does not have "else" keyword, you can achieve the same efect by placing CLOSE followed by OPEN on the same line:


    The idea is to support something like C++ statement (where folding keywords are just '{' and '}':

    if (var){
    //some code
    } else {
    //more code
    }

    Also, I checked all language definitions from official wiki, and out of 180+ language definitions, 8 used different stylers for OPEN and CLOSE fold keywords.
    One language had no maintainer listed, so I e-mailed rest of them. Three e-mails were non functional, and out of remaining four, I got two answers (thanks Evan and Gerd). Both guys were OK with my suggestion to use just one styler for all fold keywords, in fact Evan offered to update his definition and to remove different CLOSE fold styler.

    I guess this is a good start, I'll wait few more days for the other two guys to respond. I'd love to hear their take on this. Then, I'll e-mail Don to see what he thinks about it.

    Fun fact: a number of definitions had different coloring for OPEN and CLOSE fold keywords, but the had no fold keywords defined !! I guess the didn't pay much attention to this option, or simply didn't understand it.

    I guess that is all for this time.

    Until next update…
    Thank you and best regards,
    Loreia

     

  • Anonymous
    2011-09-29

    Nice work Lorea!
    I program in a language where the "comment open" and "comment close" are the same character "!". This is currently a problem in 5.9.3. Do you think this will work in your implementation?
    The workaround now is that I use "boundary open" "boundary close" instead and that works with the same character.

     
  • Loreia2
    Loreia2
    2011-09-29

    Hi,

    in my company we use the same open/close characters. Wouldn't it be funny if we worked for the same company  :-) (tip: North of Europe, company logo is the fifth letter in English alphabet ;)

    Anyway, it is not problem at all

    Thank you and best regards,
    Loreia

     
  • Loreia2
    Loreia2
    2011-09-29

    I forgot to add,

    if we do work in the same company, you'll need this functionality too:


    Thank you and best regards,
    Loreia

     

  • Anonymous
    2011-09-30

    Very probable that it's the same company then :) And the code is all UPPER CASE also? :)

    Good to hear it will work, do you know if this will be added to official release?

     
  • Loreia2
    Loreia2
    2011-09-30

    And the code is all UPPER CASE also? :)

    Definitely the same company :-)
    Actually, the damn language that is written in ALL CAPS is the reason I started working on this in the first place. Now I am about to go on a different project and I don't need this functionality any more. But I'll finish it, and publish here, so other could benefit from my work.

    do you know if this will be added to official release?
    

    I had no contact with Don thus far. I did e-mail him to hear his opinion about that problem with unification of of folder open/close stylers, but I received no answer (as of yet).
    So, I have no idea if this is even going to be considered for official build. That is a question for Don. Off course, I need to come up with some source code (currently, everything is on my hard drive) before he can make that decision.

    If you need it just for PLEX, you can build the first version I published at the begging of this thread, and use that one. If you need extra functionality that was added latter and is still not published, that you'll have to wait until I finish my "weary task" (as someone called it). It is had to give estimates, because I work on it only as much as I have free time. E.g. entire next week I'll spend on business trip in Hungary and won't work on this at all. But I hope to finish my current work (folding and nesting) some time during September. Then I'll start merging with Chris' code, which should be an easier part of the job, and only after that Don can even consider including this in official build.
    So, it won't be soon :-(

    Thank you and best regards,
    Loreia

     
  • Loreia2
    Loreia2
    2011-10-01

    A bit of good news for user jonasno:


    Now he can fold and color all sections within square brackets :-)

    As you see, I am still experimenting with fold keywords nested within comments. Current implementation allows to have fold keywords anywhere within comment. But now that I played with it for a while, I think I'll revert to the old version where fold keyword must to be placed at the beginning of comment.

    Also, I am thinking to introduce prefix character that will trigger this functionality on or off. Something like:
    prefix for fold keywords in comments: $
    //$foldOpen
    this sections can be folded
    //$foldClose

    //foldOpen
    this sections can NOT be folded
    //foldClose

    (TIP: this would a lot nicer with prefix set to: /, because it would blend with comment sign)

    This is needed to avoid unnecessary folding when a piece of code is commented out.
    e.g.
    //int func()
    //{
    //return o;
    //}

    If you set { and } as fold open/close chars, then you would be able to fold this function even if it is commented out. That might be really annoying (such functionality is already part of Scintilla's C++ Lexer, and to be honest it is annoying, because VS by default does not separate line comment sign (//) with a space from rest of the comment line. So, when I reopen that file in NPP, folding is broken and I need to manually fix it.)

    I will also have to put an option to chose the coloring of folding keywords within comments. So you'll be able to make it stick out (like on the picture above) or blend in within rest of the comment line.

    Until next update…
    Thank you and best regards,
    Loreia

     
  • Loreia2
    Loreia2
    2011-10-01

    Hi,,

    here is more good news, this time for user blakmatrix :-)

    Nested delimiters and comments are now supported, as you can see from this qiuck'n'dirty example:


    Now, lets see how we can turn this into something useful for our CoffeeScript guy.


    Defining regex is easy. ***
    Embedding delimiter2 into delimiter1 is just as easy.
    Now comes the interesting part: In HEREREGEX anything after # is a comment, but only if # isn't followed by {.
    To work around this limitation, you should define DELIMITER2 as:
    start: #{
    end: }

    In this way, #{@num} will be treated as another delimiter, and not as a comment.
    You can see that on a picture, there is a hole in that yellow patch.
    If you would like to integrate #{@num} within hereregex, just define the same styler for DELIMITER2 and DELIMITER3 (hereregex). Like this:


    One possible problem here is that embedded DELIMITER2 will look the same as hereregex, but it is quite clear from the context which is which.

    Until next update…
    Thank you and best regards,
    Loreia

    ***
    (TIP: you can achieve the same thing already. Just change this:
    <Keywords name="Delimiters">&quot;&apos;0&quot;&apos;0}</Keywords>
    to this
    <Keywords name="Delimiters">&quot;&apos;/&quot;&apos;/}</Keywords>
    And use REGEX style as DELIMINER3 (REGEX doesn't exit so you can remove it, just use the same colors for DELIMINER3)

                <WordsStyle name="DELIMINER3" styleID="16" fgColor="000000" bgColor="FFFFFF" fontName="Consolas" fontStyle="0" />
                <WordsStyle name="REGEX" styleID="52" fgColor="8000FF" bgColor="F2F4FF" fontName="" fontStyle="0" fontSize="" />
    )

     
  • Loreia2
    Loreia2
    2011-10-01

    Also, I am thinking to introduce prefix character that will trigger this functionality on or off. Something like: prefix for fold keywords in comments: $
    //$foldOpen
    this sections can be folded
    //$foldClose
    //foldOpen
    this sections can NOT be folded
    //foldClose

    Forgot to add. Any comments/suggestions/guidance on this is welcome.
    Thank you and best regards,
    Loreia

     
  • Ryto
    Ryto
    2012-01-06

    Loreia,

    Great work!  I've been working with Batch files again recently, and the inability in Notepad++ to fold on parentheses for IF and FOR statements drives me nuts.  Do your changes allow this kind of folding?  How's the work going?

    Hope all is well, and that you've enjoyed the new year thus far.

     
  • Loreia2
    Loreia2
    2012-01-06

    Hi ryto,

    can you post a code sample of what you are trying to fold? UDL2 should be able to fold anything that is not 'whitespace'. So, it is useless for Python-like syntax, but it should work nicely with everything else.
    Just post a code sample here, and I will check if it is working.

    Work is going nicely, even if it is slow. Coding is more or less done, and this weekend I will work on documentation and performance testing. My plan is to release it during January, but that depends on my other obligations.

    Thank you and best regards,
    Loreia

     
  • Ryto
    Ryto
    2012-01-07

    Loreia,

    Below is an example of some Batch code with IFs and FORs that I would want to fold.

    @ECHO OFF
    SETLOCAL
    SET boolean=
    SET otherBool=1
    SET thirdBool=1
    SET someString=test
    IF DEFINED boolean (
    ECHO First part of if. The variable boolean is defined.
    ) ELSE IF DEFINED otherBool (
    ECHO Second part of if. The variable otherBool is defined.
    ) ELSE IF DEFINED thirdBool (
    ECHO Third part of if. The variable thirdBool is defined.
    )
    IF NOT DEFINED boolean (
    ECHO The variable boolean is NOT defined.
    ) ELSE (
    ECHO The variable boolean is defined.
    )
    IF "%someString%" == "test" (
    ECHO The variable someString equals "test".
    )
    FOR /L %%A IN (0,1,5) DO (
    ECHO Step %%A of the loop.
    )
    ENDLOCAL
    
     
  • Loreia2
    Loreia2
    2012-01-07

    Hi ryto,

    I have a good news for you :-)


    Thank you and best regards,
    Loreia

     
  • Loreia2
    Loreia2
    2012-01-07

    Great, I posted a wrong picture.
    Just disregarded it, it is something that is part of online documentation I am working on right now.

    This one is for you:

    Thank you and best regards,
    Loreia

     
  • dbeorn
    dbeorn
    2012-01-17

    Yes - I'm interested as well.  Here's some observations:

    doesn't recognize the following DOS commands and put them in the right "color"

    pause
    find
    more
    net use
    else
    start
    xcopy
    setlocal
    endlocal
    ipconfig
    ping (does higlight - maybe means not strictly a DOS command)
    dir (in some constructs)
    goto (in some constructs)
    rem   (" " " )
    set (depends on context) - test-class-c.bat

    Also doesn't recognize the "if else" construct and "for" construct properly for aligning the parenthesis
    Also along those lines, doesn't recognize ECHO as a command when in the if () else () construct on multiple lines
    and I don't know if it's an "error" or not, but ECHO ON and NET USE are multi-word command but don't display that way
    if /i - the /i is a qualifier, and maybe should highlight accodingly; like-wise with these:
    for /f /d /l, xcopy /v/c/p/-y, dir, net use /user:, set /a /p,
    file-specs are maybe a spacial case, but they display w/all kinds of highlighting
    variable names are highlighted when used with % or ! to translate but not when used with SET or other commands
    and when special input variables  %1 %2, etc. are combined, %1%2%3 they display improperly. 
    Doesn't match (apparently) single quotes, double quotes, etc, at least not accuarately(?)

    Doesn't portray html links with spaces in the name corrrectly, even if the name is in quotes

     
  • Loreia2
    Loreia2
    2012-01-18

    Hi dbeorn,

    are you talking about DOS lexer or user lexer?
    This thread is about user lexer or UserDefinedLanguage module. So, if you define new coloring scheme, I see no reason why UDL shouldn't highlight those words. Can you post example code so I could try it my self?

    Also, UDL 2.0 now supports multi-part keywords so you can expect to have that problem solved.

    I also wonder about last sentence? HTML links cannot have spaces in them (spaces are escaped to "%20" if I remember correctly)

    Thank you and best regards,
    Loreia

     
  • Vera
    Vera
    2012-01-24

    Dear Loreia,

    good news for user jonasno
    Now he can fold and color all sections within square brackets

    more good news, this time for user blakmatrix …………….

    Until next update… Until next update… Until next update… Until next update…

    There has never been any update since 2011-08-05 except for showing what YOU can do - but nobody is allowed for experiencing it himself - or does one need to contact you backstage ?  
    
    To me this thread has become very frustrating - every new posting wakes the hope - now / today / at last there might be a test release - but then it's again just a privat demonstration of your personal benefit.  
    
    I have re-read this thread so many times looking for a hint that I would be wrong, that I overlooked or missunderstood an information but couldn't find any.  
    
    Regarding this I wished you would not on top invite further NPP users out of other topics to come here and join into the same trap - hoping for month .   
    
    ~Vera
    
     
  • Loreia2
    Loreia2
    2012-01-24

    Hi Vera,

    trust me that these delays are much more frustrating for me that any other user, but real life issues simply have priority over UDL.

    Given my limited free time, there are two ways in which I could handle this thread.
    1. Just disappear from the thread until everything is finished
    2. Post incremental updates

    Both options have their disadvantages. You clearly voiced your frustration with option 2, but I still think it is better to have people know about updates (no matter how slow or frustrating that might be) than to disappear for X months.

    Clearly, the best solution would be to finish UDL 2.0 and publish it. But then again there are things that are out of my control, e.g. when my company sends me to Hungary or Germany for a month, and when I get robbed there (all money and all documents included) I simply need to focus on legal issues, and put UDL 2.0 on the shelve. What can I report that month, other than just few small updates and "…until next time…" postscript?
    Or take for example last night, I worked from 8:00 AM until 7:30 PM and when I came home, my daughter fell down and injured her forehead (a really nasty cut). So, instead of working on UDL in the evening, I had to take my daughter to hospital. As you might imagine, I didn't sleep much last night. And don't even get me started on some really nasty stuff like when my close friend decided to commit suicide this Christmas. That one is do deeply private and shocking, I want to keep that for my self. Besides I don't want this thread to become my personal diary.

    These kind of issues are preventing me from finishing UDL 2.0. I am simply having a problem of finding enough free time to devote it to UDL. I am not some semi serious kid working on this between session of his favourite computer game, this is an important project for me. And I decided to put aside all my other projects (which was a big decision for me) in order to finish UDL 2.0.
    So, my devotion to this is not a problem. The only problem is very slow progress, and how to handle it on this thread.
    Feel free to suggest a better approach that the one I am using right now. I will always listen to a good proposal.

    Regarding UDL 2.0
    - coding is actually done, and if you wish I will send you binaries for you to test it privately. Just request it here.
    - right now I am working on user documentation, which is absolutely needed before I publish the binaries.
    I am not fully satisfied with user documentation because I mostly work on it late when I am tired, and when quality of my English deteriorates significantly. This is where some help would be appreciated once I publish it.
    - after I finish user documentation (and I thought this would be done weeks ago, but sadly it still isn't), I need to prepare some code documentation. So, it would be easier to follow the code, once I publish it.
    - and after I finish my last code review, I will finally publish it.

    It is a frustrating story, no doubt about it. But I am doing the best I can under the circumstances, and I am not sure many people would perform better in my shoes.

    And finally, the most important question: WHEN?
    Short answer: I still don't know.
    Long answer: I will probably finish user documentation this week, and code documentation the week after that. Then I will postpone release until I decide that I have enough free time to service feed back from users, their bug reports, crashes they might experience, or additional feature requests. I can't just publish it, and then disappear for twenty days.

    So, it might be anything from 15 days to seeing 15 more of those dreaded  "…until next time…" postscripts.
    This turned out to be a long answer, but I hope I answered you questions.

    Thank you and best regards,
    Loreia

     
  • Loreia,

    Don't get disheartened by the odd whiner - I think you're doing absolutely the right thing drumming up a bit of hype about your code.  CChris's original UDL improvement patch has been sat there for ever, and is often referred to in answer to someone's requirement, but it's never been integrated.  Drumming up support like this is a great way to get enough users requesting that a patch is integrated into the main line.

    Keep up the great work, and I'm really looking forward to seeing the final product.

    All the best,
    Dave.

     
  • Loreia2
    Loreia2
    2012-01-25

    Thanks Dave,

    I will continue my work no matter what, but people should understand that it is hard to give estimates when one can't know how much free time he will have in the future. I tend to give most optimistic estimates, which is simply a reflection of my optimistic view of UDL 2.0 (I like it a lot, and I actually think it is progressing nicely).

    This thread turned out to be some sort of Kanban board of my project. It is a way to report my progress and to collect input from users, and it will continue to work this way until I am ready to publish binaries for testing and code for reviewing.

    About the hype thing.
    I wasn't trying to do that at all. Last couple of months I frequent these boards almost on daily basis. I do it for two reasons.
    1. to follow this thread
    2. to access patch tracker

    So, when I open forum section, if I have time, I try to help users looking for some simple thing. And few times that users asked about extending UDL, I told them to look here.
    It wasn't so much about "advertising", it was just a normal answer. As far as I know, this is the only project to extend UDL functionality, and UDL didn't change in years. What else can one answer? It is either a) code it your self    or b) check out Loreia's thread. Or maybe c) ignore his request, and leave it unanswered.

    So, it was about being polite and helping someone, rather that trying to annoy other users or to start some sort of lobbing campaign.

    About delays, slow progress and so on.
    UDL didn't change in years, CChris's improvement patch didn't get accepted at all and generally there was no interest to touch UDL code at all. Why is it now a problem to wait few more months?

    Thank you and best regards,
    Loreia

     
  • Don HO
    Don HO
    2012-01-25

    Loreia,

    All my sympathy to what happened to you and I hope things will get better.

    The user defined language lexer got a lot of enhancement, it's time to integrate the new core and redesign the user interface. The guideline is always KISS (Keep it simple stupid) but with a lot more features. I will try to get suggestions from forum for the new UDL interface design.

    Some of the patches regarding UDL of Chris are always on my radar, especialy the feature of "keyword with space" which is one of the most demanded feature. It'll be terrific if your release contains this patch.

    Don't be rush Loreia. All the quality code can be done only if you enjoy it and while you have no worry about you private life.

    Good luck,
    Don

     
  • Loreia2
    Loreia2
    2012-01-25

    Hi Don,

    yes I integrated Chris's stuff into my version of UDL. Specifically his UDL extension for numbers and multi-part keywords.
    But his code didn't fit well into my UDL 2.0, so I re-coded the same functionality. I also expanded it a bit.
    Multi-part keywords in my version of UDL 2.0 can be separated by spaces, tabs and new lines.
    Chris wrote it like this:
    "if else" is a multi-part keyword, "if" and "else" can be separated by any number of spaces and tabs, but they must be on the same line

    In my UDL 2.0 it works like this:
    "if else" is a multi-part keyword, "if" and "else" can be separated by by any number of spaces, tabs or newlines
    'if else' is a multi-part keyword where "if" and "else" can be separated by any number of spaces and tabs, but they must be on the same line

    Version with single spaces is important if multi-part keywords are nested inside of line comments.
    Also, UDL GUI was redesigned, and it now supports up to 8 keyword sets and 8 delimiter sets (and each delimiter set defines its own escape character)

    Most of it is explained in user documentation. It is online on weebly free hosting, but currently hidden from public view as I am still working on it.
    If you wish i can give you access, most of features (if not all of them) are already documented. It can give you a pretty good idea of what UDL 2.0 is all about.

    Thank you and best regards,
    Loreia

    P.S.
    I agree about rushing and code quality, I've seen so much bad code in corporate environment where this are rushed just for the sake of meeting some unrealistic dead line.
    Then again, I've been working on this for a year and it is close to being finished.
    Also, this is a full package (both lexer and GUI) and a full replacement for old UDL. My goal is to create something that doesn't need to "integrated". Once I merge it with latest version it will require zero effort to accept it in main branch.

     
  • Don HO
    Don HO
    2012-02-01

    Loreia,

    Thank you for the very detailed input.

    It seems not only a lot of new features added in new user defined language module, but also it will allow to build any refined language. However, I'm still worrying about the User Interface - the goal is to provide an intuitive interface so any noob of Notepad++ could use it to build a language rule immediately to meet whe he/she needs.

    May I have access to both binaries and document please? You can send them to me (don_DOT_h_AT_free_DOT_fr) if you want.

    Don

     
  • Loreia2
    Loreia2
    2012-02-02

    However, I'm still worrying about the User Interface - the goal is to provide an intuitive interface so any noob of Notepad++ could use it to build a language rule immediately to meet whe he/she needs.

    I agree.
    That's why new UI is even simpler (has less buttons and controls), and should be very familiar to any UDL user (or a newbie). I also plan to release UDL 2.0 with full user documentation, with a link to documentation integrated into UDL GUI. In this way, help be even easier to find than before.

    May I have access to both binaries and document please?

    Off course. I wanted to put the code on GoogleCode (or some other place) so it would be easily available, but never got to do it. Still, code is no secret, I'll gladly share it.

    Thank you and best regards,
    Loreia

     
  • Don HO
    Don HO
    2012-02-03

    I just check the documentation site - the site is sober and elegant.
    The interface is much less cluster than the current one, I don't think I can do better design. It will even better if the set style can be show beside of button "style", so user doesn't need to click the button to check the style.
    The UDL 2 is much better than the current one - I wonder if it can replace the most of scintilla internal lexers.
    Just cannot wait to see the UDL 2 in action. Congratulation for such awesome job!

    Don

     
  • Loreia2
    Loreia2
    2012-02-03

    Thanks, I am really a "low level stuff" kind of guy, designing UI is not my thing. So, I am glad to hear that new interface works well. I like your idea to add sample string next to "Style" button. I never occured to me to do it, because changes can immediately be seen in the code as soon as user changes something in the styler. That was enough for me. But for someone who imports a new styler, it would be simpler to simply check sample string within GUI.

    About replacing internal lexers.
    I never thought about this when I started working on UDL 2, but it recently hit me: why not create support for most Scintilla lexers? Some of them are outdated / not supported or simply not flexible for users who wish to fine tune it. And UDL 2.0 also offers considerable speed improvments (I still didin't test performance, but UDL 2.0 should be twice faster than UDL 1.0 !!)
    I guess UDL 2 should be able to lex most syntaxes. It still lacks support for Python-like folding, but that can be saved for UDL 3. I am really short on free time these days, and adding new major features might postpone release of UDL 2 until summer. So  I believe it would be much better to release it with current set of features, and schedule all new features for some future release. Besides, UDL 2 comes with a bunch of new features (as you might have seen in user documentation). I think it will be very useful even in its current form.

    About code quality, bugs, polishing features and so on.
    Generally, I am quite satisfied with code organization, readability and stability, but there is still a lot to do.
    When I was working on user documentation I discovered a great deal of bugs. Most of them were simple errors that happened after copy/pasting some code and not updating some constant or some pointer. For example nesting worked in comments and not in line comments, or Styler worked on keyword1 but not on keyword8.
    I also discovered that I need two sets of operators and folding in code keywords, and due to sound design of UDL 2, it was really easy to add new set of keywords. Actually, most of the work is adding edit boxes in GUI. Extending UDL 2 algorithm is really easy, and serialization is a matter of adding a sigle line in UserDefineDialog.h!

    So, basic work is done. Now (not right now! only after I publish UDL 2.0) I need support from testers to see if everything works. My tests were limited to most basic use, so Keyword1 or Delimiter1 probably work well, but the same is probably not true for  Keyword5 or Delimiter7. Serialization was also barely tested. This is where community can help, and I hope have a stable and tested UDL 2 after beta testing.

    My current work is mostly spent on documentation and fine tuning the code. Making it more readable and better logically organized. I guess you will see it your self when I send you code letter today. I would have done it already but it is a but chaotical here. I live on Mediterranian and when it snows in here life just stops :-)
    I am spending this day playing with my daughter in the snow (the first one she ever saw). I hope to have an hour or two in the evening to clean the project and send it to you.

    Thank you and best regards,
    Loreia

     
  • icegood
    icegood
    2012-02-20

    My test:
    language -maple

    <NotepadPlus>
        <UserLang name="Maple" ext="mpl">
            <Settings>
                <Global caseIgnored="no" />
                <Prefix words1="no" words2="no" words3="no" words4="yes" />
            </Settings>
            <KeywordLists>
                <Keywords name="Delimiters">0` 1&quot; 2 3` 4&quot; 5</Keywords>
                <Keywords name="Folder+">&apos; &apos;</Keywords>
                <Keywords name="Folder-"></Keywords>
                <Keywords name="Operators">- ! $ % &amp; ( ) * , . / : ; ? @  ^ ` { | } ~ + &lt; = &gt;</Keywords>
                <Keywords name="Comment">1(* 2*) 0#</Keywords>
                <Keywords name="Words1">and assuming break by catch description do done elif else end error expects export fi finally for from global if implies in intersect local minus mod module next not od option options or proc quit read return save stop subset then to try union use uses while xor depends evaln uneval</Keywords>
                <Keywords name="Words2">true false NULL FAIL integer string set list anything seq float Array array Float numeric realcons name equation boolean procedure</Keywords>
                <Keywords name="Words3">% %% %%% Digits UseHardwareFloats index/newtable mod Normalizer NumericEventHandlers Order printlevel Rounding Testzero</Keywords>
                <Keywords name="Words4">_Env</Keywords>
            </KeywordLists>
            <Styles>
                <WordsStyle name="DEFAULT" styleID="11" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
                <WordsStyle name="FOLDEROPEN" styleID="12" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="2" />
                <WordsStyle name="FOLDERCLOSE" styleID="13" fgColor="000080" bgColor="FFFFFF" fontName="" fontStyle="0" />
                <WordsStyle name="KEYWORD1" styleID="5" fgColor="0000A0" bgColor="FFFFFF" fontName="" fontStyle="4" />
                <WordsStyle name="KEYWORD2" styleID="6" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" />
                <WordsStyle name="KEYWORD3" styleID="7" fgColor="000000" bgColor="FFC4E1" fontName="" fontStyle="0" />
                <WordsStyle name="KEYWORD4" styleID="8" fgColor="000000" bgColor="FFD5EA" fontName="" fontStyle="0" />
                <WordsStyle name="COMMENT" styleID="1" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="2" />
                <WordsStyle name="COMMENT LINE" styleID="2" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="2" />
                <WordsStyle name="NUMBER" styleID="4" fgColor="008080" bgColor="C0C0C0" fontName="" fontStyle="1" />
                <WordsStyle name="OPERATOR" styleID="10" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="12" />
                <WordsStyle name="DELIMINER1" styleID="14" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="2" />
                <WordsStyle name="DELIMINER2" styleID="15" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="2" />
                <WordsStyle name="DELIMINER3" styleID="16" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" />
            </Styles>
        </UserLang>
    </NotepadPlus>

    What doesn't work:
    1) Block comments (should be green) (=have more priority than operators)
    2) Delimiters (should be red)
    3) Sometimes in delimiter2 menu Font combobox disappears:

     
  • icegood
    icegood
    2012-02-20

    Moreover, comments should have top-priority of ALL, because in all languages i know comments removing proceeded before even syntax-checking of code at compilation/translation.

     
  • icegood
    icegood
    2012-02-20

    if in userDefineLang.xml "Delimiters" is empty - program fails to start at all

     
<< < 1 2 3 4 .. 13 > >> (Page 2 of 13)