Minor revision to jEdit Mode files
While working on the next part of the CDFJ tutorial I noticed an odd coloration issue in jEdit - the 0 and 1 at the end of the labels were sometimes having the binary rules applied to them:
Took a look at the rule in the Mode file:
<!-- %01 format for binary --> <SPAN_REGEXP TYPE="OPERATOR" HASH_CHAR="%" AT_WORD_START="TRUE" DELEGATE="COLORIZE_BINARY"> <BEGIN>%</BEGIN> <END REGEXP="TRUE">\B</END> </SPAN_REGEXP>
The rule stops when Regular Expression \B is encountered, which is a non-word break. I would have thought starting a new line would have matched that, but apparently not.
I tried \s to match any whitespace character, no luck. Tried \n for new line, which didn't fix it and added a new problem - other coloration(byte, # and %) went away:
I then spotted the [^abc] character class operator which matches any character not in the set a, b or c so tried [^01] to matching anything not 0 or 1
<!-- %01 format for binary --> <SPAN_REGEXP TYPE="OPERATOR" HASH_CHAR="%" AT_WORD_START="TRUE" DELEGATE="COLORIZE_BINARY"> <BEGIN>%</BEGIN> <END REGEXP="TRUE">[^01]</END> </SPAN_REGEXP>
That worked.
I made this change to my Mode files for 2600, 7800, bB, ColecoVision, and c files. The 7800 entry is commented out in the catalog, so you'll need to uncomment it if you wish to use it.
I also updated the 2600 Mode file with the CDFJ registers.
Atari 2600 batari BASIC.xml.zip
JEDIT NAVIGATION
<PREVIOUS> <INDEX> <NEXT>
0 Comments
Recommended Comments
There are no comments to display.