Syntax colours

Here you can talk about anything related to BBC BASIC, not covered in another category
guest
Posts: 268
Joined: Mon 02 Apr 2018, 09:12

Re: Syntax colours

Post by guest » Fri 13 Apr 2018, 12:48

Kjell wrote:
Fri 13 Apr 2018, 12:26
Using Perl highlighting on this snippet worked fine
You are underestimating the complication of syntax-highlighting BBC BASIC! Even something as simple as this is challenging for some highlighters:

      DEF PROCsendmail

Because there is no delimiter between PROC and sendmail many highlighters will fail to recognise the keyword. I have been spending the last few days struggling to make the GeSHi highlighter work (and I would probably have given up had I not known that Jon Ripley succeeded in the same challenge at the old wiki). Fortunately, as I have reported elsewhere, I have succeeded.

I'd also want to point out that in any case we don't have a choice in what syntax highlighter to use; GeSHi is the only one that the wiki (both old and new) supports.

Code: Select all

  670 def procCopyToClipboard(text$)
  690 sys "GlobalAlloc", &2000, len(text$)+1 to hdata%
As discussed, please use only CAPITAL keywords when listing code at the wiki or here at the forum. Lowercase keywords are non-standard in BBC BASIC and most variants of the language don't accept them.

Richard.

guest
Posts: 268
Joined: Mon 02 Apr 2018, 09:12

Re: Syntax colours

Post by guest » Sat 14 Apr 2018, 09:58

If anybody spots an unexpected error in the wiki Syntax Highlighting please let me know. I would like to submit the BBC BASIC plugin to GeSHi for incorporation in their standard distribution, which is something that never happened with Jon's original (if it had we would have been spared a lot of grief!). Obviously I would like to be as confident as possible that it's working properly before doing that.

Richard.

Post Reply