Jump to content
  • entries
    657
  • comments
    2,692
  • views
    898,366

Minor revision to jEdit Mode files


SpiceWare

512 views

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:

 

796572534_ScreenShot2019-12-15at9_59_56AM.thumb.png.dd0efa76ff75a5080ac066c230793c07.png

 

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:

 

1142099327_ScreenShot2019-12-15at10_08_00AM.thumb.png.49f0cbf9b0aaf6dbf312537bac1b7639.png

 

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.

742814902_ScreenShot2019-12-15at10_01_26AM.thumb.png.4f3dab06ecb6df4d489293ed4d6da322.png

 

 

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.

 

catalog.zip

 

Atari 2600 assembly.xml.zip

 

Atari 2600 batari BASIC.xml.zip

 

Atari 7800 assembly.xml.zip

 

c.xml.zip

 

ColecoVision assembly.xml.zip

 

JEDIT NAVIGATION
<PREVIOUS> <INDEX> <NEXT>

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...