Yesterday 21:07
Forum: Proton Plus Compiler v3
Starter: Henk57
Views: 0
Replies: 1
Go to last post By: Lester
Yesterday 20:59
Forum: Website / Forum Issues
Starter: Lester
Views: 0
Replies: 10
Yesterday 20:40
Forum: New devices and techniques
Starter: normnet
Views: 861
Replies: 2
+ Reply to Thread
Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31

Thread: UltraEdit adaption.36 days old

  1. #1
    Article Author johngb's Avatar
    Join Date
    Oct 2003
    Posts
    2,139
    Thumbs Up
    Received: 66
    Given: 0
    Total Downloaded
    1.09 GB

    0 Not allowed!

    Default UltraEdit adaption.

    I didn't know where to post this thread but as I guess this section is one of the most viewed I am posting here.

    After Les mentioned UltraEdit on a recent post, I have downloaded the app and am now in the process of building a highlighter file for the editor.

    I have written a little prog to extract highlighter data from the Highlighter database used by ProtonIDE. Is this the best source for this information? In doing this I noticed some rather odd highlight assignments. Under KeywordMacro I found the following...

    PLL_Setup
    OSC_PLLDIV
    PPS_Input
    PPS_Output
    PPS_Lock
    PPS_Unlock
    Write_OSCCONL
    Write_OSCCONH
    Write_OSCCON

    Are these macros?

    Also under KeywordASM I found what I understand to be macros e.g.
    Num_Wreg,Num_Bit,Num_Byte

    I guess the argument there is that they are Assembler macros

    Finally, System variables seem very limited and are assigned KeywordUser but there is no sign of system variables PP0 PP1 etc.

    Wondering is Les can advise. I guess if I use this file for the highlighter it will be as good as the ProtonIDE highlighter.
    JohnB

  2. #2
    Developer Les's Avatar
    Join Date
    Feb 2002
    Posts
    3,245
    Thumbs Up
    Received: 230
    Given: 87
    Total Downloaded
    1.50 GB

    0 Not allowed!

    Default Re: UltraEdit adaption.

    PLL_Setup etc, are still macros, but are meta-macros for the preprocessor, but IMO, any macro should be highlighted. Unfortunately, UltraEdit cannot pick up macro highlighting automatically from the program, but I'm sure you could come up with something John, because, unlike, the PDS IDE, changing the highlighter file and saving it, automatically alters the highlighting on the screen, unlike the Proton IDE, which needs a restart.

    I never got round so adding all the SFRs, because, again, it is not automatic, and when I created the Microchip.txt file, I was still developing the compiler. I still think the UltraEdit IDE is the best out there. It is not too complex, it does not fill the screen with crap, and it operates quite fast because it is not written in silly Java or Python or c# etc.. It talks to the processor directly.

    I'm glad I showed you a remarkable IDE that you also like.
    For more example programs for Proton and Proton24 or updates, please visit: Proton WIKI or Proton Files

  3. #3
    Article Author johngb's Avatar
    Join Date
    Oct 2003
    Posts
    2,139
    Thumbs Up
    Received: 66
    Given: 0
    Total Downloaded
    1.09 GB

    0 Not allowed!

    Default Re: UltraEdit adaption.

    I am starting off with the keyword files and trying to get it up to close to what the Proton IDE does. Not sure how it will be possible to create a code explorer but I need to understand better the Functions and Grouping which might be able to do something like that. There is some documentation on the IDM wiki which I have now found which does cover the Wordfile syntax. I don't think it is complete but it has helped me to get going.

    If I can get it up to a level where I am happy with it I might build a version of Fuse Config to run with it.
    JohnB

  4. #4
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    1,360
    Thumbs Up
    Received: 49
    Given: 124
    Total Downloaded
    2.37 GB

    0 Not allowed!

    Default Re: UltraEdit adaption.

    Very keen to have a play with a Proton highlighter for UltraEdit. Are doing something that is applicable to both compilers? My personal wish list would be code folding for standard Proton (although I suspect that might be quite difficult with out defined procedures)

    This may be dim but what is the connection between Fuse Config and highlighting?
    George

  5. #5
    Article Author johngb's Avatar
    Join Date
    Oct 2003
    Posts
    2,139
    Thumbs Up
    Received: 66
    Given: 0
    Total Downloaded
    1.09 GB

    0 Not allowed!

    Default Re: UltraEdit adaption.

    No connection, its just that if I choose to replace the IDE with UE I would like to have fuse config accessible from UE..
    JohnB

  6. #6
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    1,360
    Thumbs Up
    Received: 49
    Given: 124
    Total Downloaded
    2.37 GB

    0 Not allowed!

    Default Re: UltraEdit adaption.

    Duh! ...
    George

  7. #7
    Article Author johngb's Avatar
    Join Date
    Oct 2003
    Posts
    2,139
    Thumbs Up
    Received: 66
    Given: 0
    Total Downloaded
    1.09 GB

    0 Not allowed!

    Default Re: UltraEdit adaption.

    This is for Les mostly unless others have used Ultra Edit.

    In order to get the SFRs and be able to highlight as per ProtonIDE it looks like I will need to dive into javascript and parse the file being edited to extract device name (so I can get the FSR's from the PPI file) and generate on the fly a list of Labels, Procedures and Preprocessor Defines etc which I thin add into the UEWord file.

    Is that how you would go about or are there other ways.

    Not done much with javascript so it will be a bit of a learning curve for me.
    JohnB

  8. #8
    Article Author johngb's Avatar
    Join Date
    Oct 2003
    Posts
    2,139
    Thumbs Up
    Received: 66
    Given: 0
    Total Downloaded
    1.09 GB

    1 Not allowed!

    Default Re: UltraEdit adaption.

    George

    I have put a word file in your HotMail account if you want to have a play.
    JohnB

  9. #9
    Article Author johngb's Avatar
    Join Date
    Oct 2003
    Posts
    2,139
    Thumbs Up
    Received: 66
    Given: 0
    Total Downloaded
    1.09 GB

    0 Not allowed!

    Default Re: UltraEdit adaption.

    Struggling adapting UltraEdit for use with Proton in 2 areas:

    1 Code Folding - Works well with do..loop, while..wend, repeat..until, select..endselect and proc..endproc but if there is a do loop between proc..endproc the proc code folds at the loop keyword.

    2 Trying to build a function list using the perl regular expressions has been really difficult. I can only get the very simplest of expressions to return and then it returns the whole line. Is there anyone out there who is familiar with Perl regular expressions to do searches etc. I find the whole syntax really confusing. Here is an example of the strings I am using...

    Code:
    /TGBegin "Procedures"
    /TGFindStr = "^ proc "
    /TGEnd
    /TGBegin "Variables"
    /TGFindStr = "dim [a-z][0-9a-z_]"
    /TGEnd
    /TGBegin "Aliases"
    /TGFindStr = " ^ symbol"
    /TGEnd
    /TGBegin "Labels"
    /TGFindStr = "^ [a-z][0-9a-z_]*:"
    proc returns list of all all the procedures including parameters and comments, I really only want the names
    similarly, Dim Aliases and Labels return the whole line each time in addition, Labels also returns comment lines.

    Anyone able to make some suggestions?
    JohnB

  10. #10
    Article Author johngb's Avatar
    Join Date
    Oct 2003
    Posts
    2,139
    Thumbs Up
    Received: 66
    Given: 0
    Total Downloaded
    1.09 GB

    0 Not allowed!

    Default Re: UltraEdit adaption.

    Now beginning to get to grips with Regular Expressions and have progressed quite a bit further...

    I now have a word file which includes an extended highlighter
    You can now set a Foreground, background and Style for the following:

    Normal Text
    Alternate Block Comments
    Strings
    Numbers
    Proton Keywords
    Operators
    Constants
    Keyword Important
    Keyword User
    Declares
    Asm
    Preprocessor Macros
    Asm Macros
    Proton Macros

    Auto Code Indent/unindent and Code Folding on:
    Procedures, If EndIf, Case Statements, Do Loop, Repeat Until, While Wend and For Next loops

    Generates a function list similar to the ProtonIDE explorer with the following groups:
    Device, Includes, Declares, Constants, Variables, Labels and Procedures. Procedures also shows child entries for each parameter.
    Clicking on any item in the function list will navigate the editor to that line.

    Limitations:
    1 - I haven't worked out a way to separate out aliases from variables at present.
    2 - The highlighter will recognise many of the common FSRs but I haven't yet added FSRs for specific devices.
    3 - You cannot open up an include file by double clicking on the entry in the function list.

    If anyone would like to play with Ultra Edit using my wordfile, PM me with an email address and I will send you a copy.
    You will have to download Ultra Edit from IDM.
    JohnB

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Les has just uploaded UltraEdit from the 1990s.!
    By Les in forum Proton Users File Server
    Replies: 0
    Last Post: 29th October 2017, 09:47

Members who have read this thread since 8th December 2017, 12:54 : 25

Actions :  (Set Date)  (Clear Date)

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts