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
 tcab Member Posts: 188 Joined: Dec 2017
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",         .*,         .+,         .-,         ./,         .^,         :=,         &#x0394;LIST         &#x03A0;LIST         &#x03A3;         &#x03A3;LIST         ⁿ&#x221A;         &#x2192;HMS         &#x2202;         &#x222B;         B&#x2192;R         C&#x2192;PX         HMS&#x2192;         R&#x2192;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)