Post Reply 
Syntax Highlighters for Prime language - HP PPL
04-30-2018, 04:33 AM (This post was last modified: 04-30-2018 04:45 AM by tcab.)
Post: #1
Syntax Highlighters for Prime language - HP PPL
I've created a syntax highlighter for the Prime Language for BBEdit/Textwrangler for Mac. TextWrangler is free, though recently discontinued in favour of its bigger brother BBEdit, which is also free - but has a paid upgrade for advanced features. I use the free version.

Copy the attached file Prime.plist to '~/Library/Application Support/BBEdit/Language Modules'. You may have to create the 'Language Modules folder' if it doesn’t exist.
Quit and relaunch BBEdit. Save your prime code in files ending with .prime or select the HP Prime language from the language popup menu of BBEdit, located in the footer.

I've also added most of the entries from Notepad++ HP PPL Support but could not seem to add:

Code:

        "%CHANGE",
        "%TOTAL",
        .*,
        .+,
        .-,
        ./,
        .^,
        :=,
        ΔLIST
        ΠLIST
        Σ
        ΣLIST
        ⁿ√
        →HMS
        ∂
        ∫
        B→R
        C→PX
        HMS→
        R→B

I prefer programming in lower case, but haven't created lowercase entries for most normal mode (non-cas) functions because there are so many to do and I don't know if there are any clashes with lowercase cas mode functions. I've asked a question re this in the prime forum. If it turns out that there are no clashes then I can update the attached file: all uppercase functions to be duplicated and converted to lower case, so that syntax highlighting works with both lower and uppercase functions.

I based this syntax highlighting spec file on another language, and simply changed things. This means that some of the specifications are not applicable and other enhancements could be added. For those keen to improving this, see syntax highlighting doco. For a quick morning's work, its good enough for me at the moment.


Attached File(s)
.zip  Prime.plist.zip (Size: 3.28 KB / Downloads: 7)
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)